pax_global_header00006660000000000000000000000064117261267410014521gustar00rootroot0000000000000052 comment=8a1809dbbbc9e73ab1912d5f1f847b3e3461644d dico-2.2/000077500000000000000000000000001172612674100123025ustar00rootroot00000000000000dico-2.2/ABOUT-NLS000066400000000000000000002253261172612674100135430ustar00rootroot000000000000001 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 free software 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 on translations can 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. 1.1 Quick configuration advice ============================== 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, message inheritance, automatic charset conversion or plural form handling) 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'. 1.2 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 already provides the GNU `gettext' functions. If not, the included GNU `gettext' 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 --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, 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 not be 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. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have 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. 1.3 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 `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 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. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. 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 `coordinator@translationproject.org' 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 skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of November 2007. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo +----------------------------------------------------+ Compendium | [] [] [] [] | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] | bison-runtime | [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | | cpplib | [] [] [] | cryptonit | [] | dialog | | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | fetchmail | [] [] () [] [] | findutils | [] | findutils_stable | [] [] [] | flex | [] [] [] | fslint | | gas | | gawk | [] [] [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] | gip | [] | gliv | [] [] | glunarclock | [] | gmult | [] [] | gnubiff | () | gnucash | [] [] () () [] | gnuedu | | gnulib | [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-filemanager | | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-package | | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | | gramadoir | [] [] | grep | [] [] | gretl | () | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | () | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] | indent | [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | keytouch | [] [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | () | ld | [] | leafpad | [] [] [] [] [] | libc | [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] | libgpg-error | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | | libiconv | [] [] | libidn | [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] | man-db | [] [] [] | minicom | [] [] [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] | pwdutils | | qof | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] | shared-mime-info | [] [] [] [] () [] [] [] | sharutils | [] [] [] [] [] [] | shishi | | skencil | [] () | solfege | | soundtracker | [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] | texinfo | [] [] [] | tin | () () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] | xpad | [] [] [] | +----------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB eo 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18 es et eu fa fi fr ga gl gu he hi hr hu id is it +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] [] | aspell | [] [] [] | bash | [] | bfd | [] [] | bibshelf | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cpplib | [] [] | cryptonit | [] | dialog | [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] | fetchmail | [] | findutils | [] [] [] | findutils_stable | [] [] [] [] | flex | [] [] [] | fslint | | gas | [] [] | gawk | [] [] [] [] () | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | () () () | gnuedu | [] | gnulib | [] [] [] | gnunet | | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] [] [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] [] [] | gpe-filemanager | [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] [] | gpsdrive | [] | gramadoir | [] [] | grep | [] [] [] | gretl | [] [] [] () | gsasl | [] [] | gss | [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] | gstreamer | [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] | keytouch-editor | [] | keytouch-keyboa... | [] [] | latrine | [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] [] [] | libgpg-error | [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] | libgsasl | [] [] | libiconv | [] [] [] | libidn | [] [] | lifelines | () | lilypond | [] [] [] | lingoteach | [] [] [] | lprng | | lynx | [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | [] | minicom | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | | qof | [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | tin | [] () | tuxpaint | [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] [] | util-linux-ng | [] [] [] [] [] [] [] | vorbis-tools | | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ es et eu fa fi fr ga gl gu he hi hr hu id is it 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52 ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn +--------------------------------------------------+ Compendium | [] | a2ps | () [] [] | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | [] | aspell | [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] [] | bison-runtime | [] [] [] | bluez-pin | [] [] [] | cflow | | clisp | [] | console-tools | | coreutils | [] | cpio | [] | cpplib | [] | cryptonit | [] | dialog | [] [] | diffutils | [] [] [] | doodle | | e2fsprogs | [] | enscript | [] | fetchmail | [] [] | findutils | [] | findutils_stable | [] | flex | [] [] | fslint | | gas | | gawk | [] [] | gcal | | gcc | | gettext-examples | [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gip | [] [] | gliv | [] | glunarclock | [] [] | gmult | [] [] [] | gnubiff | | gnucash | () () () | gnuedu | | gnulib | [] [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] | gphoto2 | [] [] | gprof | [] | gpsdrive | [] | gramadoir | () | grep | [] [] | gretl | | gsasl | [] | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] | gtick | [] | gtkam | [] [] | gtkorphan | [] | gtkspell | [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] | indent | [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | () () | jtag | | jwhois | [] | kbd | [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | | latrine | [] | ld | | leafpad | [] [] | libc | [] [] [] | libexif | | libextractor | | libgpewidget | [] | libgpg-error | | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] | libidn | [] [] | lifelines | [] | lilypond | [] | lingoteach | [] | lprng | | lynx | [] [] | m4 | [] [] | mailfromd | | mailutils | | make | [] [] [] | man-db | | minicom | [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] [] [] | pwdutils | | qof | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] [] | sed | [] [] | shared-mime-info | [] [] [] [] [] [] [] | sharutils | [] [] | shishi | | skencil | | solfege | () () | soundtracker | | sp | () | system-tools-ba... | [] [] [] [] | tar | [] [] [] | texinfo | [] [] | tin | | tuxpaint | () [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | util-linux-ng | [] [] | vorbis-tools | | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] [] | bash | [] [] | bfd | | bibshelf | [] | binutils | [] [] | bison | [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] [] | cflow | [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cpplib | [] | cryptonit | [] [] | dialog | [] | diffutils | [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] | findutils_stable | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] | gas | | gawk | [] [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gip | [] [] [] [] | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () [] | gnucash | () [] | gnuedu | | gnulib | [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] [] [] [] [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | gretl | [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] | herrie | [] [] [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | | ld | [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] | libextractor | [] [] | libgpewidget | [] [] [] [] [] [] [] [] | libgpg-error | [] [] [] | libgphoto2 | [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] | libidn | [] [] () | lifelines | [] [] | lilypond | | lingoteach | [] | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] [] [] [] | minicom | [] [] [] [] [] | nano | [] [] [] [] | opcodes | [] [] | parted | [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | [] [] | qof | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] [] | solfege | [] | soundtracker | [] [] | sp | | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu +---------------------------------------------------+ Compendium | [] [] [] [] | 19 a2ps | [] [] [] | 19 aegis | [] | 1 ant-phone | [] [] | 6 anubis | [] [] [] | 11 ap-utils | () [] | 4 aspell | [] [] [] | 16 bash | [] | 6 bfd | | 2 bibshelf | [] | 7 binutils | [] [] [] [] | 9 bison | [] [] [] [] | 20 bison-runtime | [] [] [] [] | 18 bluez-pin | [] [] [] [] [] [] | 28 cflow | [] [] | 5 clisp | | 9 console-tools | [] [] | 5 coreutils | [] [] [] | 18 cpio | [] [] [] [] | 11 cpplib | [] [] [] [] [] | 12 cryptonit | [] | 6 dialog | [] [] [] | 9 diffutils | [] [] [] [] [] | 29 doodle | [] | 6 e2fsprogs | [] [] | 10 enscript | [] [] [] | 16 fetchmail | [] [] | 12 findutils | [] [] [] | 11 findutils_stable | [] [] [] [] | 18 flex | [] [] | 15 fslint | [] | 2 gas | [] | 3 gawk | [] [] [] | 16 gcal | [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] | 29 gettext-runtime | [] [] [] [] [] [] | 28 gettext-tools | [] [] [] [] [] | 20 gip | [] [] | 13 gliv | [] [] | 11 glunarclock | [] [] [] | 15 gmult | [] [] [] [] | 16 gnubiff | [] | 2 gnucash | () [] | 5 gnuedu | [] | 2 gnulib | [] | 10 gnunet | | 0 gnunet-gtk | [] [] | 3 gnutls | | 4 gpe-aerial | [] [] | 14 gpe-beam | [] [] | 14 gpe-calendar | [] [] | 7 gpe-clock | [] [] [] [] | 21 gpe-conf | [] [] [] | 16 gpe-contacts | [] [] | 10 gpe-edit | [] [] [] [] [] | 22 gpe-filemanager | [] [] | 7 gpe-go | [] [] [] [] | 19 gpe-login | [] [] [] [] [] | 21 gpe-ownerinfo | [] [] [] [] | 21 gpe-package | [] | 6 gpe-sketchbook | [] [] | 16 gpe-su | [] [] [] [] | 21 gpe-taskmanager | [] [] [] [] | 21 gpe-timesheet | [] [] [] [] | 18 gpe-today | [] [] [] [] [] | 21 gpe-todo | [] [] | 8 gphoto2 | [] [] [] [] | 21 gprof | [] [] | 13 gpsdrive | [] | 5 gramadoir | [] | 7 grep | [] | 12 gretl | | 6 gsasl | [] [] [] | 9 gss | [] | 7 gst-plugins-bad | [] [] [] | 13 gst-plugins-base | [] [] | 11 gst-plugins-good | [] [] [] [] [] | 16 gst-plugins-ugly | [] [] [] | 13 gstreamer | [] [] [] | 18 gtick | [] [] | 7 gtkam | [] | 16 gtkorphan | [] | 7 gtkspell | [] [] [] [] [] [] | 27 gutenprint | | 4 hello | [] [] [] [] [] | 38 herrie | [] [] | 8 hylafax | | 0 idutils | [] [] | 15 indent | [] [] [] [] [] | 28 iso_15924 | [] [] | 4 iso_3166 | [] [] [] [] [] [] [] [] [] | 54 iso_3166_2 | [] [] | 4 iso_4217 | [] [] [] [] [] | 24 iso_639 | [] [] [] [] [] | 26 jpilot | [] [] [] [] | 7 jtag | [] | 3 jwhois | [] [] [] | 13 kbd | [] [] [] | 13 keytouch | [] | 8 keytouch-editor | [] | 5 keytouch-keyboa... | [] | 5 latrine | [] [] | 5 ld | [] [] [] [] | 10 leafpad | [] [] [] [] [] | 24 libc | [] [] [] | 19 libexif | [] | 5 libextractor | [] | 5 libgpewidget | [] [] [] | 20 libgpg-error | [] | 6 libgphoto2 | [] [] | 9 libgphoto2_port | [] [] [] | 11 libgsasl | [] | 8 libiconv | [] [] | 11 libidn | [] [] | 11 lifelines | | 4 lilypond | [] | 6 lingoteach | [] | 6 lprng | [] | 2 lynx | [] [] [] | 15 m4 | [] [] [] | 18 mailfromd | [] [] | 3 mailutils | [] [] | 8 make | [] [] [] | 20 man-db | [] | 9 minicom | [] | 14 nano | [] [] [] | 20 opcodes | [] [] | 10 parted | [] [] [] | 11 pilot-qof | [] | 1 popt | [] [] [] [] | 18 psmisc | [] [] | 10 pwdutils | [] | 3 qof | [] | 4 radius | [] [] | 7 recode | [] [] [] | 25 rpm | [] [] [] [] | 13 screem | [] | 2 scrollkeeper | [] [] [] [] | 26 sed | [] [] [] [] | 23 shared-mime-info | [] [] [] | 29 sharutils | [] [] [] | 23 shishi | [] | 3 skencil | [] | 7 solfege | [] | 3 soundtracker | [] [] | 9 sp | [] | 3 system-tools-ba... | [] [] [] [] [] [] [] | 38 tar | [] [] [] | 17 texinfo | [] [] [] | 15 tin | | 1 tuxpaint | [] [] [] | 19 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] [] | 20 util-linux-ng | [] [] [] | 20 vorbis-tools | [] [] | 4 wastesedge | | 1 wdiff | [] [] | 23 wget | [] [] [] | 20 xchat | [] [] [] [] | 29 xkeyboard-config | [] [] [] | 14 xpad | [] [] [] | 15 +---------------------------------------------------+ 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036 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 November 2007 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.6 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 you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the 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 `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. dico-2.2/AUTHORS000066400000000000000000000001101172612674100133420ustar00rootroot00000000000000Sergey Poznyakoff gray@gnu.org.ua Wojciech Polak polak@gnu.org dico-2.2/COPYING000066400000000000000000001043741172612674100133460ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . dico-2.2/ChangeLog000066400000000000000000004764601172612674100140750ustar00rootroot000000000000002012-03-04 Sergey Poznyakoff Implement info/descr for gcide. * NEWS: Update. * doc/dico.texi: Update. * include/dico/util.h (dico_string_trim): Add missing proto. * modules/gcide/gcide.c (gcide_info, gcide_descr): Implement info and description methods. * modules/gcide/tests/dict/INFO: New file. * modules/gcide/tests/Makefile.am (TESTSUITE_AT): Add descr.at and info.at. * modules/gcide/tests/testsuite.at: Include descr.at and info.at * modules/gcide/tests/dicod.cfin: Remove description. * modules/gcide/tests/descr.at: New test case. * modules/gcide/tests/info.at: New test case. * modules/gcide/tests/def00.at: Update. * modules/gcide/tests/def01.at: Update. * modules/gcide/tests/def02.at: Update. * modules/gcide/tests/def03.at: Update. * modules/gcide/tests/def04.at: Update. * modules/gcide/tests/def05.at: Update. * scripts/Makefile.am: Exempt gcider from standard options check. 2012-03-03 Sergey Poznyakoff Version 2.2 * NEWS: Update. * configure.ac: Version 2.2 Remove DBM autodetection. * doc/dico.texi: Update. * doc/gendocs_template: Update. * scripts/gcider: Update. * grecs: Upgrade. * lib/tests/Makefile.am (LDADD): Add $(LIBINTL). * lib/utf8.c [!ENODATA]: Define ENODATA. * modules/gcide/Makefile.am (gcide_la_LIBADD): Add @LTLIBINTL@. (idxgcide_LDADD): Add @LIBINTL@ (INCLUDES): Add gnu * modules/gcide/gcide.c" Include signal.h * modules/gcide/tests/Makefile.am (degcide_LDADD) (greek_LDADD): Add @LIBINTL@ * modules/nprefix/tests/dict.out: Use only lowercase headwords. Improve SASL authentication. * dico/saslauth.c: Make sure authentication is attempted only if the server offers SASL. (authctx): New struct. (match_capa,getauthcontext) (freeauthcontext): New functions. (saslauth0): Change signature: take authctx as 3rd arg. (saslauth): Return AUTH_CONT if SASL is not available or none of its methods matches those implemented on the client side. * dicod/main.c (user_db_config): Fix the source location copy. (init_user_db): Clear sasl_enable if no user database is configured. (main): Call register_sasl after init_user_db so that the above change takes effect. * dicod/server.c (dicod_server): Don't try to remove pidfile in foreground mode. * doc/proto.texi: Minor fix. 2012-03-02 Sergey Poznyakoff Update docs. Improve the documentation. 2012-02-28 Sergey Poznyakoff Minor changes * README: Update. * examples/numerals-cz.txt: Change initial comment. * examples/numerals-pl.ldb: Likewise. * scripts/gcider: Handle broken pipe and partial reads graciously. gcide: recreate index if any of the corpus files change. * modules/gcide/gcide.c (gcide_db) : New member. (gcide_check_files): Fill in db->latest_change. (gcide_access_idx): New function. Check index file availability and timestamp. (gcide_open_idx): Use gcide_access_idx to determine whether to create the index. 2012-02-27 Sergey Poznyakoff Update docs. Fix a bug in python. * doc/dico.texi: Finish main part. * modules/python/python.c (strat_select_method): Fix docstring. (dico_register_strat): Bugfix: reversed sense of a conditional. (mod_init_db): Declare DICO_SELECT_* constants. (mod_match): Fix memory leaks. Remove useless call to strat->sel, which is called by dico_key_deinit implicitly. Minor bugfixes in gcide. * modules/gcide/ent.c: Add missing entities (dagger, dag, para, etc.) * modules/gcide/gcide.c (GCIDE_DBGLEX): New flag. (gcide_init_db): New flag debug-lex. (output_def): If GCIDE_DBGLEX is set, enable lexer debugging. * modules/gcide/gcide.h (TAG_HAS_NAME): New macro. (gcide_markup_debug): Remove extern. (gcide_markup_parse): Takes three arguments. * modules/gcide/idxgcide.l: Tags and entities can contain uppercase letters. * modules/gcide/markup.l: Likewise. Define more yy* symbols. (pop_tag): Fix coredump on encountering improperly nested tag. (gcide_markup_debug): Remove. (gcide_markup_parse): Take three arguments. All uses updated. Improve docs. * doc/strat.texi: New file. Describes available match strategies. * doc/Makefile.am: Add strat.texi * doc/dico.texi: New appendix "Available Strategies". 2012-02-25 Sergey Poznyakoff Bugfixes. * dicod/accesslog.c (access_log_status): If "last" begins with a dot, advance 2 characters (complements 61ed04af). * scripts/gcider: Don't clear the tearOff option. (setupvisual): Add hotkeys to menu. Fix column configuration (saveconf): Save geometry. Don't save non-existing variables. (main): Restore main window geometry. Minor cleanup * configure.ac: New option --with-tk. Do not "build" gcider if Tcl/Tk is not available. * scripts/Makefile.am: Likewise. * scripts/gcider (setupvisual): Add necessary rowconfigures. 2012-02-23 Sergey Poznyakoff Upgrade grecs gcide: fix search in index page * modules/gcide/idx.c (gcide_idx_locate): Revamp the backtracking loop. gcide: support --help and --version command line options. 2012-02-20 Sergey Poznyakoff Minor changes * NEWS: Document gcider. * scripts/gcider (helpbox): Bind scrolling actions to kbd. (about): Bind CR and ESC keys. (gcide_configure): Add "help" button. 2012-02-19 Sergey Poznyakoff More changes in gcider. * scripts/gcider: Create GCIDE.IDX in the configuration directory by default, but provide an option to change this. Close current connection before opening new one. gcider: fix semantics of prev/next Document gcider. Improve gcider interface. Provide buttons for moving within input history; clear selection in entry parts of comboboxes when selecting a prior value into them. 2012-02-18 Sergey Poznyakoff gcider: limit the history size; other minor changes. Bugfix in the gcide module. * modules/gcide/idx.c (gcide_idx_locate): Fix backtracking. Improve gcider interface. * scripts/gcider: Provide a documentation (manual) window. Add status line. Use short strategy names in the strategy combobox, except for the ".", which is rendered as "Default". When hovering over the strategy popdown, print full description of a higlighted strategy in the status line. * doc/dico.texi: Update. 2012-02-13 Sergey Poznyakoff gcider: add window titles. Add gcider to distribution 2012-02-12 Sergey Poznyakoff gcider: configure appearance, save its settings to the config 2012-02-11 Sergey Poznyakoff gcider: implement input widget popup menu. 2012-02-09 Sergey Poznyakoff gcider: improve article presentation. * scripts/gcider (readdefns): Remove curly braces surrounding cross references. Implement CR<=>CRLF translation stream. * lib/stream.c (_stream_flush_buffer): Fix full buffering. (dico_stream_read): Break from the loop if level remains zero after filling the buffer. (dico_stream_writeln): Write a single \n at end of line. * TODO: Update. * dicod/dicod.c: End lines with a single \n. The \r is added automatically by the transport stream. (dicod_inetd): Use dicod_iostream to create transport stream. (dicod_iostream): New function. * dicod/dicod.h (dicod_iostream): New proto. * dicod/ostream.c (print_headers): End lines with a single \n. The \r is added automatically by the transport stream. Install dico_linetrim_stream here. * dicod/server.c (handle_connection): Use dicod_iostream to create transport stream. End lines with a single \n. * include/dico/stream.h (dico_crlf_stream): New proto. * dicod/auth.c: End lines with a single \n. The \r is added automatically by the transport stream. * dicod/commands.c: Likewise. * dicod/gsasl.c: Likewise * dicod/lang.c: Likewise * dicod/lev.c: Likewise * dicod/loader.c: Likewise * dicod/markup.c: Likewise * dicod/mime.c: Likewise * dicod/xidle.c: Likewise * dicod/xversion.c: Likewise * lib/fltstream.c: Likewise * lib/Makefile.am (libdico_la_SOURCES): Add crlfstr.c * lib/crlfstr.c: New file. * lib/tests/Makefile.am (noinst_PROGRAMS): Add crlftool (TESTSUITE_AT): Add crlf tests. * lib/tests/crlftool.c: New file. * lib/tests/crlf00.at: New test case. * lib/tests/crlf01.at: New test case. * lib/tests/crlf02.at: New test case. * lib/tests/crlf03.at: New test case. * lib/tests/crlf04.at: New test case. * lib/tests/crlf05.at: New test case. * lib/tests/testsuite.at: Include crlf tests. dicod: make sure output lines are no longer than 1024 UTF-8 characters. * dicod/ostream.c (dicod_ostream_create): Use linetrim stream as transport. * include/dico/stream.h (DICO_IOCTL_SET_LINELEN) (DICO_IOCTL_GET_LINELEN): New ioctls. (dico_linetrim_stream): New function. * lib/Makefile.am (libdico_la_SOURCES): Add linetrimstr.c * lib/linetrimstr.c: New file. Implementation of "line triming" stream. * lib/tests/Makefile.am: Add new tests. * lib/tests/linetrim.c: New file. * lib/tests/lntrim00.at: New file. * lib/tests/lntrim01.at: New file. * lib/tests/lntrim02.at: New file. * lib/tests/lntrim03.at: New file. * lib/tests/testsuite.at: Include new tests. 2012-02-07 Sergey Poznyakoff gcider: add text tags Minor changes in gcider. Implement a standalone Tk-based viewer for GCIDE * scripts/gcider: New file. 2012-02-05 Sergey Poznyakoff Implement PAM authentication. * configure.ac: Check for PAM libraries and headers. Build modules/pam/Makefile. * dicod/gsasl.c (cb_validate): Call dico_udb_check_password first, and dico_udb_get_password if it is not implemented. * include/dico/udb.h (dico_udb_def)<_db_check_password>: New member. (dico_udb_check_password): New function. * lib/udb.c (dico_udb) <_db_check_password>: New member. (dico_udb_check_password): New function. (dico_udb_get_password): Initialize _db_check_password. * modules/Makefile.am [PAM_COND]: Define PAM_DIR (SUBDIRS): Add $PAM_DIR. * modules/pam/Makefile.am: New file. * modules/pam/pam.c: New file. * NEWS: Update. * README: Update. * doc/dico.texi: Document PAM. Bugfixes. * dicod/main.c (user_db_config): Allocate copies of file name for cfg->locus.beg.file and cfg->locus.end.file. * modules/nprefix/nprefix.c: Include string.h * dicod/server.c (dicod_server): Ignore user/group settings if not running as root. 2012-02-04 Sergey Poznyakoff Update docs. 2012-02-03 Sergey Poznyakoff gcide: Minor changes. * modules/gcide/idxgcide.l: Count initial double vertical bar as start of entry. Index and entries. * modules/gcide/tests/def02.at: Reflect the recent changes. gcide: Fix some UTF-8 entities. 2012-02-02 Sergey Poznyakoff New dicod option -D (define symbol). * dicod/cmdline.opt: Handle the -D (--define) option. * doc/dico.texi: Document it. gcide: further improvements. * modules/gcide/ent.c: Add new entities. * modules/gcide/idxgcide.l: Index entries. 2012-01-31 Sergey Poznyakoff Bugfix in word module. * modules/word/word.c (first_sel,last_sel): Return 0 if the dictionary word is empty. Implement the nprefix strategy. * configure.ac: Configure the nprefix module. * NEWS: Document nprefix. * doc/dico.texi: Likewise. * modules/Makefile.am (SUBDIRS): Add nprefix. * modules/nprefix/Makefile.am: New file. * modules/nprefix/nprefix.c: New file. * modules/nprefix/tests/Makefile.am: New file. * modules/nprefix/tests/atlocal.in: New file. * modules/nprefix/tests/dicod.cfin: New file. * modules/nprefix/tests/dict.out: New file. * modules/nprefix/tests/np00.at: New file. * modules/nprefix/tests/np01.at: New file. * modules/nprefix/tests/np02.at: New file. * modules/nprefix/tests/np03.at: New file. * modules/nprefix/tests/np04.at: New file. * modules/nprefix/tests/testsuite.at: New file. * modules/nprefix/tests/.gitignore: New file. Implement "first" and "last" matching strategies. * modules/word/word.c: Implement new strategies. * NEWS: Document new strategies. * doc/dico.texi: Likewise. * modules/word/tests/dicod.cfin: Load dict.out * modules/word/tests/dict.out: New file. * modules/word/tests/first.at: New file. * modules/word/tests/last.at: New file. * modules/word/tests/word.at: New file. * modules/word/tests/Makefile.am: Add new files. Change ~dictdir~. * modules/word/tests/testsuite.at: Include new files. Document the pcre module. Accept CLIENT command without arguments. Update the docs. Bugfix * dicod/commands.c (dicod_client): The CLIENT command takes any number of arguments. 2012-01-30 Sergey Poznyakoff Update for gcide 0.51 * modules/gcide/ent.c: Handle tag triggers flush_headwords. 2012-01-29 Sergey Poznyakoff Test the basic dicod functionality. * configure.ac: Define LIBDICOSASL to absolute path. Initialize tests in dicod. * dicod/Makefile.am (SUBDIRS): Add tests. * include/testsuite.inc (AT_SKIP_TEST,DICO_VERSION) (DICOD_RUN): New defines. * dicod/tests/Makefile.am: New file. * dicod/tests/atlocal.in: New file. * dicod/tests/group: New file. * dicod/tests/passwd: New file. * dicod/tests/startup.at: New file. * dicod/tests/alias.at: New file. * dicod/tests/apop.at: New file. * dicod/tests/apopauth.c: New file. * dicod/tests/def.at: New file. * dicod/tests/descr.at: New file. * dicod/tests/echo.c: New file. * dicod/tests/help00.at: New file. * dicod/tests/help01.at: New file. * dicod/tests/help02.at: New file. * dicod/tests/help03.at: New file. * dicod/tests/info.at: New file. * dicod/tests/match.at: New file. * dicod/tests/nodef.at: New file. * dicod/tests/nomatch.at: New file. * dicod/tests/showdb.at: New file. * dicod/tests/showstrat.at: New file. * dicod/tests/testsuite.at: New file. * dicod/tests/vis00.at: New file. * dicod/tests/vis01.at: New file. * dicod/tests/vis02.at: New file. Upgrate grecs. Minor fixes in dicod. * dicod/acl.c (acl_entry) : New member. (_acl_check): Handle dflt specially. (dicod_acl_create,parse_acl_line): allocate a copy of member field in loci. (_parse_from): Accept the traditional "from any" clause. * dicod/commands.c (dicod_show_server): Dont print timing if timing_option is not set. Fix the docs. * dico/cmdline.opt: Use the gnupackage option to include web URL into the help output. * dicod/cmdline.opt: Likewise. * doc/dico.texi: Improve some wording. 2012-01-28 Sergey Poznyakoff Document wordnet module. Minor changes. * modules/gcide/gcide.c (run_idxgcide): Fix error diagnostics. (gcide_open_idx): don't try to open the index file if idxgcide has failed. 2012-01-27 Sergey Poznyakoff Fix handling of double vertical bar (\'d8) in GCIDE database. * modules/gcide/idxgcide.l: Allow for \'d8 between

and . Ignore it elsewhere. * modules/gcide/tests/Makefile.am: Add new tests. * modules/gcide/tests/def02.at: New file. * modules/gcide/tests/def03.at: New file. * modules/gcide/tests/def04.at: New file. * modules/gcide/tests/def05.at: New file. * modules/gcide/tests/dict/CIDE.A: Add double bar to a headword. * modules/gcide/tests/testsuite.at: Include new tests. 2012-01-26 Sergey Poznyakoff Update .gitignore. Remove a stray file. Add Emacs mode markers and keywords to test cases. Fixes in gcide indexing algorithm. Add module tests. * modules/gcide/gcide.c (run_idxgcide): Fix idxgcide invocation. * modules/gcide/idx.c (gcide_idx_file_close): Avoid coredump on NULL argument. * modules/gcide/idxgcide.l (i): Rename to letno. All uses updated. (flush_headwords): Update headword_position even if headword is empty. (yywrap): Call flush_headwords; reset headword_position to 0. (main): Remove unnecessary call to flush_headwords, now that is handled by yywrap. * modules/gcide/tests/Makefile.am: Add new tests. * modules/gcide/tests/atlocal.in (PATH): Update. (DICTDIR,IDXDIR): New variables. * modules/gcide/tests/all.at: New testcase. * modules/gcide/tests/autoidx.at: New testcase. * modules/gcide/tests/def00.at: New testcase. * modules/gcide/tests/def01.at: New testcase. * modules/gcide/tests/define.at: New testcase. * modules/gcide/tests/exact.at: New testcase. * modules/gcide/tests/idx.at: New testcase. * modules/gcide/tests/prefix.at: New testcase. * modules/gcide/tests/testsuite.at: Include new tests. * modules/gcide/tests/dicod.cfin: New file. * modules/gcide/tests/dict/CIDE.A: New file. * modules/gcide/tests/dict/CIDE.B: New file. * modules/gcide/tests/dict/CIDE.C: New file. * modules/gcide/tests/dict/CIDE.D: New file. * modules/gcide/tests/dict/CIDE.E: New file. * modules/gcide/tests/dict/CIDE.F: New file. * modules/gcide/tests/dict/CIDE.G: New file. * modules/gcide/tests/dict/CIDE.H: New file. * modules/gcide/tests/dict/CIDE.I: New file. * modules/gcide/tests/dict/CIDE.J: New file. * modules/gcide/tests/dict/CIDE.K: New file. * modules/gcide/tests/dict/CIDE.L: New file. * modules/gcide/tests/dict/CIDE.M: New file. * modules/gcide/tests/dict/CIDE.N: New file. * modules/gcide/tests/dict/CIDE.O: New file. * modules/gcide/tests/dict/CIDE.P: New file. * modules/gcide/tests/dict/CIDE.Q: New file. * modules/gcide/tests/dict/CIDE.R: New file. * modules/gcide/tests/dict/CIDE.S: New file. * modules/gcide/tests/dict/CIDE.T: New file. * modules/gcide/tests/dict/CIDE.U: New file. * modules/gcide/tests/dict/CIDE.V: New file. * modules/gcide/tests/dict/CIDE.W: New file. * modules/gcide/tests/dict/CIDE.X: New file. * modules/gcide/tests/dict/CIDE.Y: New file. * modules/gcide/tests/dict/CIDE.Z: New file. * dicod/gsasl.c (callback): Comment out spurious diagnostics. Test gcide markup and Greek transliteration. * configure.ac: Configure gcide tests. * modules/gcide/tests/.gitignore: Update. * modules/gcide/tests/Makefile.am: Add test cases. * modules/gcide/tests/atlocal.in: New file. * modules/gcide/tests/degcide.c: Change command line handling. Use the same output algorithm as in gcide.c * modules/gcide/tests/greek.at: New file. * modules/gcide/tests/markup.at: New file. * modules/gcide/tests/nopr.at: New file. * modules/gcide/tests/testsuite.at: New file. * dicod/cmdline.opt: Minor change. 2012-01-25 Sergey Poznyakoff gcide: add an option to suppress blocks. * modules/gcide/ent.c: Recognize : New member. (gcide_init_db): New option "suppress-pr" (GOF_IGNORE): New flag. (GOF_AS): Change constant. (print_text): Suppress text output if GOF_IGNORE is set. Set it if is encountered and GCIDE_NOPR flag is set. (output_def): Initialize clos.flags with the value from db->flags. * doc/dico.texi: Update. Minor fix. Update NEWS. Update the docs. Test built-in strategies. * modules/outline/tests/Makefile.am (TESTSUITE_AT): Add new test files. * modules/outline/tests/testsuite.at: Inlcude new tests. * modules/outline/tests/dlev.at: New file. * modules/outline/tests/dnlev.at: New file. * modules/outline/tests/nlev.at: New file. * modules/outline/tests/re.at: New file. * modules/outline/tests/regexp.at: New file. * modules/outline/tests/soundex.at: New file. Add tests for the strategies "word", "substr" and "all". Update auxiliary files. Remove top-level tests dir. * Makefile.am: Remove tests. * configure.ac: Likewise. * examples/Makefile.am: Add glossary.scm * tests/glossary.scm: Move to examples * tests/.gitignore: Remove. * tests/Makefile.am: Remove. * tests/dicod.cfin: Remove. Add python module test. * configure.ac: Configure python testdir. * examples/Makefile.am: Add new files. * tests/example.text: Move to examples/numerals-cz.txt * tests/example.py: Move to examples/textdict.py * modules/python/Makefile.am (SUBDIRS): Add tests. * modules/python/tests/Makefile.am: New file. * modules/python/tests/atlocal.in: New file. * modules/python/tests/define.at: New file. * modules/python/tests/dicod.cfin: New file. * modules/python/tests/exact.at: New file. * modules/python/tests/lev.at: New file. * modules/python/tests/prefix.at: New file. * modules/python/tests/showdb.at: New file. * modules/python/tests/showinfo.at: New file. * modules/python/tests/showlang.at: New file. * modules/python/tests/testsuite.at: New file. Add Levenshtein strategy tests. * modules/guile/tests/Makefile.am: Add lev.at * modules/guile/tests/lev.at: New file. * modules/guile/tests/testsuite.at: Include lev.at * modules/outline/tests/Makefile.am: Add lev.at * modules/outline/tests/lev.at: New file. * modules/outline/tests/testsuite.at: Add lev.at Add guile tests. * configure.ac: Configure guile tests. * examples/listdict.scm: Minor change. * modules/guile/Makefile.am (SUBDIR): Add tests. * modules/guile/tests/.gitignore: New file. * modules/guile/tests/Makefile.am: New file. * modules/guile/tests/define.at: New file. * modules/guile/tests/dicod.cfin: New file. * modules/guile/tests/exact.at: New file. * modules/guile/tests/prefix.at: New file. * modules/guile/tests/showdb.at: New file. * modules/guile/tests/showinfo.at: New file. * modules/guile/tests/showlang.at: New file. * modules/guile/tests/suffix.at: New file. * modules/guile/tests/testsuite.at: New file. Add outline tests. * Makefile.am (SUBDIRS): Add examples. * am/testdir.m4: New file. * configure.ac: Configure examples/Makefile.am and outline test dir. * tests/devils.out: Move to examples/devdict.out. * tests/example.scm: Move to examples/listdict.scm. * tests/example.db: Move to examples/numerals-pl.ldb * examples/Makefile.am: New file. * include/Makefile.am (noinst_HEADERS): Add testsuite.inc * include/testsuite.inc: New file. * lib/tests/Makefile.am: Minor change. * lib/tests/atlocal.in: Likewise. * modules/outline/Makefile.am (SUBDIRS): Add tests. * modules/outline/tests/.gitignore: New file. * modules/outline/tests/Makefile.am: New file. * modules/outline/tests/atlocal.in: New file. * modules/outline/tests/define.at: New file. * modules/outline/tests/dicod.cfin: New file. * modules/outline/tests/exact.at: New file. * modules/outline/tests/prefix.at: New file. * modules/outline/tests/showdb.at: New file. * modules/outline/tests/showinfo.at: New file. * modules/outline/tests/showlang.at: New file. * modules/outline/tests/testsuite.at: New file. Add tests for list operations. * include/dico/list.h (dico_list_push): Push to the list tail. * lib/list.c (dico_list_pop): Pop from the tail. * lib/tests/.gitignore: Update. * lib/tests/Makefile.am (noinst_PROGRAMS): Add listop. (TESTSUITE_AT): Add list.at * lib/tests/itrsh.c: New file. * lib/tests/itrsh.h: New file. * lib/tests/list.at: New file. * lib/tests/listop.c: New file. * lib/tests/testsuite.at: Inlcude list.at 2012-01-24 Sergey Poznyakoff Improvements in gcide and wordnet modules. * modules/gcide/gcide.c (print_text): Translate tag to {...}. * modules/wordnet/wordnet.c (WNDB_MERGE_DEFS): New define. (wndb) : New member. (wn_option) : Change signature. (wn_init_db): New boolean option merge-defs instructs module to merge all available definitions into one. (wn_output_result,wn_result_count): Handle WNDB_MERGE_DEFS flag. Bugfix * lib/list.c (dico_list_pop): Fix return from uninitialized variable. Cleanup in wordnet code. 2012-01-23 Sergey Poznyakoff Start writing a testsuite. * configure.ac: Add lib/tests. * include/dico/utf8.h (utf8_toupper,utf8_tolower): Change signature. * lib/Makefile.am (SUBDIRS): New variable. * lib/utf8.c (utf8_strncasecmp): Fix boundary control. (utf8_wc_strncmp,utf8_wc_strncasecmp): Likewise. (utf8_toupper,utf8_tolower): Change signature. * lib/tests/.gitignore: New file. * lib/tests/Makefile.am: New file. * lib/tests/atlocal.in: New file. * lib/tests/strcasecmp.at: New file. * lib/tests/strlen.at: New file. * lib/tests/strncasecmp.at: New file. * lib/tests/testsuite.at: New file. * lib/tests/tolower.at: New file. * lib/tests/toupper.at: New file. * lib/tests/utf8.c: New file. * lib/tests/wcstrcasecmp.at: New file. * lib/tests/wcstrchr.at: New file. * lib/tests/wcstrcmp.at: New file. * lib/tests/wcstrncasecmp.at: New file. * lib/tests/wcstrncmp.at: New file. * lib/tests/wcstrstr.at: New file. * tests/levtest.c: move to lib/tests/levtest.c * lib/tests/dlev00.at: New file. * lib/tests/dlev01.at: New file. * lib/tests/lev00.at: New file. * lib/tests/lev01.at: New file. Add new utf8 functions. * lib/utf8.c (utf8_wc_strncmp,utf8_wc_strncasecmp): New functions. * include/dico/utf8.h: Update. Provide default selectors for "exact", "prefix" and "suffix" strategies * dicod/dicod.c: Provide default selectors for "exact","prefix" and "suffix" strategies. * modules/dict.org/dictorg.c (_match_simple): Take matcher as argument. (mod_match): Use default strategy mapper only if the module does not provide such strategy. * modules/outline/outline.c: Likewise. * modules/wordnet/wordnet.c: Likewise. 2012-01-22 Sergey Poznyakoff wordnet: change processing of defines. * modules/wordnet/wordnet.c (wndb) : Remove. : New members. (wn_free_db): Free wndb->optv. (wn_option): New struct. (wn_optlist): New variable. (wn_init_db): Change option parsing. (defn): New struct. (result): Rewrite. All uses changed. (wn_create_match_result): Take a pointer to struct wndb as argument. (wn_is_defined): New function. (wn_foreach_db): Rewrite. Change signature. All uses changed. (wn_define): Rewrite. (format_defn): New function. (format_synset): Remove. (wn_output_result): Rewrite result_define part. Improve dico_list API. * include/dico/list.h (dico_iterator_remove_current): void. * lib/list.c (dico_iterator_remove_current): Change return type. Call _dico_list_remove_item to do the job. (_dico_list_remove_item): New static. (_dico_list_remove): Call _dico_list_remove_item. 2012-01-21 Sergey Poznyakoff Add wordnet module. * configure.ac: New option --with-wordnet. * modules/Makefile.am [WORDNET_COND] (WORDNET_DIR): New variable. (SUBDIRS): Add WORDNET_DIR. * modules/wordnet/Makefile.am: New file. * modules/wordnet/wordnet.c: New file. Fix dico_list_insert_sorted. * lib/list.c (_dico_list_insert_sorted): Fix coredump. If flags are set and the matching item is already in the list, return EEXIST. 2012-01-20 Sergey Poznyakoff gcide: support tags. 2012-01-19 Sergey Poznyakoff Update the docs. Assorted fixes. * dicod/main.c (main): Call dicod_log_setup after config_parse, so that configuration settings take effect. * modules/gcide/idxgcide-cli.opt: --dry-run implies --verbose. 2012-01-18 Sergey Poznyakoff Bugfixes. * dicod/Makefile.am: Restore incdir. * dicod/server.c (open_sockets): Fix default sockaddr initialization. gcide: Fix umlauts, remove CRs. * modules/gcide/ent.c: Fix umlauts ("xum", not "xuml") * modules/gcide/markup.l: Remove CRs. Bugfix * modules/gcide/gcide.c (gcide_output_result): Fix match output. Improve idxgcide command line interface. * modules/gcide/.gitignore: Update. * modules/gcide/Makefile.am (idxgcide_SOURCES): Add idxgcide-cli.h Build it from idxgcide-cli.opt. (idxgcide_LDADD): Add libgnu and libxdico. * modules/gcide/idxgcide-cli.opt: New file. * modules/gcide/idxgcide.l: Include idxgcide-cli.h, use get_options for command line parsing. * po/POTFILES.in: Add files from modules/gcide. Improve greek transliterator. * configure.ac: Build modules/gcide/tests/Makefile. * modules/gcide/Makefile.am (SUBDIRS): Add tests. * modules/gcide/ent.c: Add digamma. * modules/gcide/gcide.c (print_text): Fix output of quotes. * modules/gcide/grk.c: Add more sequences. * modules/gcide/markup.l: Fix handling of comments. * modules/gcide/degcide.c: Move to tests. * modules/gcide/greek.c: Likewise. * modules/gcide/tests/exgrk.c: New file. Convert Greek transliteration back to Greek. Remove markup when printing definitions. * modules/gcide/Makefile.am (libgcide_la_SOURCES): Add grk.c (noinst_PROGRAMS): Add greek. * modules/gcide/ent.c: Fix a typo. * modules/gcide/gcide.c (output_def): Convert markup to plain text. * modules/gcide/gcide.h (gcide_grk_to_utf8): New proto. * modules/gcide/grk.c: New file. * modules/gcide/greek.c: New file. * modules/gcide/markup.l: Preserve ["*'] in tags. Implement GCIDE markup parser. * lib/list.c (dico_list_pop): Return NULL if the list is empty. * modules/gcide/Makefile.am (libgcide_la_SOURCES): Add markup.l * modules/gcide/degcide.c: New file. * modules/gcide/markup.l: New file. * modules/gcide/gcide.h: Include dico.h (gcide_content_type): New enum. (gcide_tag,gcide_parse_tree): New structs. (gcide_markup_debug): New extern. (gcide_markup_parse,gcide_parse_tree_free) (gcide_parse_tree_inorder): New functions. 2012-01-17 Sergey Poznyakoff Allow simple-statement form for load-module. * dicod/main.c (load_module_cb): Accept simple statement form with string or list as argument. * NEWS: Document new usage. * doc/dico.texi: Likewise. * tests/dicod.cfin: Use new syntax. * README: Update. gcide: handle entities in headwords. * modules/gcide/ent.c: Bugfixes. * modules/gcide/idxgcide.l: Handle <../ entities in headwords. Report unknown entities. gcide: support alternative headwords. * modules/gcide/idxgcide.l (endtag): New variable. (headword): Remove global. (flush_headwords): Initialize headword. (BEGIN_HEADWORD): New macro. : Handle asp and altname tags. (main): Call flush_headwords unconditionally. 2012-01-16 Sergey Poznyakoff Add GCIDE support. * configure.ac (AC_CONFIG_FILES): Add modules/gcide/Makefile. * modules/Makefile.am (SUBDIRS): Add gcide. * modules/gcide/.gitignore: New file. * modules/gcide/Makefile.am: New file. * modules/gcide/gcide.c: New file. * modules/gcide/gcide.h: New file. * modules/gcide/idx.c: New file. * modules/gcide/idxgcide.l: New file. * modules/gcide/webchr.c: New file. * modules/gcide/ent.c: New file. * modules/template.c: Bugfixes. 2012-01-14 Sergey Poznyakoff Updates. * THANKS: Update. * modules/template.c: Add result_headers method. * modules/template.scm: Likewise. 2012-01-13 Sergey Poznyakoff Assorted fixes. * modules/ldap/ldap.c (_dico_ldap_expand_user): Use wordsplit. * grecs: Upgrade. * doc/dico.texi: Update. 2012-01-10 Sergey Poznyakoff Minor change. * dicod/main.c (config_parse): Exit if grecs_error_count is gt 0. Minor change Raise version number to 2.1.90; Other housekeeping. * NEWS: Raise version number. * configure.ac: Likewise. * doc/Makefile.am (check-options): Fix second regexp. * doc/dico.texi: Use @WRITEME to mark empty nodes. * doc/rendition.texi: Delete (complements 50c7e46c). Use wordsplit instead of dico_argcv. * dico/autologin.c (parse_autologin): Rewrite using wordsplit. * dico/dico-priv.h: Include wordsplit.h * dicod/dicod.h: Likewise. * dico/saslauth.c (get_implemented_mechs): Use wordsplit. * dico/shell.c (_command_completion): Likewise. * dicod/gsasl.c (register_sasl): Likewise. * dicod/loader.c (dicod_load_module): Likewise. * dicod/main.c (set_dict_handler): Likewise. * modules/guile/guile.c (guile_load): Likewise. * modules/ldap/ldap.c (db_open): Likewise. * modules/guile/Makefile.am (INCLUDES): Add @GRECS_INCLUDES@ * modules/ldap/Makefile.am: Likewise. * modules/outline/Makefile.am: Likewise. * modules/outline/outline.c (outline_lang): Likewise. Incorporate Grecs into libdico. * grecs: Update. * configure.ac (GRECS_SETUP): Use the "shared" option. * lib/Makefile.am (libdico_la_LIBADD): Incorporate libgrecs * dico/Makefile.am (LDADD): Remove @GRECS_LDADD@. * dicod/Makefile.am: Likewise. Minor changes. * grecs: Update. * po/POTFILES.in: Update. Install pp-setup from Grecs. * configure.ac (GRECS_SETUP): Use std-pp-setup option. * dicod/Makefile.am: Remove pp-setup. * dicod/pp-setup: Remove. 2012-01-09 Sergey Poznyakoff Use Grecs instead of the built-in configuration parser. Grecs is a convenience library for parsing sructured configuration files. It derived from the dicod and wydawca parsers in 2009. It has already reached stable status and is now used by quite a few other projects. * .gitmodules: Add Grecs * Makefile.am: Likewise. * configure.ac: Likewise. * dico/Makefile.am (LDADD,INCLUDES): Add Grecs. * dico/cmdline.opt (OPTIONS_BEGIN): Rewrite. * dicod/Makefile.am (dicod_SOURCES): Remove pp.c, config-format.c, config-gram.y and config-lex.l. Add lint.c * dicod/acl.c: Use Grecs. * dicod/alias.c (alias): Remove const. : Change type. (alias_install): Allocate kw. * dicod/cmdline.opt (OPTIONS_BEGIN): Rewrite. * dicod/config-format.c: Remove. * dicod/config-gram.y: Remove. * dicod/config-lex.l: Remove. * dicod/lint.c: New file. * dicod/dicod.h: Remove configuration parser types and definitions. * dicod/gsasl.c (cmp_names): List contains now pointers to strings. * dicod/loader.c (_add_load_dir): Likewise. * dicod/main.c: Rewrite configuration parser using Grecs. * dicod/server.c (open_sockets): Operate on grecs_sockaddr structs. * gnulib.modules (gitlog-to-changelog): Remove. * include/appi18n.h: Redefine _ and N_ only if necessary. * utils/Makefile.am (EXTRA_DIST): Remove getopt.m4 * utils/getopt.m4: Remove. * README-hacking: Update. Implement "word" matching strategy. * configure.ac: Build modules/word/Makefile. * modules/Makefile.am (SUBDIRS): Add word. * modules/word/Makefile.am: New file. * modules/word/word.c: New file. * doc/dico.texi: Document new module. Move UTF-8 tokenizer to libdico. * lib/tokenize.c: Rewrite. * lib/xtkn.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add tokenize.c (libxdico_a_SOURCES): Remove tokenize.c, add xtkn.c. * include/dico.h: Include dico/tokenize.h * include/dico/tokenize.h: New file. * include/dico/Makefile.am (pkginclude_HEADERS): Add tokenize.h * include/xdico.h: Remove xdico tokenizer interface. (xdico_tokenize_string): New proto. * dico/connect.c (_result_parse_def): Use new tokenizer. * dico/shell.c (parse_script_file): Likewise. * dicod/dicod.c (dicod_loop): Likewise. * dicod/config-lex.l (unescape_to_obstack): Use dico_unquote_char. Happy GNU Year 2011-10-08 Sergey Poznyakoff Use Imprimatur to check the docs. * .gitmodules: Add imprimatur. * Makefile.am (ACLOCAL_AMFLAGS,SUBDIRS): Add imprimatur. * configure.ac: Call IMPRIMATUR_INIT. * doc/Makefile.am: Use imprimatur. Drop files that are no longer necessary. * doc/check-docs.sh: Delete. * doc/mastermenu.el: Delete. * doc/untabify.el: Delete * doc/dico.texi: Fix sentence spacing, use @: where appropriate. * doc/strftime.texi: Likewise. 2011-02-15 Sergey Poznyakoff Bugfixes. * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and socket.h. * dicod/Makefile.am: Add $(AM_V_GEN) where needed. * tests/Makefile.am: Likewise. * dicod/main.c (main): Flush capabilities after loading all modules and configuring authentication database. Take care not to switch to syslog if --lint was given. 2010-11-13 Sergey Poznyakoff Minor changes. New strategy: pcre (perl-compatible regex). * am/lib.m4: New file * configure.ac: Check for libpcre. * modules/pcre/Makefile.am: New file. * modules/pcre/pcre.c: New file. * modules/Makefile.am [PCRE_COND] (PCRE_DIR): Initialize to pcre. (SUBDIRS): Add $(PCRE_DIR). 2010-11-13 Wojciech Polak Switch to Django's cache framework (from direct Memcached). * dicoweb/dicoclient/dicoclient.py: Minor code changes. * dicoweb/dicoclient/dicoshell.py: Likewise. * dicoweb/settings-sample.py: Add sample CACHE_BACKEND. * dicoweb/views.py: Use Django's cache framework. 2010-11-13 Sergey Poznyakoff Minor fix. * dicod/regex.c (basic_flags): Remove REG_EXTENDED. 2010-08-19 Sergey Poznyakoff Partially revert commit c4db582a8c. As reported by Ahmed, it actually broke the previous solution. See http://mail.gnu.org.ua/mailman/listarchive/bug-dico/last/msg00000.html, for details. 2010-08-01 Wojciech Polak Add "robots" meta value depending on the context. * dicoweb/templates/base.html: Add page.robots. * dicoweb/views.py: Set "robots" value. 2010-07-10 Wojciech Polak Minor changes in mediawiki.py. 2010-07-10 Sergey Poznyakoff Minor fix. * app/python/mediawiki.py: Enforce utf-8 encoding. 2010-07-07 Sergey Poznyakoff Version 2.1 * NEWS, README, THANKS: Update. * configure.ac: Raise version number. * lib/Makefile.am (libdico_la_LDFLAGS): Update. Minor change * modules/python/python.c: Fix indentation. Improve mediawiki matching. * app/python/mediawiki.py (match_word): Use strat selector, if it is available. Return sorted results. Make sure the [0] of the result is 'match' (to avoid misinterpreting eventual match results for the word 'define'). Minor changes * NEWS: Update. * modules/template.scm (match-word): Fix definition. * po/POTFILES.in: Add new files. * tests/Makefile.am (EXTRA_DIST): Add example.py 2010-07-02 Sergey Poznyakoff Version 2.0.92 * configure.ac, NEWS: Version 2.0.92 * doc/dico.texi: Document LDAP. * dicod/main.c: Minor fix. Fix typos in debugging messages. Use encrypted passwords for authentication, if the underlying GSASL mechanism allows that. * configure.ac: Cjeck for crypt.h and -lcrypt. * dicod/ckpass.c: New file. * dicod/Makefile.am (dicod_SOURCES): Add ckpass.c * dicod/dicod.h (dicod_check_password): New proto. * dicod/gsasl.c (cb_validate): Use dicod_check_password instead of comparing plaintext passwords. * dicod/ident.c (decode64_buf): Remove. (ident_decrypt): Use dico_base64_decode. * dicod/main.c (user_db_config): Don't attempt to open uninitialized database. * gnulib.modules: Add crypto/sha1 * include/dico/filter.h (dico_base64_decode) (dico_base64_encode, dico_base64_input): Change signature. (dico_qp_decode, dico_qp_encode): Remove. * lib/base64.c (dico_base64_input): Rewrite. (dico_base64_decode): Rename to static _flt_base64_decode. (dico_base64_encode): Rename to static _flt_base64_encode. (dico_base64_decode,dico_base64_encode): New functions. * lib/qp.c (dico_qp_decode, dico_qp_encode): Static. 2010-07-01 Sergey Poznyakoff Bugfix * modules/ldap/ldap.c (db_get_groups): Fix typo. Implement LDAP user database. * configure.ac: Check for openldap. * dicod/Makefile.am (dicod_SOURCES): Remove udb.c * dicod/udb.c: Move to lib (with changes). * dicod/auth.c: Update calls to dico_udb_ * functions. * dicod/gsasl.c: Likewise. * dicod/dbtext.c (dbtext_open): Add 3rd parameter. (text_udb_def): Change type. * dicod/dicod.h (udb_def): Remove struct. (dicod_user_db_t) (user_db, udb_init, udb_create, udb_open) (udb_close, udb_get_password, udb_get_groups) (udp_define): Remove. See dico/udb.h * dicod/loader.c (dicod_load_module): Minor fix. * dicod/main.c (user_db): Change data type. (kwd_user_db): New keyword "options". (user_db_config): Do not create user database at once, wait untill the modules have been loaded. (init_user_db): New function. (main): Call init_user_db. * dicod/ostream.c (ostream_write): Remove unused variable. * include/dico.h: Include udb.h * include/dico/Makefile.am (pkginclude_HEADERS): Add udb.h * lib/Makefile.am (libdico_la_SOURCES): Add udb.c. * modules/Makefile.am [LDAP_COND] (LDAP_DIR): New variable. (SUBDIRS): Add LDAP_DIR * modules/ldap/ldap.c: New file. * modules/ldap/Makefile.am: New file. 2010-06-30 Sergey Poznyakoff Allow the use of an external strategy as the default one. * dicod/main.c (default_strategy_name): New variable. (set_defstrat): Remove. (keywords): Change handling of the default-strategy statement. (main): Set default strategy after all modules have been loaded, to allow for using external strategies. 2010-06-29 Sergey Poznyakoff Update docs. 2010-06-28 Sergey Poznyakoff Minor fix. * am/gsasl.m4: Use AC_CACHE_VAL instead of AC_CACHE_CHECK. 2010-06-27 Sergey Poznyakoff * configure.ac: Distribute bz2 and xz tarballs. Improve the previous commit. * include/dico/strat.h (dico_key): New struct. (dico_key_deinit, dico_key_init) (dico_key_match): New proto. * include/dico/types.h (dico_select_key): Moved to strat.h as dico_key, with edits. (dico_select_t): Change signature. * lib/key.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add key.c * modules/dict.org/dictorg.c: Reflect recent changes. Use dico_key_* functions. * modules/guile/guile.c: Likewise. (dico-key?, dico-key->word, dico-make-key): New functions. * modules/outline/outline.c: Reflect recent changes. Use dico_key_* functions. * modules/python/python.c: Reflect recent changes. Use dico_key_* functions. * dicod/dicod.c (soundex_sel): Reflect recent changes. * dicod/lev.c (lev_sel): Likewise. * dicod/regex.c (regex_sel): Likewise. * modules/stratall/stratall.c: Likewise. * modules/substr/substr.c: Likewise. * app/python/mediawiki.py (match_word): Likewise. * tests/example.scm: Likewise. * tests/dicod.cfin: Load stratall and substr. Change strategy selector calling convention. Strategy selectors often need to keep selection specific data, i.e. such data that remain in effect (although not necessarily invariant) between DICO_SELECT_BEGIN and DICO_SELECT_END calls. These data do not belong to the strategy itself, therefore it is necessary to introduce a specific data type for them. An example of a strategy that uses this approach is regexp, which needs to store the compiled expression somewhere. * dicod/dicod.c (soundex_sel): Change signature. Use key->call_data to keep call-specific data. * dicod/lev.c (lev_sel): Likewise. * dicod/regex.c (regex_sel): Likewise. * include/dico/types.h (dico_select_key): New struct. (dico_select_t): Change signature. Take struct dico_select_key * as 2nd arg. * modules/dict.org/dictorg.c (_match_all): Rewrite to use new calling sequence. * modules/guile/guile.c (_guile_select_key_tag): New tag. (dico_scm_from_select_key): New function. (_guile_select_key_free, _guile_select_key_print): New methods. (_guile_init_select_key): New function. (dico-select-key?, dico-select-key-word): New functions. (dico-strat-select?): Key is either a string or a selection key. (_guile_selector): Rewrite to use new calling sequence. (mod_match): Likewise. * modules/outline/outline.c (outline_match_all): Rewrite to use new calling sequence. * modules/python/python.c (PySelectionKey): New object. (strat_select_method): Rewrite to use new calling sequence. (_python_selector): Likewise. (mod_match): Likewise. * modules/stratall/stratall.c (all_sel): Rewrite to use new calling sequence. * modules/substr/substr.c (substr_sel): Likewise. * tests/example.py (match_word): 3rd arg is a selection key. * tests/example.scm (match-selector): 3rd arg is a selection key. (match-word): Update. Move Guile support to gint. * am/guile.m4: Remove * gint: New module. * bootstrap.conf: Unconditionally call git submodules. * Makefile.am: Use gint. * configure.ac: Likewise. * modules/guile/Makefile.am: Likewise. * modules/guile/guile.c: Use SCM_DEFINE_PUBLIC everywhere. (_guile_init_funcs): Include guile.x instead of declaring the stuff manually. (all functions): Use lowercase parameter names. Refer to them in docstrings using @var. * modules/guile/.gitignore: New file. Bugfixes. * include/dico/utf8.h (utf8_wc_strchr) (utf8_wc_strchr_ci, utf8_wc_strstr): Fix return types. * lib/utf8.c: Likewise. Improve conditional module builds. * configure.ac (GUILE_COND,PYTHON_COND): New conditionals. (BUILD_DICO_GUILE_MODULES) (BUILD_DICO_PYTHON_MODULES): Remove. * modules/Makefile.am [GUILE_COND]: Define GUILE_DIR. [PYTHON_COND]: Define PYTHON_DIR. (SUBDIRS): add $(GUILE_DIR) and $(PYTHON_DIR) instead of the literal dirs. * modules/guile/Makefile.am: Define mod_LTLIBRARIES unconditionally. * modules/python/Makefile.am: Likewise. Implement `substr' strategy. Re-implement the `all' strategy as a module. * configure.ac: Version 2.0.91 (AC_CONFIG_FILES): Add Makefiles in modules/stratall/ and modules/substr. * NEWS: Version 2.0.91 * dicod/dicod.c: Remove the built-in `all' strategy. * dicod/loader.c (dicod_load_module0): If DICO_CAPA_NODB capability is set, the module must have only the dico_init method. (dicod_init_database): Prohibit the use of DICO_CAPA_NODB modules. * include/dico/types.h (DICO_CAPA_NODB): New capability. * include/dico/utf8.h (utf8_wc_strchr, utf8_wc_strchr_ci) (utf8_wc_strstr, utf8_wc_strupper) (utf8_wc_strlower): New prototypes. * lib/utf8.c (utf8_wc_strchr, utf8_wc_strchr_ci) (utf8_wc_strstr, utf8_wc_strupper) (utf8_wc_strlower): New functions. * modules/Makefile.am (SUBDIRS): Add stratall and substr. * modules/stratall/Makefile.am: New file. * modules/stratall/stratall.c: New file. * modules/substr/Makefile.am: New file. * modules/substr/substr.c: New file. * tests/dicod.cfin: Use prepend-load-path. Bugfixes. * modules/guile/guile.c (scm_dico_strat_select_p): Swap key and word arguments in a call to sel. * modules/python/python.c (strat_select_method): Likewise. * tests/example.scm: Use srfi-1. Use filter-map instead of mapcan. (match-selector): : Swap key and word arguments in a call to dico-strat-select? 2010-06-26 Sergey Poznyakoff New configuration statement "prepend-load-path". * dicod/dicod.h (prepend_load_path): New extern. * dicod/loader.c (dicod_loader_init): Add prepend_load_path before DICO_MODDIR. * dicod/main.c (prepend_load_path): New variable. (keywords): New keyword. * NEWS, doc/dico.texi: Update. Fix counting output octets in dicod. * include/dico/stream.h (DICO_IOCTL_BYTES_IN) (DICO_IOCTL_BYTES_OUT): New ioctls. * lib/stream.c (dico_stream_bytes_in) (dico_stream_bytes_out): First try ioctl. If it fails, return bytes_in (bytes_out). * lib/fltstream.c (filter_flush): Reset level to 0. (filter_ioctl): New function. (filter_stream_create): Set ioctl method. * lib/gsaslstr.c (_gsasl_ioctl): New function. (dico_gsasl_stream): Set ioctl method. * lib/xscript.c (transcript_ioctl): Handle DICO_IOCTL_BYTES_IN and DICO_IOCTL_BYTES_OUT. * dicod/loader.c (dicod_match_word_db) (dicod_match_word_all, print_definitions): Update total_bytes_out. * dicod/ostream.c (ostream): New member. (ostream_write): Don't modify total_bytes_out. (ostream_ioctl): New function. (dicod_ostream_create): Initialize nout to the number of octets output so far by the transport stream. Set ioctl method. 2010-06-25 Sergey Poznyakoff Bugfixes. * dicod/loader.c (dicod_load_module0): Save handle. * lib/stream.c (dico_stream_seek, dico_stream_read) (dico_stream_write): Return immediately if the stream is in permanent error state. * lib/xscript.c (transcript_close): Close both underlying streams. 2010-05-24 Sergey Poznyakoff Speed up output procedure in dictorg. Provide a general-purpose mechanism to address iterators by item number in O(|n-pos|) time. * include/dico/list.h (dico_iterator_prev) (dico_iterator_item, dico_iterator_position): New prototypes. * lib/list.c (list_entry) : New member. (iterator) : New member. (dico_iterator_position): New function. (_iterator_increase_pos): New static. (dico_iterator_first): Initialize pos to 0. (dico_iterator_next): Increase pos. (dico_iterator_prev,dico_iterator_item): New function. (_dico_list_append): Initialize ep->prev. (_dico_list_prepend): Initialize ep->prev. Call _iterator_increase_pos to tell iterators to update their recorded positions. (_dico_list_remove): Rewrite removal code using next & prev pointers. (_dico_list_insert_sorted): Update next & prev pointers. Call _iterator_increase_pos. * modules/dict.org/dictorg.h (result) : New member. * modules/dict.org/dictorg.c (common_match) (suffix_match, _match_all): Initialize itr. (mod_output_result): Use iterator to avoid rescanning the list on each call. (mod_free_result): Destroy the iterator. * lib/utf8.c (utf8_strcasecmp, utf8_strncasecmp): Break the loop if alen or blen is zero. This means that one of the operands is not utf8, but try to return meaningful value anyway. 2010-05-23 Sergey Poznyakoff Housekeeping work. * NEWS: Document new features and bugfixes. * dico/.gitignore, tests/.gitignore: Update. 2010-05-23 Wojciech Polak Improve Dicoweb. * dicoweb/dicoclient/dicoclient.py (define): Allow for empty descriptions in response. * dicoweb/static/opensearch.xml: Move to templates and make it dynamic. * dicoweb/views.py (opensearch): Add view. 2010-05-23 Sergey Poznyakoff Filter out duplicate matches. * include/dico/list.h (DICO_LIST_COMPARE_HEAD) (DICO_LIST_COMPARE_TAIL): New define. (dico_list_set_flags) (dico_list_get_flags): New proto. * lib/list.c (dico_list): New member. (dico_list_create): Initialize flags. (dico_list_set_flags) (dico_list_get_flags): New functions. (_dico_list_append,_dico_list_prepend): New auxiliary functions. (dico_list_append,dico_list_prepend): Rewrite. Use flags to define whether to compare the data with the tail (head). Set errno to EEXIST and return 1 if attempting to add a duplicate entry. (_dico_list_insert_sorted): Use _dico_list_append and _dico_list_prepend instead of their public counterparts. * modules/dict.org/dictorg.c (common_match): Take additional argument that defines whether duplicate entries should be filtered out. All callers updated. (suffix_match,_match_all): Filter out duplicates. (mod_define): Call common with unique=0. 2010-05-23 Wojciech Polak Minor Dicoweb changes. * dicoweb/settings.py: Rename to settings-sample.py * dicoweb/static/dicoweb.js: Bugfix. * dicoweb/static/dicoweb.css: Minor changes. * dicoweb/templates/base.html: Likewise. * dicoweb/templates/index.html: Likewise. 2010-05-23 Sergey Poznyakoff Minor fixes. * configure.ac: Version 2.0.90 Call gl_INIT before checking for data types. Check for socklen_t. * NEWS: Version 2.0.90 * dico/connect.c (dict_auth): Return 1 if everything else fails. * dico/dico-priv.h (print_version, print_version_only): New protos. * dicod/dicod.h (server_addrlen, client_addrlen): Change type to socklen_t. * dicod/server.c (dicod_server): Change type of addrlen to socklen_t. * include/dico/utf8.h (utf8_char_width, utf8_iter_first) (utf8_wctomb, utf8_symcmp, utf8_symcasecmp, utf8_strcasecmp) (utf8_strncasecmp): Use (unqualified) char in argument lists. All uses updated. * lib/utf8.c: Likewise. * dico/lookup.c: Silence gcc warnings about diff in signedness. * dicod/ident.c: Likewise. * lib/tokenize.c: Likewise. * lib/xstream.c: Likewise. * modules/dict.org/dictorg.c: Likewise. * modules/dict.org/dictstr.c: Likewise. * modules/outline/outline.c: Likewise. * modules/guile/guile.c: Remove unused functions and variables. * utils/getopt.m4 (print_help): Avoid gcc warning about condition always true. Fix indentation in lib/utf8.c Avoid using fixed-size buffer in dictorg.c. Fixes bug reported by Marc Dequènes (debian #582708). * modules/dict.org/dictorg.c (read_index): Use dico stream instead of FILE to avoid using fixed-size buffer. Fix improper handling of conversion errors in levenshtein.c (debian #582692) * include/dico/utf8.h (utf8_mbstr_to_wc) (utf8_mbstr_to_norm_wc): Change signature. * lib/utf8.c (utf8_mbstr_to_wc) (utf8_mbstr_to_norm_wc): Take additional return argument. Return error code. All callers updated. * lib/levenshtein.c (dico_levenshtein_distance): conv returns non-zero (not necessarily negative) value on errors. Minor fixes. * include/dico/strat.h (dico_get_default_strategy): Remove const from return type. * lib/strat.c (dico_get_default_strategy): Likewise. * lib/fdstream.c (fd_seek): Fix error condition. * lib/fltstream.c (filter_write): Return error code. * lib/stream.c (dico_stream_read_unbuffered): Initialize rc. 2010-05-01 Sergey Poznyakoff Bugfixes. * dicod/main.c: Fix recursive invocation. * dicod/pp.c (preprocess_config): Terminate debugging message with a \n. 2010-04-07 Wojciech Polak Minor fix. * dicoweb/views.py: Fix the list of accepted languages. 2010-03-29 Sergey Poznyakoff Minor fix. * doc/dico.texi: Fix typos and improper uses of @pxref. 2010-03-26 Sergey Poznyakoff Normalize exit codes. * gnulib.modules: Add sysexits * lib/xalloc-die.c: Exit with code EX_OSERR. * utils/getopt.m4 (GETOPT): Provide optional `opterr' argument. * dicod/cmdline.opt (get_options): Exit with EX_USAGE in case of unhandled option. * dicod/config-lex.l: Move includes to the '%top' block. Define YY_EXIT_FAILURE. * dicod/dicod.c (sig_alarm): Exit with EXIT_TIMEOUT. * dicod/dicod.h: Include sysexits.h. * dicod/main.c (main): Normalize exit codes. * dicod/pp.c: Likewise. * dicod/server.c: Normalize exit codes. (print_status): Handle 'time out' exit code separately. Print informational message. * doc/dico.texi (Exit Codes): New section. * NEWS: Update. 2010-03-14 Sergey Poznyakoff Do not use deprecated/internal Guile features. * am/guile.m4 (MU_CHECK_GUILE): Remove leftovers from pre-1.8 times. Check for SCM_DEVAL_P, SCM_BACKTRACE_P, SCM_RECORD_POSITIONS_P and SCM_RESET_DEBUG_MODE, define GUILE_DEBUG_MACROS if all these are available. Check for scm_t_off (Guile 1.9) * modules/guile/guile.c (apply_data): New struct. (apply_catch_body): New function. (eval_catch_body): Remove. (guile_call_proc): Use apply_catch_body as body. ![HAVE_SCM_T_OFF]: Define scm_t_off. (_make_dico_port): Rewrite using scm_new_port_table_entry. (_dico_port_seek): Change prototype. Second arg is scm_t_off. (mod_init)[GUILE_DEBUG_MACROS]: Protect the use of SCM_DEVAL_P and friends. (all functions): Use scm_from_locale_string instead of the deprecated scm_makfrom0str. 2010-03-09 Sergey Poznyakoff Keep namespace clean. * modules/dict.org/crc.h: Prefix all function names with `dicod_' to avoid name clashes. 2010-01-02 Sergey Poznyakoff Update copyright years. Happy GNU Year! 2009-11-05 Wojciech Polak Improve mediawiki.py * app/python/mediawiki.py: Drop ns_mediawiki usage. 2009-10-29 Sergey Poznyakoff Fix doc/Commit * doc/Commit (gray_print_section): Output anchors before chapter/section/etc. titles, so that the heading menu in monolithic document works properly. 2009-10-23 Sergey Poznyakoff Documentation fixes. * Config: New file. * doc/Makefile.am: Make manual a phony target. Add man-tar rule. * doc/dico.texi: Minor changes to improve html output. * doc/gendocs_template: Rewrite for the new site design. 2009-10-18 Wojciech Polak Simplify dicoweb.wsgi. 2009-10-16 Wojciech Polak Simplify dicoweb settings. * dicoweb/settings.py: Automatically determine paths. 2009-10-14 Sergey Poznyakoff Fix ACL code. * dicod/acl.c (_parse_sockaddr): Fix netmask calculation. (_check_sockaddr): Fix comparison for AF_INET. 2009-09-27 Sergey Poznyakoff Minor changes * Makefile.am: Update ChangeLog rule * configure.ac: Require autoconf 2.63, automake 1.11. Enable silent rules. * dico/connect.c (dict_match): Properly handle successful return from XLEV command. 2009-03-29 Sergey Poznyakoff Version 2.0 * configure.ac: Version 2.0 * Makefile.am (make-ChangeLog): Remove rule * NEWS, README: Update. * doc/dico.texi: Update. 2009-03-28 Sergey Poznyakoff Minor fix 2009-03-14 Sergey Poznyakoff Minor fixes 2009-03-09 Sergey Poznyakoff Use git:// url for wit Various organizational changes * bootstrap.conf: Init and update wit submodule. * configure.ac: Version 1.99.97 (AC_INIT): Spell full name as 'GNU dico' (lowercase), in order to help the `po' machinery recognize the project as official GNU one (po/Makefile.in.in uses a primitive `grep 'GNU @PROJECT@' ../*', so actually any file containing this string would do). * NEWS: Update. * Makefile.am (SUBDIRS): Remove makedict. It is not yet needed. (EXTRA_DIST): Add app and dicoweb. * po/POTFILES.in: Remove makedict. * dicod/acl.c: Provide a translators comment. * modules/dict.org/dictorg.c: Fix typo. 2009-03-08 Wojciech Polak Add mediawiki.py -- a Python module for a remote access to Wikipedia. Add Dicoweb -- a web search interface. 2009-01-13 Sergey Poznyakoff Change documentation license to GFDLv1.3+ 2008-12-20 Sergey Poznyakoff Minor fix. * dico/cmdline.opt: Fix --sasl and --nosasl definitions. Remove --strats alias. Use --strat(egies) instead. 2008-12-19 Sergey Poznyakoff Fix qp Base64 fix. * lib/base64.c (dico_base64_encode): Fix calculation of the number of consumed bytes. Fix filter encoding. * include/dico/filter.h (filter_xcode_t): Remove last two parameters. Filter stream is now responsible for keeping track of line widths. (dico_base64_decode,dico_base64_encode) (dico_qp_decode,dico_qp_encode): Update. * lib/base64.c (dico_base64_decode): Remove line_max and pline_len. (dico_base64_encode): Likewise. (dico_base64_stream_create): Set minimal input length to 3. It is valid for encoding. Decoding remains a fixme. * lib/qp.c (dico_qp_decode, dico_qp_encode): Remove last two parameters. * lib/fltstream.c (struct filter_stream): New members inbuf and inlevel. (filter_flush): New function. Keep track of line lengths. (filter_write0): New function. (filter_write,filter_wr_flush): Rewrite using filter_flush. (filter_stream_destroy): New method. (filter_stream_create): Initialize inbuf and inlevel. * dicod/ident.c: Update call to dico_base64_decode. 2008-12-18 Wojciech Polak Implement dico_result_headers in Python module. * modules/python/python.c (_assoc_to_dict, _dict_to_assoc, mod_result_headers): New functions. * modules/template.py (result_headers): New optional method. 2008-12-17 Sergey Poznyakoff Allow modules to return or modify MIME headers for definition results. * dicod/loader.c (print_definitions): Use mp->dico_result_headers to get headers from the module. (mime_headers_cb): Allow 8bit encoding. * dicod/ostream.c: Handle 8bit encoding. * include/dico/assoc.h (dico_assoc_clear, dico_assoc_dup): New prototypes. * include/dico/list.h (dico_list_clear): New prototype. * include/dico/types.h (struct dico_database_module): New method dico_result_headers. * lib/assoc.c (dico_assoc_clear, dico_assoc_dup): New functions. (_dico_assoc_find_n): Allow for assoc==NULL. (dico_assoc_destroy): Likewise. * lib/header.c (dico_header_parse): Allow for text==NULL. * lib/list.c (dico_list_clear): New function. (dico_list_destroy): Use dico_list_clear. (dico_iterator_remove_current): Bugfix: use default comparator. * modules/guile/guile.c: Implement dico_result_headers. * tests/example.scm: Likewise. 2008-12-16 Sergey Poznyakoff Rewamp list and assoc support. Keep MIME headers in an assoc list. * include/dico/assoc.h (struct dico_assoc): Key is const (DICO_ASSOC_CI, DICO_ASSOC_MULT): New defines. (dico_assoc_append,dico_assoc_find_n): New functions. (dico_assoc_iterator, dico_assoc_remove_n): New functions. (dico_header_parse): New function. * include/dico/list.h (dico_list_destroy): Change signature. (dico_list_set_free_item) (dico_list_set_comparator,dico_list_get_comparator): New functions. (dico_list_insert_sorted): Change signature. (dico_list_locate,dico_list_remove): Change signature. (_dico_list_locate): New function. (dico_iterator_create): Rename to dico_list_iterator (dico_iterator_remove_current): Change signature and return type. * dico/strat.h (dico_strat_name_cmp): Change signature. (dico_strat_free): New proto. * dico/types.h (dico_assoc_list_t): New type. * include/xdico.h (xdico_assoc_append, xdico_assoc_add): New protos. * lib/header.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add header.c * lib/assoc.c: Major rewrite. * lib/list.c: Associate free_item and compare_item functions with the list. * dicod/dicod.h (dicod_database_t): Remove content_type and content_transfer_encoding. Change type of mime_headers to dico_assoc_list_t. (CONTENT_TRANSFER_ENCODING_HEADER): New define. (dicod_ostream_create): Takes two arguments. * dicod/ostream.c: Rewrite using dico_assoc_list_t for headers. * dicod/main.c: Update calls to list/assoc functions. (kwd_load_module): Remove content-type and content-transfer-encoding. Load mime-headers through a callback, with checking. * dicod/commands.c: Update calls to dicod_ostream_create. * dicod/lang.c: Likewise. * dicod/loader.c: Likewise. * dico/autologin.c: Update calls to list/assoc functions. * dico/connect.c: Likewise. * dico/saslauth.c: Likewise. * dicod/accesslog.c: Likewise. * dicod/acl.c: Likewise. * dicod/alias.c: Likewise. * dicod/auth.c: Likewise. * dicod/capa.c: Likewise. * dicod/config-gram.y: Likewise. * dicod/dbtext.c: Likewise. * dicod/dicod.c: Likewise. * dicod/gsasl.c: Likewise. * dicod/markup.c: Likewise. * dicod/pp.c: Likewise. * dicod/udb.c: Likewise. * lib/markup.c: Likewise. * lib/strat.c: Likewise. * lib/url.c: Likewise. * lib/userprivs.c: Likewise. * lib/utf8.c: Likewise. * modules/dict.org/dictorg.c: Likewise. * modules/outline/outline.c: Likewise. 2008-11-30 Sergey Poznyakoff Fix output in mime mode. * dicod/config-lex.l: Ignore m4 line statemens appearing within a here-doc. * dicod/loader.c (outproc_t): New argument "data" (dicod_word_first, dicod_word_all): Likewise (dicod_match_word_db, dicod_match_word_first): Update calls to lower-level functions. (dicod_match_word_all): Create a separate output stream. (print_matches): Do not create ostream for each database. 2008-11-29 Sergey Poznyakoff Allow to pass additional headers for MIME output * dicod/dicod.h (struct dicod_database): New member mime_headers (dicod_ostream_create): Change signature * dicod/main.c (kwd_database): New keyword "mime-headers" * dicod/ostream.c (struct ostream): New member "headers". (print_headers): Print ostream->headers, if given. (dicod_ostream_create): Initialize ostream->headers. * dicod/commands.c, dicod/lang.c, dicod/loader.c: Update calls to dicod_ostream_create. * doc/dico.texi: Minor changes. 2008-11-28 Sergey Poznyakoff Bugfix * dicod/commands.c (dicod_show_server): Avoid passing NULL server_info to stream_write_multiline (dicod_status): Add a space before 'No timing data available' 2008-10-31 Sergey Poznyakoff Fix precedence of '*' in language statements (both config and module) Improvements in Python module * modules/python/python.c (dico_methods): Typecast to shut up a gcc warning. (_tuple_to_langlist, mod_lang): Handle lists. Be more strict at checking. Add more diagnostics. * tests/example.py (class DicoModule): New member langlist. New method lang. * tests/example.text: Add language definitions. Allow to use * as a synonym to empty list (meaning "all languages") * dicod/config-lex.l: Add * to symbols allowed in non-quoted strings. * dicod/dicod.h (dicod_any_lang_list_p): New prototype. * dicod/loader.c (dicod_any_lang_list_p): New function. (dicod_get_database_languages): "*" is equvalent to empty list. * dicod/main.c (fix_lang_list): Likewise. 2008-10-25 Sergey Poznyakoff Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/dico * modules/guile/guile.c (mod_lang): Fix return value 2008-10-24 Wojciech Polak Implement dico_db_lang in Python module. * modules/python/python.c (_tuple_to_langlist, mod_lang): New functions. * modules/template.py (lang): New optional method. 2008-10-24 Sergey Poznyakoff Bugfixes. * dicod/main.c (fix_lang_list): Disable dico_db_lang if at least one of language lists is given in the config. * modules/guile/guile.c (mod_lang): Fix return value. 2008-10-19 Sergey Poznyakoff * dicod/config-gram.y: Allow for empty lists. 2008-10-18 Sergey Poznyakoff Further improvement of language extensions. * dicod/dicod.h (DICOD_DBF_LANG): New define. (struct dicod_database): Replace lang with langlist[2] (languages from -> to). (dicod_lang_check, dicod_get_database_languages): Change proto. (dicod_langlist_copy): New proto. * dicod/lang.c (dicod_lang_preferences): Remove. (dicod_lang_lazy_prefs, dicod_lang_prefs): New variables. (dicod_lang_check): Change arguments. (dicod_lang, dicod_show_lang_pref, dicod_show_lang_info): Implement using new preference system. * dicod/loader.c (dicod_langlist_copy): New function. (dicod_get_database_languages): Change signature. * dicod/main.c (fix_lang_list): Change signature. (main): Call fix_lang_list for both langlist parts. (kwd_database): Replace languages with languages-from/languages-to. (dicod_database_free): Reflect changes to struct dicod_database. * include/dico/types.h (struct dico_database_module): Change arguments and return type of dico_db_lang. * modules/guile/guile.c: Update * modules/outline/outline.c: Update * modules/template.c: Update. * modules/template.scm: Update. * tests/example.db: Update. Implement language extensions. * dicod/lang.c: New file. * dicod/Makefile.am: Add lang.c * dicod/dicod.h (struct dicod_database): New member lang. (DICOD_MAXPARAM_INF): New define. (register_lang, dicod_lang_check): New prototypes. (dicod_get_database_languages): New prototype. * dicod/loader.c (dicod_get_database_languages): New function. * dicod/main.c (set_database): Create and fixup language list. (kwd_database): New keyword 'languages'. (check_db_visibility): Use dicod_lang_check to determine if the database is visible. (dicod_database_free): Free lang list. (main): Call register_lang. * dicod/commands.c (dicod_handle_command): Allow maxparam to be DICOD_MAXPARAM_INF, in which case any number of parameters, greater than minparam, is allowed. * dicod/capa.c (dicod_capa_flush): Take a NULL terminated array of commands to declare. * dicod/auth.c, dicod/lev.c, dicod/markup.c, dicod/mime.c, dicod/xidle.c, dicod/xversion.c: Update definitions of cmd to match changes in dicod/capa.c. * include/dico/list.h (dico_list_t, dico_iterator_t): Move to types. * include/dico/types.h (struct dico_database_module): New member dico_db_lang. * include/xdico.h (dicod_free_item): New prototype. * lib/xutil.c (dicod_free_item): New function. * modules/dict.org/dictorg.c (dictorg module): Reserve a slot for dico_db_lang. * modules/python/python.c (dictorg module): Reserve a slot for dico_db_lang. * modules/guile/guile.c: Implement dico_db_lang. Use scm_to_locale_string instead of deprecated scm_i_string_chars. * outline/outline.c: Implement dico_db_lang. * modules/template.c: Implement dico_db_lang. * modules/template.scm: Implement dico_db_lang. * tests/devils.out: Add Languages section. * tests/example.db: Add language definition. * tests/example.scm (db:get): New rule 'lang' (lang): New function. (example-init): Init "lang" 2008-10-09 Sergey Poznyakoff Allow to override some settings from the command line. * dicod/cmdline.opt: New options --transcript and --no-transcript. (get_options): Take three arguments. * dicod/dicod.h (get_options): Take three arguments. * dicod/main.c (init_conf_override, apply_conf_override): New functions. (main): Use conf_override to override some configuration statements from the command line. 2008-09-30 Sergey Poznyakoff Fix UTF-8 handling in SHOW DB output. * dicod/commands.c (_show_database): Use utf8_quote, not quotearg. * include/dico/utf8.h (utf8_wc_to_mbstr): Change prototype. (utf8_quote, utf8_wc_quote): New functions. * lib/utf8.c (utf8_quote, utf8_wc_quote): New functions. (utf8_wc_to_mbstr): Change signature. (utf8_mbstr_to_wc): fix indentation. * modules/dict.org/dictstr.c (stream_get16, stream_get32): Static. Reflect available markup types in capability string. * dicod/dicod.h (markup_flush_capa): New function. * dicod/main.c (main): Call markup_flush_capa. * dicod/markup.c (markup_flush_capa): New function. * lib/markup.c (dico_markup_valid_name_p): New function. (dico_markup_register): Enforce valid markup names. * modules/guile/guile.c (dico-register-markup): Reflect changes to the return value of dico_markup_register. Minor fixes. * dicod/config-lex.l: Improve "stray character" diagnostics. * include/dico/strat.h (struct dico_strategy): Add comments. 2008-09-28 Wojciech Polak Changes to Python module. * modules/python/python.c (dico_register_markup, dico_current_markup): New functions. 2008-09-28 Sergey Poznyakoff Implement html output in examples. * lib/markup.c (dico_markup_register): Store a copy of the string. * modules/guile/guile.c (_guile_strategy_create): Remove. (dico-register-markup, dico-current-markup): New functions. * tests/example.scm (output): Implement rudimentary html output. Implement experimental OPTION MARKUP command. * dicod/markup.c: New file * dicod/Makefile.am (dicod_SOURCES): Add markup.c * dicod/dicod.h (register_markup): New function. * dicod/main.c (main): Call register_markup. * include/dico/markup.h: New file * include/dico/Makefile.am (pkginclude_HEADERS): Add markup.h * include/dico/types.h: Minor formatting changes. * include/dico.h: Include dico/markup.h * lib/markup.c: New file * lib/Makefile.am (libdico_la_SOURCES): Add markup.c 2008-09-24 Wojciech Polak Improve stdout capture in Python module. * modules/python/python.c (_capture_stdout_info): New function. 2008-09-24 Sergey Poznyakoff Bugfix * modules/guile/guile.c (mod_init): Move call to dico_parseopt to after Guile initialization. 2008-09-23 Sergey Poznyakoff Minor fix Changes to Guile module. * modules/guile/guile.c (mod_init_db): Accept init-script, init-args and init-fun options. * tests/dicod.cfin (numerals): Rename to plnum. (cznum): New database. * tests/example.scm (open-module): Reflect changes to guile.c * tests/example.text: Use Czech numerals, to discern from example.db * doc/dico.texi: Update. Various changes. * NEWS: Update version number. * README: Mention Python. * configure.ac: Raise version number to 1.99.96. Check for python-config. Define BUILD_DICO_GUILE_MODULES and BUILD_DICO_PYTHON_MODULES, instead of the corresponding _DIRs. * doc/dico.texi: Mention Python. Provide a placeholder for a new section. * doc/libdico.texi (utf8_mbstr_to_norm_wc): New deftypefn * modules/Makefile.am (SUBDIRS): Unconditionally list guile and python * modules/guile/Makefile.am: Build if BUILD_DICO_GUILE_MODULES is defined. (AM_LDFLAGS): Add -rpath to force libtool build a shared library. * modules/python/Makefile.am: Build if BUILD_DICO_PYTHON_MODULES is defined. (AM_LDFLAGS): Add -rpath to force libtool build a shared library. * modules/dict.org/dictorg.c, modules/guile/guile.c, modules/python/python.c: Mark all functions as static. * lib/levenshtein.c (dico_levenshtein_distance): Fix Damerau part (again). * tests/levtest.c: New file. * tests/Makefile.am (noinst_PROGRAMS): Add levtest. * tests/example.py: New file. * tests/example.text: New file. * AUTHORS: Add Wojciech. 2008-09-22 Wojciech Polak Add Python support. * configure.ac: Check for Python. * modules/Makefile.am (SUBDIRS): Add python. * modules/python/Makefile.am: New file. * modules/python/python.c: New file. Python module. * modules/template.py: New file. A Python module template. 2008-09-21 Sergey Poznyakoff Update Minor fix 2008-09-20 Sergey Poznyakoff Minor fix. * dicod/loader.c (dicod_load_module0): Use lt_dlopenadvise and set `global' advise. 2008-09-19 Sergey Poznyakoff Improve dico_parseopt. * include/dico/parseopt.h (DICO_PARSEOPT_PARSE_ARGV0) (DICO_PARSEOPT_PERMUTE): New macros. * lib/parseopt.c (dico_parseopt): Take two additional arguments: flags and pindex. Return index of the first non-optional argument in *pindex. Use flags to modify the operation. * modules/dict.org/dictorg.c: Update calls to dico_parseopt. * modules/guile/guile.c: Likewise. * doc/libdico.texi: Update. 2008-09-12 Sergey Poznyakoff Bugfix * dicod/config-lex.l: Make sure stray characters are displayed correctly in diagnostic messages. 2008-09-10 Sergey Poznyakoff Update devdict.out Update. * doc/dico.texi: Document the strategy statement. * tests/devils.out: Minor fix. 2008-09-08 Sergey Poznyakoff Bugfix. * lib/argcv.c (argcv_quoted_length): Set *quote if input string has zero length. Bugfix. * .gitignore: Remove po * modules/dict.org/dictorg.c (compare_prefix): Do not match strings shorter than the requested prefix. (common_match, suffix_match, _match_all): Ignore reserved words, if requested. 2008-09-07 Sergey Poznyakoff Fix Damerau-Levenshtein strategy, implement new strategies. * dicod/lev.c: Implement "normalized" Levenshtein and Damerau-Levenshtein strategies, i.e. such that assume equality between runs of whitespace characters, no matter what their length. * include/dico/utf8.h (DICO_LEV_NORM, DICO_LEV_DAMERAU): New defines. (utf8_mbstr_to_norm_wc) New function. * lib/levenshtein.c (dico_levenshtein_distance): Fix Damerau-Levenshtein algorithm. Change semantics of the 3rd argument. * lib/utf8.c (utf8_mbstr_to_norm_wc): New function. 2008-09-06 Sergey Poznyakoff Bugfix * lib/strat.c (dico_strategy_create): Fill allocated memory with zeros. 2008-08-31 Sergey Poznyakoff Allow to restrict the use of default matches that may cause considerable strain on the server (e.g. MATCH * prefix ""). * NEWS, configure.ac: Version 1.99.95 * dico/func.c (check_disconnect): Remove duplicate condition. * dicod/Makefile.am (dicod_SOURCES): Add stratcl.c * dicod/stratcl.c: New file. * dicod/config-gram.y (string_to_unsigned): Additional argument `locus'. All callers updated. * dicod/dicod.c: New exterimental strategy `all'. * dicod/dicod.h (string_to_unsigned): New proto. (enum cmp_op): New data type. (stratcl_add_word, stratcl_add_cmp) (stratcl_add_disable, stratcl_check_word): New functions. * dicod/loader.c (dicod_word_first, dicod_word_all): Check if this word is allowed for searches using this strategy. * dicod/main.c (flush_strat_forward_fn, destroy_strat_forward_fn) (flush_strat_forward, strategy_cb, strategy_deny_all_cb) (strategy_deny_word_cb, strategy_deny_length) (strategy_deny_length_lt_cb, strategy_deny_length_le_cb) (strategy_deny_length_gt_cb, strategy_deny_length_ge_cb) (strategy_deny_length_eq_cb, strategy_deny_length_ne_cb): New functions. (kwd_strategy): New configuration keywords: deny-all, deny-worddeny-word, deny-length-lt, deny-length-le, deny-length-gt, deny-length-ge, deny-length-eq, deny-length-ne. (keywords): New block statement: strategy (main): Call flush_strat_forward * dico/strat.h (struct dico_strategy): New member: stratcl (dico_strat_name_cmp): New function. (dico_strategy_create): New function. * lib/strat.c (strat_name_cmp): Rename to dico_strat_name_cmp. Make global. (dico_strategy_create): New function. (dico_strategy_dup): Use dico_strategy_create. 2008-08-11 Sergey Poznyakoff Improve security when using anonymous authentication. * dicod/dicod.h (sasl_anon_groups): New declaration. * dicod/gsasl.c (sasl_anon_groups): New variable. (struct sasl_data): New data type. (sasl_auth): Pass a pointer to struct sasl_data to gsasl callback as a hook. Make sure group info for anonymous users is not searched in the user database. Use sasl_anon_groups instead. (cb_validate, callback): Adopt the change of hook data type. * dicod/main.c (kwd_sasl): sasl-disable-mechanism and sasl-enable-mechanism renamed to disable-mechanism and enable-mechanism, respectively. (anon-group): New statement. 2008-08-10 Sergey Poznyakoff Bugfix. * configure.ac: Call AM_ICONV before AM_GNU_GETTEXT. 2008-08-09 Sergey Poznyakoff Version 1.99.94 Bugfix. * dico/saslauth.c (callback): Handle GSASL_ANONYMOUS_TOKEN. Bugfixes. * dicod/dicod.h (sasl_realm): New declaration. * dico/saslauth.c (callback): Add missing callbacks. * dicod/gsasl.c (sasl_realm): New variable. (callback): Add missing callbacks. * dicod/main.c (kwd_sasl): New keyword `realm'. Improve SASL configurability. * dicod/config-gram.y (string_to_bool): Make extern. * dicod/dicod.h (string_to_bool): New prototype. (sasl_enable, sasl_enabled_mech, sasl_service): New declarations. * dicod/gsasl.c (sasl_enable, sasl_enabled_mech, sasl_service): New variables. (disabled_mechanism_p): A mechanism state is controlled by two lists: sasl_enabled_mech and sasl_disabled_mech. (callback): sasl_service keeps service name. (init_sasl_1): Initialize sasl_service. (register_sasl): sasl_enable controls whether SASL is enabled. * dicod/main.c: New configuration file block statement `sasl'. Remove debugging hooks Bugfixes in SASL-related code. * dico/saslauth.c (selectmech): Do not use _free_el to deallocate elements of impl. This avoids duplicate calls to free. (sasl_free_data): Do nothing if *pdata is NULL. * dicod/gsasl.c (callback): Fix coredump. * lib/xutil.c (xdico_sasl_capa_match_p): Use c_strcasecmp. Finish implementing GSASL streams. * include/gsaslstr.h: New file. * include/Makefile.am: Add gsaslstr.h. * configure.ac: Require gettext 0.17 Define BUILD_LIBDICOSASL and LIBDICOSASL if SASL is required. * dico/Makefile.am, dicod/Makefile.am: Link with LIBDICOSASL. * dico/connect.c, lib/xscript.c: Use new IOCTL codes. * dico/saslauth.c: Include gsaslstr.h (do_gsasl_auth): Insert GSASL stream on success. * dicod/commands.c (dicod_remove_command): New function. * dicod/dicod.c (replace_io_stream): New function. (dicod_loop): I/O stream is static variable instead of the automatic, so that authentication functions can reset it. * dicod/dicod.h (replace_io_stream, dicod_remove_command): New variables. * dicod/gsasl.c: Include gsaslstr.h (sasl_auth): Call gsasl_finish on failure. (dicod_saslauth): Insert GSASL stream on success. * include/dico/diag.h (DICO_DBG_CTL_SET_FILE) (DICO_DBG_CTL_SET_LINE, DICO_DBG_CTL_SET_TS): Remove. * include/dico/stream.h (DICO_IOCTL_GET_TRANSPORT) (DICO_IOCTL_SET_TRANSPORT) (DICO_DBG_CTL_SET_FILE, DICO_DBG_CTL_SET_LINE) (DICO_DBG_CTL_SET_TS): New defines. * include/xdico.h (XSCRIPT_CTL_GET_TRANSPORT) (XSCRIPT_CTL_SET_TRANSPORT): Remove. * lib/Makefile.am (noinst_LIBRARIES): Add @BUILD_LIBDICOSASL@ * lib/gsaslstr.c (struct g_buf): New member pos. (g_buf_ptr, g_buf_level, g_buf_drop): Take into account pos. (g_buf_advance): New macro. (_gsasl_read): Fix buffering. (dico_gsasl_stream): Set line buffering. (insert_gsasl_stream): New function. * lib/stream.c (dico_stream_read): If the stream is line buffered, break the reading loop after receiving a newline character. 2008-08-06 Sergey Poznyakoff Implement GSASL stream. * lib/gsaslstr.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add gsaslstr.c. Remove obsolete linebuf code. * include/dico/lbuf.h, lib/linebuf.c: Remove. * include/dico/Makefile.am, include/dico.h: Remove lbuf.h * lib/Makefile.am: Remove linebuf.c * dicod/dicod.c, dicod/server.c: Remove duplicate calls to dico_stream_set_buffer. * lib/dbgstream.c: Include sys/time.h 2008-08-04 Sergey Poznyakoff Update docs Improve server debugging. * dicod/dicod.c (dicod_loop): Log session start and end if debug level is set. * dicod/dicod.h (debug_level): Remove. Declared in xdico.h. * dicod/main.c (debug_source_info, debug_stream): New variables. (main): Initialize debug_stream. * dicod/pp.c: Use debugging macros. * dicod/server.c (handle_connection): Remove an outdated fixme comment. * dicod/cmdline.opt (source-info): New option. Minor fix. * dicod/server.c (handle_connection): Move call to query ident_name to ... * dicod/dicod.c (dicod_loop): ... here Fix AUTH I/O in dicod. * dicod/accesslog.c: New directive %d. * dicod/dicod.h (ident_timeout): New declaration. * dicod/ident.c: Use non-blocking I/O. * dicod/main.c (ident_timeout): New global variable. (keywords): New keyword ident-timeout. * dicod/udb.c (udb_open): Do not coredump on NULL argument. * doc/dico.texi: Reflect recent changes. * THANKS: Reformat for GNU standards. 2008-08-02 Sergey Poznyakoff Improve debugging. * dico/connect.c (dict_read_reply): Remove superfluous call to XDICO_DEBUG. * dico/dico-priv.h (ds_verbose): New prototype. * dico/func.c (ds_verbose): New function. * dico/shell.c (verbose): New command. (filename): const. (script_diag, parse_script_file): Minor fix. Improve debugging. * lib/dbgstream.c: Include microseconds in timing output. Merge branch 'master' of ssh://git.gnu.org.ua/gitroot/dico Improve debugging. * dico/cmdline.opt: New option --time-stamp. * include/dico/diag.h (DICO_DBG_CTL_SET_TS): New define. * lib/dbgstream.c: Optionally print timestamp information. Add more debugging to the client. * configure.ac, NEWS: Version 1.99.93 * lib/dbgstream.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add dbgstream.c. * dico/autologin.c, dico/connect.c, dico/dico.c, dico/lookup.c, dico/saslauth.c, * include/dico/diag.h (dico_dbg_stream_create): New prototype. (DICO_DBG_CTL_SET_FILE, DICO_DBG_CTL_SET_LINE): New defines. (DICO_DEBUG_SINFO): New macro. * lib/xscript.c (transcript_ioctl): Fix typo. * include/xdico.h (XSCRIPT_CLT_GET_TRANSPORT) (XSCRIPT_CLT_SET_TRANSPORT): (debug_level, debug_source_info, debug_stream): New declarations. (XDICO_DEBUG) (XDICO_DEBUG_F1 through XDICO_DEBUG_F4): New macros. * dico/cmdline.opt: New options --verbose (-v) and --source-info. 2008-07-31 Sergey Poznyakoff Add po * po/.gitignore: New file. * po/POTFILES.in: New file. 2008-07-30 Sergey Poznyakoff Bugfix * dicod/ident.c (query_ident_name): Return NULL if bind failed. * dicod/server.c (handle_connection): Move the call to query_ident_name to a proper place. 2008-07-28 Sergey Poznyakoff Dico is dubbed GNU package 2008-07-24 Sergey Poznyakoff Version 1.99.92 Update docs. * README: Update. * doc/dico.texi: Update. Finish SASL support. * dico/autologin.c (parse_autologin): Support for new keywords: realm, service and host. * dico/cmdline.opt: New options --sasl, --nosasl. * dico/connect.c (dict_auth): Rewrite authention to avoid dependency from "auth" capability. (auth_cred_free): Free new auth_cred members. (get_credentials): Rename to auth_cred_get, make global. * dico/dico-priv.h (struct auth_cred): New fields service, realm and hostname. (GETCRED_OK, GETCRED_FAIL, GETCRED_NOAUTH): New defines. (auth_cred_get, auth_cred_free): New prototypes. (set_bool): Change return type to int. (ds_sasl): New prototype. (saslauth): Change signature. * dico/func.c (set_bool): Change return type to int. (ds_sasl): New function. * dico/saslauth.c (callback): Use new auth_cred members. (saslauth): Rename to saslauth0. (saslauth, sasl_enable, sasl_enabled_p): New functions. * dico/shell.c: Add `sasl' command. * dicod/main.c (get_full_hostname): Moved to libxdico. * include/xdico.h (xdico_local_hostname): New prototype. * lib/Makefile.am (libxdico_a_SOURCES): Add xhostname.c. Minor fix. Implement SASL in client. * dico/saslauth.c: New file. * dico/Makefile.am (dico_SOURCES): Add saslauth.c * dico/autologin.c (parse_autologin): Bugfix. * dico/connect.c (dict_auth): Rename to apop_auth. (dict_auth): New function. (get_credentials): Fill cred with zeros. (dict_connect): Initialize obstack before eventual authentication. * dico/dico-priv.h (AUTH_OK, AUTH_FAIL, AUTH_CONT): New defines. (saslauth): New proto. * dico/func.c (ds_show_info): Remove unused variable. * dicod/dicod.h (struct dicod_command): Rename nparam to minparam. Add new member maxparam. * dicod/auth.c, dicod/commands.c, dicod/lev.c, dicod/mime.c, dicod/xidle.c, dicod/xversion.c: Reflect changes to struct dicod_command. * dicod/gsasl.c (send_challenge): Do not send zero-length data (don't know if I'm right here). (get_sasl_response): Bugfixes. (sasl_auth): Prevent coredump. (callback): Fix. (xlate_mech_to_capa): Move to libxdico. * include/xdico.h (xdico_sasl_mech_to_capa) (xdico_sasl_capa_match_p): New protos. * lib/stream.c (dico_stream_read_unbuffered): Return EIO if stream has hit EOF and user does not check for the number of bytes read. * lib/utf8.c (strlen): Remove. How did it get there??? * lib/xutil.c (xdico_sasl_mech_to_capa) (xdico_sasl_capa_match_p): New functions. 2008-07-23 Sergey Poznyakoff Implement SASL framework (unfinished). * am/gsasl.m4: Enable GSASL by default, if available. Export GSASL_LIBS. * configure.ac: Check for gsasl. Display a configuration summary before exiting. * dicod/gsasl.c: New file. * dicod/Makefile.am (dicod_SOURCES): Add gsasl.c (LDADD): Add GSASL_LIBS. * dicod/dicod.h (get_input_line, register_sasl): New functions. (sasl_disabled_mech): New extern. * dicod/main.c (keywords): New keyword sasl-disable-mechanism. (main): Call register_sasl. * dico/Makefile.am (LDADD): Add GSASL_LIBS * dico/dico-priv.h (struct auth_cred): New fields sasl and mech. (AUTOLOGIN_MECH): New define. * dico/autologin.c (parse_autologin): Rewrite to allow for multi-line statements. Handle new auth_cred fields. 2008-07-22 Sergey Poznyakoff Minor changes. * dico/dico-priv.h, dico/func.c (ds_show_info): New function. * dico/pager.c: Setting pager to "-" disables it. * dico/shell.c (funtab): Add info command. * dico.texi: Update. * doc/libdico.texi (utf8_strbytelen): Remove. * lib/tokenize.c, lib/utf8.c, lib/xstream.c: Use strlen instead of the removed utf8_strbytelen. Minor fix Check the spelling Improve autologin mode. * configure.ac (--with-netrc-file): Rename to --with-autologin-file. (DEFAULT_NETRC_NAME): Rename to DEFAULT_AUTOLOGIN_FILE. * dico/connect.c (get_credentials): Consult session-specific autologin first, the default one afterwards. Return a three-state value. All callers updated. * dico/dico-priv.h (AUTOLOGIN_USERNAME, AUTOLOGIN_PASSWORD) (AUTOLOGIN_NOAUTH): New defines. (parse_netrc): Rename to parse_autologin. * dico/netrc.c: Rename to dico/autologin.c (parse_netrc): Rename to parse_autologin. Return additional information in *pflags. Support `noauth' keyword. * doc/dico.texi: Finish documenting dico. 2008-07-21 Sergey Poznyakoff Minor change. * dico/connect.c, dico/dico-priv.h (ds_tilde_expand): New function. * dico/func.c (ds_autologin): Perform tilde expansion. * doc/dico.texi, doc/libdico.texi: Update. Fix history handling in Dico and provide a couple of new commands. * dico/connect.c (dict_connect): Initialize conn->fd. * dico/dico-priv.h (struct dict_connection): Add fd member to be able to select on it. (ds_pager): New prototype. * dico/func.c (check_disconnect): New function. (ensure_connection): Call check_disconnect first. * dico/pager.c (ds_pager): New function. (create_pager_stream): Prefer internal pager setting over the environment variable. * dico/shell.c: Fix history handling. (prompt, pager): New commands. * doc/dico.texi: Document interactive mode. Implement command history. * dico/shell.c: Implement history commands. 2008-07-19 Sergey Poznyakoff Update I18n. * include/.gitignore: New file. * include/Xaw.h: Remove. * include/appi18n.h, include/libi18n.h, lib/appi18n.c, lib/libi18n.c: New files. * .gitignore: Add po * Makefile.am (SUBDIRS): Add po * NEWS: Update. * bootstrap.conf: I18n * configure.ac: Check for gettext. (AC_CONFIG_FILES): Add po/Makefile.in Link gnu/gettext.h to include. * dico/dico-priv.h: Include appi18n.h * dico/dico.c (main): Call appi18n_init * dicod/Makefile.am (LDADD): Add LIBINTL (INCLUDES): Add -I../gnu * dicod/dicod.h: Include appi18n.h dicod/main.c (main): Call appi18n_init * include/Makefile.am (noinst_HEADERS): Add appi18n.h and libi18n.h * include/dico/diag.h, lib/diag.c (dico_die): format argument is const. * include/xdico.h (appi18n_init): New prototype. * lib/Makefile.am (INCLUDES): Add -I../gnu (libdico_la_SOURCES): Add libi18n.c (libxdico_a_SOURCES): Add appi18n.c * lib/iostr.c, lib/parseopt.c, lib/userprivs.c: Include libi18n.h. Call _dico_libi18n_init. * lib/xstream.c: Include libi18n.h. * makedict/makedict.h: Include appi18n.h (main): Call appi18n_init * modules/dict.org/Makefile.am (INCLUDES): Add -I$(top_builddir)/include * modules/guile/Makefile.am: Likewise. * modules/outline/Makefile.am: Likewise. * modules/dict.org/dictorg.h: Include appi18n.h * modules/guile/guile.c: Likewise. * modules/outline/outline: Likewise. Bugfix. * dico/connect.c (get_credentials): Avoid freeing the result from getpass. 2008-07-18 Sergey Poznyakoff Bugfix. * doc/dico.c (fixup_url): Use xdico_assign_string to initialize host. 2008-07-17 Sergey Poznyakoff Minor fixes. * dico/cmdline.opt: Reword the docstring for --levdist and --quiet. * dico/connect.c (get_credentials): Ask for password if it is not given. * doc/dico.texi: Begin documenting dico client. * doc/libdico.texi (url): Update. * gnulib.modules: Require getpass-gnu * lib/url.c (url_get_user): Allow `;' to delimit username and password, as requested by RFC2229. (url_parse_dico_request): /d-type urls do not have :strat part. Minor change. * dico-priv.h, func.c, shell.c (script_error) (script_warning): Remove unused first argument. Add `--quite' option and `quiet' initialization command. * dico/cmdline.opt: New option --quiet. * dico/dico-priv.h (quiet_option): New declaration. (set_bool): New prototype. * dico/dico.c (quiet_option): New variable. * dico/shell.c (helptext): New variable. (funtab): New command `quiet'. (ds_prefix): Exclude # from allowed characters for command prefix. (ds_help): Improve output. (_command_generator): Skip commands without documentation strings. Improve matching. * dico/connect.c (dict_result_free): Allow for null argument. * dico/dico-priv.h (struct dict_connection): New member match_result. (dict_run_single_command): Change type to void. (ensure_connection, ds_define_nth): New prototypes. * dico/func.c (ds_match): Store match result in conn->match_result. If no argument, or an empty argument is given, re-display previous result. Prefix a list of matches from the same database with the database name. Prefix each match with its ordinal number, so it can be picked up using it later. (ds_define_nth): New function. * dico/lookup.c (print_reply): Make extern. Discern 'no match' from other replies. (print_match_result): New function. * dico/shell.c (parse_script_file): A single number means define the Nth element from the previous match. Improve readline completion in the client. * dico/connect.c (dict_transcript): New function. (dict_connect): Use dict_transcript. (dict_define, dict_match): Fix second argument in call to dict_result_create. * dico/dico-priv.h (struct dict_connection): New members `transcript', `db_result', and `strat_result'. (struct funtab): New type (from shell.c). (dict_transcript, print_result) (find_funtab, dict_completion_matches) (ds_compl_database, ds_compl_strategy): New prototypes. * dico/func.c (get_list): New function. (ensure_connection): Get and cache database and strategy information. (ds_compl_strategy, ds_compl_database): New functions. (ds_transcript): Actually toggle transcript. (ds_show_db, ds_show_strat): Show cached results. * dico/lookup.c (print_result): Make extern. * dico/shell.c (struct funtab): Move definition to dico-priv.h (funtab): Imitialize completion functions. (ds_help): Minor fix. (parse_script_file): Pass the complete input line to default define and match. (_command_completion): Rewrite. (dict_completion_matches): New function. * include/dico/stream.h (dico_stream_set_ioctl) (dico_stream_ioctl): New prototypes. * include/xdico.h (XSCRIPT_CLT_GET_TRANSPORT) (XSCRIPT_CLT_SET_TRANSPORT): New define. * lib/stream.c (struct dico_stream): New field `ctl'. (dico_stream_set_ioctl): New function. (dico_stream_flush): Don't coredump if stream is NULL. (dico_stream_ioctl): New function. * lib/xscript.c (transcript_flush): Return immediately if transport is NULL. (xdico_transcript_stream_create): Install ioctl handler. Minor change. * dico/func.c: Ensure the connection is opened before sending commands to the server. 2008-07-16 Sergey Poznyakoff Minor changes. * dico/dico-priv.h (dict_define, dict_match) (dict_run_single_command): New prototypes. (ds_show_db, ds_show_strat): New prototypes. * dico/func.c (ds_show_db, ds_show_strat): New functions. * dico/lookup.c (dict_lookup_url): Call dict_conn_close. (dict_run_single_command): New function. (dict_single_command): Read final response code. * dico/shell.c: New commands ls and ld. Update .gitignores Implement general-purpose result structure. * dico/connect.c (dict_connect): Always initialize stk. (dict_define, dict_match): New functions. (dict_multiline_reply): Remove second arg. Do not push current buf on stack. (dict_result_create, dict_result_free): New functions. (dict_conn_close): Reflect changes to the connection structure. * dico/dico-priv.h (struct match_result) (struct define_result, dict_result): New data types. (struct dict_connection): New fields levdist, last_result. Remove stk_init. Document all fields. (dict_result_create, dict_result_free): New prototypes. (dict_conn_last_result): New macro. * dico/lookup.c (print_definitions): Remove. (print_multiline): Remove. (print_result): New function. (dict_lookup): Rewrite using new result functions. Add informational functions. * dico/dico-priv.h, dico/func.c, dico/shell.c: Implement version and warranty commands. * utils/getopt.m4 (print_version_only): New function. Minor change. * dico/dico-priv.h, dico/func.c, dico/shell.c (ds_distance): New function. * dico/lookup.c (dict_lookup): Bugfix. Implement match and defines in shell mode. * dico/dico-priv.h, dico/lookup.c (dict_lookup): Rename to dict_word. (dict_lookup): New function. (ds_define, ds_match): New functions. * dico/dico.c: Update uses of dict_lookup * dico/func.c (ds_define, ds_match): New functions. * dico/shell.c : Improve help output. (cmdprefix): Do not initialize. This lets init scripts use commands without leading prefix. (parse_script_file): Use shortcuts for define and match. Provide an interactive dico shell. * configure.ac: Check for readline. * dico/func.c, dico/shell.c: New files. * dico/Makefile.am (dico_SOURCES): Add them. (LDADD): Add $READLINE_LIBS. * dico/cmdline.opt: Use xdico_assign_string to initialize string values. * dico/connect.c (get_homedir): Change to extern. * dico/dico-priv.h: Add new prototypes. * dico/dico.c (fixup_url): Use xdico_assign_string to initialize string values. (main): Call parse_init_scripts. Switch to shell mode if no arguments given. * dico/netrc.c (skipws): Change to extern. * dicod/config-lex.l (unquote_char, quote_char): Move to the library. All uses changed. * dicod/dicod.c (tokenize_input): Move to the library. All uses changed. * include/dico/utf8.h: Include ctype.h. * include/xdico.h (xdico_unquote_char, xdico_quote_char): (xdico_tokenize_begin, xdico_tokenize_end, xdico_tokenize_input): New protos. * lib/tokenize.c: New file. * lib/Makefile.am (libxdico_a_SOURCES): Add tokenize.c * utils/getopt.m4 (print_version): Change to extern. Remove superfluous 'Written by' clause. Minor change. * lib/assoc.c, lib/util.c, lib/xlat.c, lib/xutil.c: Fix copyright headers. 2008-07-15 Sergey Poznyakoff Handle .netrc file in dico. Some minor improvements. * configure.ac: New option --with-netrc-file * dico/Makefile.am (dico_SOURCES): Add netrc.c. * dico/netrc.c: New file. * dico/cmdline.opt: The --strategy option implies --match. New option --autologin. * dico/connect.c (dict_auth): Take struct auth_cred * as its second argument. (dict_connect): If an autologin file is given, consult it for user credentials. * dico/dico-priv.h (struct auth_cred): New data type. (user, key): Replace with default_cred. All uses updated. (autologin_file): New declaration. * dico/dico.c (main): Report a warning if incorrect number of arguments is given. * dicod/commands.c (_show_database, _show_strategy): Quote descriptions. * dicod/dicod.h: Include quotearg.h. * dicod/main.c (main): Set default quoting style. Provide a default dict server address. * configure.ac (DEFAULT_DICT_SERVER): New variable. * dico/Makefile.am (AM_CPPFLAGS): Define DEFAULT_DICT_SERVER * dico/dico.c (fixup_url): Use DEFAULT_DICT_SERVER, if no server was specified. Implement --levdist option. * dico/cmdline.opt: New option --levdist. * dico/dico-priv.h (levenshtein_threshold): New declaration. * dico/dico.c (levenshtein_threshold): New variable. * dico/lookup.c (dict_lookup_url): Set Levenshtein distance, if supported. Bugfix. * utils/getopt.m4 (OPTION): Quote invocation of `prep'. Bugfix. * dico/lookup.c (dict_lookup_url): Fix slot allocation for MATCH command. 2008-07-14 Sergey Poznyakoff Implement authentication. * README, TODO: Update. * dico/cmdline.opt: Handle --noauth option. * dico/connect.c (parse_initial_reply): Fix storing of the msgid. * dict_connect: Authenticate if necessary. * dico/dico-priv.h (noauth_option): New declaration. * dico/dico.c (noauth_option): New variable. Bugfix * util/getopt.m4 (OPTION): Apply prep to DOCSTRING here, instead of in BEGIN. Bugfix Forgottent to add. * lib/xstream.c: New file. Implement command-line version of dico. * dicod/fdio.c: Move ... * lib/fdiostr.c: ... there. * dicod/xscript.c: Move ... * lib/xscript.c: ... there. * dicod/Makefile.am, lib/Makefile.am: Reflect the move. * dico/connect.c: New file. * dico/lookup.c: New file. * dico/pager.c: New file. * lib/xstream.c: New file. * dico/Makefile.am (dico_SOURCES): Add connect.c, lookup.c, pager.c * dico/cmdline.opt: New options --source and --transcript. (get_options): Do not intialize *index. * dico/dico-priv.h: Add new prototypes. (host, port, database, strategy): Replace by dico_url. * dico/dico.c (host, port, database, strategy): Replace by dico_url. (transcript, source_addr): New globals. (main): Add missing implementations. * dicod/config-gram.y, dicod/server.c: Use DICO_DICT_PORT instead of DICT_PORT. * dicod/dicod.c (stream_writez, stream_printf) (stream_write_multiline): Move to lib/xstream.c * icod/dicod.h (DICT_PORT): Remove. (fd_stream_create, stream_writez, stream_printf) (stream_write_multiline): Remove. * dicod/loader.c (dicod_word_first): Bugfix: break on the first non-empty result. * gnulib.modules: Add quote and quotearg. * include/dico/stream.h (dico_fd_stream_create): Change signature. (dico_fd_io_stream_create): New proto. * include/dico/types.h (DICO_DICT_PORT): New define. * include/xdico.h (xdico_transcript_stream_create, stream_writez) (stream_printf, stream_write_multiline): New protos. * lib/url.c: Fix copyright header. * utils/getopt.m4 (GETOPT): Fix handling of 3rd argument. Rename dico/main.c * dico/main.c: Rename to ... * dico/dico.c: ... this. * dico/Makefile.am: Reflect the rename. Minor additions to the client. * dico/cmdline.opt: Initialize dico globals. * dico/dico-priv.h (enum dico_client_mode): New type. (DICO_CLIENT_ID): New define. (host, port, database, strategy, user) (key, client, req, mode): New declarations. * dico/main.c (host, port, database, strategy, user) (key, client, req, mode): New variables. (dico_lookup): New function placeholder. (main): Call dico_lookup. Improve URL parsing. * include/dico/url.h (DICO_REQUEST_DEFINE, DICO_REQUEST_MATCH): New defines. (struct dico_request): New data type. (struct dico_url): Add port and request. * lib/url.c: Parse `dict://' urls. (url_get_host,url_get_user): Bug fix. (url_get_passwd): Remove. (dico_url_destroy): Free the request. Bugfix. * lib/logstream.c (dico_log_stream_create): Remove unused variable. * utils/getopt.m4: Remove debugging comments. 2008-07-13 Sergey Poznyakoff Start writing dico client. * dico/Makefile.am, dico/cmdline.opt, dico/dico-priv.h, dico/main.c: New files. * Makefile.am, configure.ac: Add dico subdirectory. * lib/logstream.c (dico_log_stream_create): Bugfix. * utils/getopt.m4: Allow to define aliases for the options. * dicod/cmdline.opt: Add c-mode marker for Emacs. 2008-07-09 Sergey Poznyakoff Cleanup * configure.ac: Remove unnecessary variables. * makedict/Makefile.am, makedict/main.c: Remove INPUTDICTPATH and DICTPATH defines. * modules/guile/guile.c (silent_close_port): Remove unused function. Remove unnecessary directories and files. * client, fonts: Removed * utils/bdfextract.pl, utils/mkbushufont.awk * utils/Makefile.am: Remove bdfextract.pl and mkbushufont.awk. Fix documentation. * doc/libdico.texi: Fix erroneous deftypefns. 2008-07-08 Sergey Poznyakoff Minor fix. * doc/libdico.texi: Fix incorrect deftypefn usage. Minor improvement. * dicod/Makefile.am (dicod_SOURCES): Add xidle.c and xversion.c * dicod/cmdline.opt (OPTIONS_BEGIN): Fix canonical program name. * dicod/dicod.h (register_xidle, register_xversion): New prototypes. * dicod/main.c (dicod_xversion, register_xversion): Move to a separate file. (main): Call register_xidle. * dicod/xidle.c: New file. Implementation of XIDLE command. * dicod/xversion.c: New file. Implementation of XVERSION command. * doc/dico.texi (inactivity-timeout): Add an anchor. * doc/proto.texi: Document XIDLE command. 2008-07-06 Sergey Poznyakoff Move dico log streams to the library. Redirect guile errors to logs. * dicod/logstr.c: Rename to ... * lib/logstream.c: ... this. (log_stream_create): Rename to dico_log_stream_create. * dicod/Makefile.am (dicod_SOURCES): Remove logstr.c. * dicod/dicod.c (dicod_loop): Use dico_log_stream_create. * dicod/dicod.h (log_stream_create): Remove proto. * doc/libdico.texi (diag): Add a template for dico_log_stream_create. * include/dico/diag.h (dico_log_stream_create): New prototype. * lib/Makefile.am (libdico_la_SOURCES): add logstream.c. * modules/guile/guile.c: Implement `log ports'. (guile_exit_script, guile_outfile): Remove. (init_option): Remove unused option `exit-script'. Remove `outfile' option. (mod_init): Call _guile_init_dico_log_port; Redirect current output and error ports to log. * bootstrap.conf: Mention make ChangeLog in the template. 2008-07-04 Sergey Poznyakoff Add .bootstrap to .gitignore Reorganize docs. * doc/Makefile.am (dico_TEXINFOS): Add libdico.texi * doc/libdico.texi: New file. * doc/dico.texi: Minor changes. Use dico_free_db method. * dicod/dicod.c, dicod/dicod.h (dicod_server_cleanup): New function. * dicod/loader.c (dicod_free_database): Fix return value. * dicod/main.c (main): Call dicod_server_cleanup when dicod_inetd finishes. * dicod/server.c (dicod_server): Call dicod_server_cleanup before terminating. * doc/dico.texi: Update. Minor changes. * doc/Makefile.am: Remove leftover references to dictd. Remove leftovers of dictd.h 2008-07-03 Sergey Poznyakoff Minor changes. * README: Minor changes. Minor changes. * doc/dico.texi: Minor changes. Rename dictd to dicod. Documentation. * doc/dico.texi, doc/proto.texi: Start documenting C API. Resolve several pending xrefs. Namespace cleanup. * dictd/dictd.h, dictd/loader.c, include/dico/types.h, modules/dict.org/dictorg.c, modules/guile/guile.c, modules/outline/outline.c, modules/template.c: Rename `dico_handler_module' to `dico_database_module'. Prefix its members with `dico_', instead of `module_'. * dictd/loader.c (dictd_close_database): Initialize return value to 0. Work on documentation. * dictd/main.c (kwd_user_db): Rename `get-password' to `password-resource', and `get-groups' to `group-resource'. * doc/dico.texi: Document authentication. Housekeeping. * configure.ac, NEWS, README: Change bug-reporting email. * dictd/dictd.c (dictd_close_databases): Remove duplicated function. (close_databases): issue a log notice if dictd_close_database returns failure. * doc/dico.texi: Update. Housekeeping. * doc/Makefile.am (check-options): Improve rule. * doc/check-docs.sh: Squeeze repeated newlines in sed output. Untabify docs. 2008-07-02 Sergey Poznyakoff Work on documentation and examples. * dictd/commands.c: Bugfix. * doc/dico.texi: Describe an example Guile module. * modules/Makefile.am: Rename `sample' to `template'. * modules/sample.scm, modules/sample.c: Rename to ... * modules/template.scm, modules/template.c: ... this. * tests/dictd.cfin: Add database definitions for an example Guile module. * tests/glossary.scm (mapcan): Do not export. 2008-06-28 Sergey Poznyakoff Minor change. * dictd/server.c (handle_connection): Return textual replies to the client if its IP is not allowed to connect and if the server is not able to fork. Improve docs. * doc/dico.texi: Create master menu. * doc/proto.texi: Minor changes. Improve docs. * doc/dico.texi: Spell-check. Resolve hanging xrefs. * doc/proto.texi: Completed. Improve docs. * doc/Makefile.am (dico_TEXINFOS): Add proto.texi. (check-unrevised rule): Scan all texinfo sources. * doc/dico.texi (Dictionary Server Protocol): New appendix. * doc/proto.texi: New file. Bugfixes. * lib/mapstream.c (_mapfile_open): Fix computing open flags. * lib/stream.c (dico_stream_close, dico_stream_destroy): Be robust in case of NULL arguments. Improve --config-help output. * dictd/config-format.c (format_simple_statement): Do not output superfluous <> delimiters. 2008-06-27 Sergey Poznyakoff Bugfix. * modules/dict.org/dictstr.c (_dict_read_dzip): Fix length calculation. Add a sample Guile module. * tests/glossary.scm: New file Pass command line arguments to the Guile init script. * doc/dico.texi (Guile API): Document init-args. * modules/guile/guile.c (init-args): New initialization parameter. (load_path_handler, guile_load): Pass command line to the init script. (dico-strat-select?): Bugfix: swap 2nd and 3rd arguments to the selector. (guile_init_args): New variable. Improve docs. * doc/dico.texi: Document Guile API and Dico Scheme Primitives. 2008-06-25 Sergey Poznyakoff Minimize number of comparisons in suffix strategy. * modules/dict.org/dictorg.c (compare_entry_ptr): New function. (suffix_match): Quicksort the result entries. Remove duplicates. Minor changes. * Makefile.am (ChangeLog rules): Remove eventual '' markers. * modules/dict.org/dictorg.c (init_suffix_index): Run qsort only once. Minor fixes 2008-06-23 Sergey Poznyakoff Implement command aliasing. * dictd/Makefile.am (dictd_SOURCES): Add alias.c * dictd/alias.c: New file. * dictd/commands.c (dictd_handle_command): Expand aliases. * dictd/dictd.h (alias_install, alias_expand): New prototypes. * dictd/main.c (allow_cb, deny_cb, apply_acl_cb, set_user) (set_supp_group, set_mode, set_log_facility, set_dict_handler) (enable_capability, set_defstrat): Improve error handling. (alias_cb): New function. (keywords): New keyword `alias'. * tests/dictd.cfin: Define some aliases and document them. * doc/dico.texi: Document aliasing support. Documentation. * doc/dico.texi: Update docs for Guile module. 2008-06-22 Sergey Poznyakoff Bugfix. * dictd/server.c (dictd_server): Remove pidfile before terminating. Documentation. * TODO: Update. * doc/dico.texi: Document guile module. * modules/Makefile.am (EXTRA_DIST): Add sample.scm * modules/sample.scm: New file. * modules/sample.c: Update. * modules/guile/guile.c: Minor fix in a docstring. 2008-06-21 Sergey Poznyakoff Fix keeping track of input line numbers. * dictd/config-lex.l: Fixup line numbers obtained from m4 #line directives. * dictd/pp.c: Output information used for the above fixup. * dictd/dictd.h (parse_line_cpp, parse_line): Remove prototypes. (install_text): New prototype. Allow to create Scheme matching strategies. * modules/guile/guile.c (dico-register-strat): New function. 2008-06-17 Sergey Poznyakoff Bugfixes. * guile/guile.c (dico-strat-default?): Fix a typo. (init_vtab): Check for SCM_EOL (mod_init): Move constistency checking to mod_init_db. (mod_init_db): Fix the call to init_vtab. Add consistency checking. Attempt to diagnose all missing virtual functions. Provide a way for modules to tell if a default strategy is being used. Fix visibilty of symbols in guile.c * include/dico/strat.h (struct dico_strategy): New field is_default. (dico_strategy_is_default_p): New macro. * include/dico/types.h (dico_strategy_t): Change into a typedef. * lib/strat.c (default_strategy): Remove const qualifier.e (dico_strategy_find): Remove const qualifier from the return type. (dico_set_default_strategy): Clear/set strat->is_default as appropriate. * modules/guile/guile.c (struct _guile_strategy): Remove const qualifier. (dico-strat-description): Fix mistyped Scheme name. (dico-strat-default?): New function. (_guile_init_funcs): Explicitly export all Scheme interfaces. (mod_init_db): Fix inconsistent return type. 2008-06-16 Sergey Poznyakoff Minor fixes. * modules/guile/guile.c: Minor fixes. Use virtual function tables. A database is allowed to have its own interface functions. * modules/guile/guile.c (guile_call_proc): Change type of the second argument. All callers updated. (guile_init_fun): New variable. (guile_proc_name): Change all underscores to dashes. (guile_proc): Remove. (guile_vtab): New type, instead of it. (global_vtab): New variable. (init_vtab): New function. (init_option): Remove function name options. Add `init-fun' option. (mod_init): Initialize global_vtab. (mod_init_db): Initialize database vtab. (mod_match, mod_define, mod_output_result, mod_result_count) (mod_compare_count, mod_free_result): Store pointer to the db in the result. 2008-06-15 Sergey Poznyakoff Revert c665e5de094d4. Was not worth the candles. * dictd/dictd.h (dictd_module_t): Remove. (dictd_module_instance_t): Move there significant fields from dictd_module_t. * dictd/loader.c: Update all uses of the above. * include/dico/types.h (dico_instance_t): Remove. (DICO_CAPA_MULTI_INSTANCE): Remove. (module_init,module_init_db): Revert changes. * modules/dict.org/dictorg.c: Revert changes. * modules/guile/guile.c: Likewise. * modules/outline/outline.c: Likewise. 2008-06-14 Sergey Poznyakoff Minor fix. * modules/guile/guile.c (mod_close, mod_get_text) (mod_match, mod_define): Remove superfluous dbname argument. Allow several module instances to be used simultaneously. * include/dico/types.h (DICO_CAPA_NONE, DICO_CAPA_DEFAULT) (DICO_CAPA_MULTI_INSTANCE): New macros. (dico_handler_module.capabilities): New field. (dico_handler_module.module_init): Change prototype. (dico_handler_module.module_init_db): Change prototype. (dico_instance_t): New typedef. * dict.org/dictorg.c: Reflect changes to include/dico/types.h. * modules/guile/guile.c: Likewise. * modules/outline/outline.c: Likewise. * dictd/config-gram.y (process_ident): Fix error message. * dictd/dictd.c: Rename dictd_handler_t to dictd_module_instance_t. * dictd/dictd.h (handler_list): Rename to modinst_list. (dictd_handler_type): Remove. (dictd_module_t): New data type. (dictd_module_instance_t): New data type. (dictd_handler_t): Remove. (dictd_database): Rename `mod' to `mod_handle'. Remove `handler'. Add `instance'. (database_remove_dependent, dictd_load_module): Change prototypes. * dictd/loader.c (dictd_load_module0): Use table of modules. Pass a pointer to instance handle to module_init. (dictd_load_module): Change argument type. (dictd_init_database): Pass instance handle to module_init_db. (dictd_open_database, dictd_close_database) (dictd_free_database, dictd_get_database_descr) (dictd_get_database_info, dictd_word_first) (dictd_word_all, print_matches, dictd_match_word_db) (print_definitions, dictd_define_word_db): Reflect changes to the internal structure. * dictd/main.c (handler_list): Rename to modinst_list. Remove `handler' keyword. Use `load-module' instead. * tests/dictd.cfin (handler): Rename to `load-module'. * doc/dico.texi: Update. 2008-06-13 Sergey Poznyakoff Documentation improvements. * doc/dico.texi: Document Outline and Dictorg modules. * README, TODO: Minor changes. 2008-06-12 Sergey Poznyakoff Documentation improvements. * dictd/cmdline.opt: Fix docstrings. * doc/macros.texi (opsummary): Generate a comment. * doc/Makefile.am (check-options): Use generated comment as a sed anchor to retrieve the list of documented options. * doc/dico.texi: Resolve some FIXMEs, document operation modes, etc. Various improvements. * dictd/dictd.h (DICTD_LOGGING_ENVAR): New macro. (dictd_log_pre_setup, dictd_log_encode_envar, run_lint): New prototypes. * dictd/main.c (kwd_database, keywords): Rename apply-acl to visibility-acl. (dictd_log_pre_setup, dictd_log_encode_envar): New functions. (main): Call dictd_log_pre_setup. * dictd/pp.c (run_lint): New function. * dictd/server.c (pre_restart_lint, pre_restart_lint_internal): New functions. (server_loop): Restart only if configuration passes lint. * doc/dico.texi: Document security settings and database visibility. Use ACLs to control incoming connections. * dictd/config-lex.l (isemptystr): Allow only ; after the delimiter. * dictd/dictd.h (connect_acl): New extern. * dictd/main.c (connect_acl): New global. * dictd/server.c (handle_connection): Use connect_acl to determine wheter to allow connection. * doc/dico.texi: Document ACLs Finish ACLs. * dictd/acl.c (struct acl_entry): New member acl. (_parse_sub_acl): New function. (_parse_group, _parse_acl, _acl_check): Allow sub-acls. (dictd_acl_check): Second argument gives default result. * dictd/auth.c (dictd_auth): Call check_db_visibility. (init_auth_data): Call reset_db_visibility. * dictd/dictd.c (dictd_loop): Call reset_db_visibility. * dictd/dictd.h (dictd_acl_check): Change signature. (struct dictd_database): Remove require_auth and groups. Add new members acl and visible. (show_sys_info, ssi_group_list): Remove declarations. (check_db_visibility, reset_db_visibility): New functions. (database_visible_p): New macro. * dictd/main.c (ssi_group_list): Remove. (require_auth): Remove. (global_acl): New global. (apply_acl_cb): New function. (kwd_database): Remove require-auth and groups. Add apply-acl. (set_show_sys_info): Remove. (keywords): Remove sys-info-groups and require-auth. Add apply-acl. (reset_db_visibility, check_db_visibility): New functions. (database_visible_p): Remove. * tests/dictd.cfin: Fix here-document syntax. Begin implementing ACLs. * dictd/acl.c: New file. * dictd/Makefile.am (dictd_SOURCES): Add acl.c * dictd/config-gram.y: Allow multiple values after ident. Alsways require a semicolon after MSTRING. * dictd/config-lex.l (isemptystr): Change signature. Allow semicolon or comma after the EOT delimiter. (multiline_begin): Fix calculation of the delimiter length. * dictd/dictd.h (TYPE_ARRAY): New define. (config_value_t): New member arg. (dictd_acl_t): New data type. (dictd_acl_create, dictd_acl_check, dictd_acl_install) (dictd_acl_lookup): New functions. (ssi_mode): Remove. (show_sys_info): Fix declaration. * dictd/main.c (show_sys_info): Change type. (kwd_acl): New keywords. (set_show_sys_info): Argument to show-sys-info is an ACL name. (keywords): New statement `acl'. (show_sys_info_p): Rewrite using dictd_acl_check. * dictd/ident.c (query_ident_name): Remove unused variable. 2008-06-09 Sergey Poznyakoff Improve docs. * dictd/main.c: Add check for valid transfer encoding. * doc/dico.texi: Add summary contents, document `database' statement, finish `Preprocessing' section. Improve docs. * doc/dico.texi: Document pragmatic comments, database modules, tuning and preporcessing. 2008-06-08 Sergey Poznyakoff Improve docs. * dictd/lev.c (register_lev): Rename command to XLEV to match the capability name. * doc/dico.texi: Document logging, access logs, global configuration and capability. * doc/strftime.texi: Resolve @FIXME-pxref. Improve the docs. * dictd/accesslog.c: Fix a typo. * doc/dico.texi: Update. 2008-06-07 Sergey Poznyakoff Improve the docs. * doc/dico.texi: Update. More fixes. * dictd/Makefile.am (AM_CFLAGS): Define LOCALSTATEDIR. * dictd/main.c (pidfile_name): Change the default. (max_children): Provide the default value. (keywords): Fix typo in docstring. Minor improvement. * dictd/config-gram.y (string_to_sockaddr): Allow to use a hostname without port or a port without hostname. Improve configuration parser. * dictd/config-gram.y (string rule): Add IDENT. (config_diag, config_warning): New functions. (config_error): Rewrite using config_diag. * dictd/config-lex.l: Do not require identifier to appear on a new line. Fix '\newline' escapes. Issue error message if stray characters appear in input. Issue warnings if undefined escape sequence is used. * dictd/dictd.h (config_warning): New prototype. Minor changes. * README: Improve. * doc/dico.texi: Improve structure. * configure.ac (LOG_FACILITY): Allow argument in lowercase. Default to LOG_DAEMON. * dictd/main.c (keywords): Fix typo. 2008-06-06 Sergey Poznyakoff Work on documentation structure. * dictd/main.c (config_help): Change docstring. * doc/dico.texi: Documentation framework. 2008-06-05 Sergey Poznyakoff Minor changes. * dictd/accesslog.c (alog_conf_hostname): Print actual server IP address. * dictd/commands.c (dictd_status): Print `dictd' timer. * doc/Makefile.am (dico_TEXINFOS): Add strftime.texi * doc/strftime.texi: New file. * doc/dico.texi: Use makeinfo auto-sectioning capability. 2008-06-03 Sergey Poznyakoff Improve access log output. * dictd/accesslog.c (print_str): Output a dash if fmt is NULL. All callers updated. * dictd/main.c (main): Set dico_argcv_quoting_style to hex. This helps keep access log compatible with Apache and existing log analyzer software. * include/dico/argcv.h (dico_argcv_quoting_style): New enum and global variable. * lib/argcv.c (argcv_quoting_style): New global variable. (argcv_quoted_length, argcv_quote_copy): Take into account argcv_quoting_style. Inplement identity check (RFC 1413). * dictd/Makefile.am (dictd_SOURCES): Add ident.c * dictd/ident.c: New file. * dictd/accesslog.c: Implement %l * dictd/auth.c (init_auth_data): Reset identity_name. * dictd/dictd.h (identity_check, identity_name, ident_keyfile): New externs. (query_ident_name): New proto. * dictd/main.c (identity_check, identity_name, ident_keyfile): New variables. (keywords): New keywords `identity-check' and `ident-keyfile'. * dictd/server.c (handle_connection): Run identity check if required. * gnulib.modules: Add crypto/des. Implement more format specs in access log. * dictd/accesslog.c (sockaddr_to_hostname, sockaddr_to_portname): New functions. (alog_remote_ip): Use sockaddr_to_hostname. (alog_local_ip): Print actual IP of the server that handled the request. (alog_remote_host): Use sockaddr_to_hostname. (alog_server_port): Implement. * dictd/dictd.c (dictd_inetd): Initialize server_addr and server_addrlen. * dictd/dictd.h (UINTMAX_STRSIZE_BOUND): New define. (server_addr, server_addrlen): New externs. * dictd/server.c (struct dictd_server): New data type. (fdtab): Replace with srvtab. (fdcount): Rename to srvcount. (server_addr, server_addrlen): New variables. (handle_connection): Change argument semantics. Initialize server_addr and server_addrlen. Minor fix. * include/xdico.h (timer_get_temp): Remove. * lib/timer.c: Likewise. * dictd/commands.c: Use timer_stop instead of timer_get_temp Implement more access log specifiers. * dictd/accesslog.c (add_instr): Fill allocated memory with 0s. (alog_response_size,alog_response_size_clf,alog_time_ms) (alog_process_time): Implement. (free_cache): Bugfix. P was used uninitialized. * dictd/commands.c (dictd_status): Free the temporary timer. (dictd_match, dictd_define): Initialize total_bytes_out. * dictd/dictd.h: Include inttostr.h (total_bytes_out): New extern. * dictd/loader.c (dictd_match_word_db, dictd_define_word_db): Add missing calls to access_log_status. * dictd/ostream.c (total_bytes_out): New variable. (ostream_write): Update total_bytes_out. Return a meaningful error code. * include/dico/stream.h (dico_stream_bytes_in, dico_stream_bytes_out): New prototypes. * lib/stream.c (struct dico_stream): Remove `offset'. Add new fields `bytes_in' and `bytes_out'. (dico_stream_open, dico_stream_read_unbuffered) (dico_stream_write_unbuffered): Update bytes_in and bytes_out. (dico_stream_bytes_in, dico_stream_bytes_out): New functions. * lib/timer.c (timer_hasher, timer_compare): Use case-insensitive comparison. (DIFFTIME): Make sure the result is double. 2008-06-02 Sergey Poznyakoff Implement access log file. * dictd/Makefile.am (dictd_SOURCES): Add accesslog.c * dictd/accesslog.c: New file. * dictd/auth.c (init_auth_data): Free client_id. * dictd/commands.c (dictd_status): Assign client_id. (dictd_match, dictd_define): Call access_log. * dictd/dictd.c (dictd_inetd): Initialize client_addr and client_addrlen. (dictd_loop): Call access_log_free_cache when finished. * dictd/dictd.h (client_id, access_log_format, access_log_file) (client_addr, client_addrlen): New externs. (get_full_hostname): New proto. (access_log_status, access_log, compile_access_log) (access_log_free_cache): New protos. * dictd/loader.c (dictd_word_first, dictd_word_first, dictd_word_all) (dictd_match_word_db): Call access_log functions. * dictd/main.c (client_id): New global variable. (keywords): New statements access-log-format and access-log-file. (get_full_hostname): Change return variable, remove static qualifier. (main): Update call to get_full_hostname, call compile_access_log. * dictd/server.c (client_addr, client_addrlen): New variables. (handle_connection): Initialize client_addr and client_addrlen. * dictd/xscript.c (transcript_flush): New function. * gnulib.modules: Add fprintftime. * include/xdico.h (xdico_assign_string): New proto. * lib/xutil.c (xdico_assign_string): New function. * tests/dictd.cfin: Configure timing output and access log. 2008-05-31 Sergey Poznyakoff Minor fix. * dictd/pp.c: Fix indentation. (try_file): Bugfix. Preprocess the configuration file. * configure.ac (--without-preprocessor): New option. (DEFAULT_PREPROCESSOR): New variable. * dictd/pp-setup: New file. * dictd/pp.c: New file. * dictd/Makefile.am (dictd_SOURCES): Add pp.c (AM_CFLAGS): Add -DDEFAULT_VERSION_INCLUDE_DIR, -DDEFAULT_INCLUDE_DIR, -DDEFAULT_PREPROCESSOR (EXTRA_DIST): Add pp-setup. (inc_DATA): New var. Add $(PP_SETUP_FILE) * dictd/cmdline.opt: New options --syslog, -E, --preprocessor, --no-preprocessor, --include-dir. * dictd/config-lex.l (fillbuf, ctx_lookup, push_source, pop_source) (get_file_name, config_include): Remove. (YY_INPUT): Change definition. (config_lex_begin): Rewrite using preprocessor interface. (config_lex_end): Empty placeholder. * dictd/dictd.h (getmaxfd): New macro (from server.c). (preprocessor, debug_level, debug_level_str): New externs. (MODE_PREPROC): New constant. (dictd_log_setup, include_path_setup, add_include_dir, parse_line_cpp) (parse_line, pp_init, pp_done, preprocess_config, pp_make_argcv) (pp_extrn_start, pp_extrn_shutdown, pp_fill_buffer): New protos. * dictd/server.c (getmaxfd): Move to dictd.h. * dictd/main.c (debug_level, debug_level_str): New variables. (dictd_log_setup): New function. (main): Call include_path_setup. Handle mode == MODE_PREPROC. * include/dico/argcv.h (dico_argcv_string): 2nd arg is const. * lib/argcv.c: Likewise. * include/dico/diag.h (dico_invocation_name): New extern. * lib/diag.c (dico_invocation_name): New variable. (dico_set_program_name): Set dico_invocation_name. Minor fix. * config-lex.l: \f is a white-space char. Namespace cleanup. * dictd/dictd.h (gd_locus_t): Rename to dictd_locus_t. * dictd/config-gram.y: Likewise. * dictd/config-lex.l: Likewise. * dictd/main.c: Likewise. * dictd/udb.c: Likewise. Minor fix. * dictd/main.c (main): Use log_facility in openlog. Implement STATUS command. * dictd/commands.c (dictd_quit): Use report_current_timing. (dictd_status): New function. (command_tab): Bind dictd_status to STATUS command. * dictd/dictd.h (num_defines, num_matches, num_compares): Remove. (struct dico_stat): New data type. (current_stat, total_stat): New externs. (report_timing): Change signature. (report_current_timing): New function, to be used instead of report_timing. * dictd/loader.c: Use report_current_timing. * dictd/stat.c (num_defines, num_matches, num_compares): Remove. (current_stat, total_stat): New variables. report_timing): Rewrite for general purpose usage. (report_current_timing): New function. Minor fix in guile module. * modules/guile/guile.c (argv_to_scm): Quote each element. (mod_open): Open function takes variable number of arguments. 2008-05-30 Sergey Poznyakoff Improve module interface. * dictd/dictd.c (init_databases): Call dictd_init_database. (dictd_close_databases, open_databases, close_databases): New functions. (dictd_loop): Begin with open_databases and end with close_databases. * dictd/dictd.h (ictd_open_database_handler) (dictd_close_database_handler): Removed. (dictd_init_database, dictd_open_database) (dictd_close_database, dictd_free_database): New protos. * dictd/loader.c (MODULE_ASSERT): New macro. (dictd_load_module0): Improve error diagnostic and cosistency checks. (dictd_open_database_handler): Remove. (dictd_init_database): New function. (dictd_close_database_handler): Remove. (dictd_close_database): New function. (dictd_free_database): New function. * include/dico/types.h (dico_handler_module.version): Change type to unsigned. (module_open): Change signature (module_init_db, module_free_db): New functions. * lib/stream.c (stream_flush_buffer): Fix typo. * modules/dict.org/dictorg.c: Rewrite for new interface. * modules/guile/guile.c: Rewrite for new interface. * modules/outline/outline.c: Rewrite for new interface. Bugfix. * lib/stream.c (_stream_buffer_full_p, _stream_flush_buffer): Fix handling of line buffers. 2008-05-29 Sergey Poznyakoff Minor improvements. * modules/guile/guile.c (_dico_port_close): Call scm_gc_free. (_dico_port_free): Return 0. (mod_open): Return value of #f or '() means failure. 2008-05-28 Sergey Poznyakoff Improve docs. * THANKS, TODO: Update. * dictd/config-format.c: Place a newline before each statement, except ones appearing immediately after an opening curly brace. (format_statement_array): Take an extra argument, specifying whether to begin the output with a newline. * dictd/dictd.h (format_statement_array): Change prototype. (format_docstring): New prototype. * dictd/main.c (config_help): Output an initial heading. Introduce interface version numbering. * include/dico/types.h (DICO_MODULE_VERSION): New define (struct dico_handler_module): New field `version'. * modules/dict.org/dictorg.c: Set interface version number. * modules/guile/guile.c: Likewise. * modules/outline/outline.c: Likewise. * modules/sample.c: Likewise. * lib/Makefile.am (libdico_la_LDFLAGS): Define version-info. Finished guile.c * lib/stream.c (_stream_flush_buffer): Second argument instructs whether to flush all buffer contents in case of line buffers. All callers updated. * modules/guile/guile.c (dico-strat-selector?, dico-strat-select?) (dico-strat-name, dico-strat-descriprion): New Scheme functions. (_guile_init_funcs): New function. (guile_proc_name): New variable. (mod_init): Call _guile_init_funcs. Improve error diagnostics. (mod_match): Call strategy selector if supplied. Minor change. * README: Update. Guile module almost finished. * modules/guile/guile.c: Implement mod_define, mod_match, and the rest of mod_ interfaces. 2008-05-27 Sergey Poznyakoff Develope guile.c * am/guile.m4: Require Guile 1.8 (_stream_fill_buffer): Return a meaningful error code. * modules/guile/guile.c: Implement mod_init, mod_open, mod_close, mod_info and mod_descr. Bugfixes. * bootstrap: Obtain aclocal arguments from Makefile.am * gnulib.modules (xgetdomainname): New module. * lib/stream.c (dico_stream_read_unbuffered): Return EIO if less than size bytes were read and pread is NULL. Add a placeholder for Guile module. * Makefile.am (ACLOCAL_AMFLAGS): Add am. * configure.ac: Check for guile. * am/gsasl.m4, am/guile.m4: New files. * modules/guile/Makefile.am, modules/guile/guile.c: New files. 2008-05-26 Sergey Poznyakoff Minor change. * README-hacking (Debugging): New section. * utils/gud-wrapper: New function. Speed up connection startup in daemon mode. * dictd/dictd.c (dictd_loop): Remove call to dictd_server_init. (dictd_inetd): Fix arguments to dico_stream_set_buffer. * dictd/dictd.h (dictd_server_init.): New proto. * dictd/main.c (main): Call dictd_server_init here. * dictd/server.c (handle_connectiond): Fix arguments to dico_stream_set_buffer. * include/dico/types.h (DICO_MAX_BUFFER): New define. Improve stat info. * dictd/commands.c (dictd_show_server): Show additional statistics about the server. * dictd/dictd.c (dictd_loop): Do not close and destroy the stream, leave it for the caller. * dictd/dictd.h (total_forks): New extern. (ssi_mode): New enum. (show_sys_info, ssi_group_list): New externs. * dictd/main.c (show_sys_info, ssi_group_list): New globals. (show-sys-info, sys-info-groups): New config file statements. (show_sys_info_p, get_full_hostname): New function. (main): Init "server" timer. * dictd/server.c (total_forks): New global. (register_child): Increase total_forks. (stop_all, stop_children): Do nothing if childtab is NULL. (handle_connection): Destroy the stream after dictd_loop terminates. * include/xdico.h (timer_get_temp): New proto. * lib/timer.c (timer_get_temp): New function. * modules/dict.org/dictorg.c (printdef): Improve error checking. Bugfix. * modules/dict.org/dictstr.c (_dict_read_dzip): Update str->offset. Do not show 00-database entries, unless a special option is given. * modules/dict.org/dictorg.c (show_dictorg_entries): New global. (show-dictorg-entries): New command line option. (mod_open): Set show_dictorg_entries. (RESERVED_WORD): New macro. (mod_match, mod_define): Use the value of db->show_dictorg_entries to decide whether to show dict.org service entries. * modules/dict.org/dictorg.h (struct dictdb): New field `show_dictorg_entries'. Compile dictorg even if zlib is not found. * configure.ac: Bugfix. * modules/dict.org/dictorg.h: Include zlib.h conditionally. * modules/dict.org/dictstr.c: Conditionally compile libz-related code. Implement DZIP format. * README: Update. * modules/dict.org/dictstr.c (struct _dict_chunk_cache): New field `size'. All references updated. (struct _dict_stream): New field `buffer'. All references updated. (cache_get): Implement. (get_chunk_num): Remove. (_dict_destroy): Free buffer and deinitialize inflation engine. (_dict_open): Compute chunk offsets after header_length has been fixed up. (_dict_read_dzip): Implement. Bugfix * lib/stream.c (dico_stream_write): Initialize bufp. Minor fix. * modules/dict.org/dictorg.c (_dict_seek_text, _dict_seek_gzip): Fix erroneous return type. Preparatory work for DZIP support. * modules/dict.org/dictorg.c (free_db): Close and destroy stream. * modules/dict.org/dictorg.h: Include stdint.h (GZ_OS_): New defines. (dict_stream_create): Change signature. All callers changed. * modules/dict.org/dictstr.c (DE_UNSUPPORTED_VERSION, DE_BAD_HEADER) (DE_GZIP_SEEK): New defines. (struct _dict_chunk, struct _dict_chunk_cache): New data types. (struct _dict_stream): Add dzip-related fields. (cache_create_chunk, cache_alloc, cache_destroy, cache_promote) (cache_get, get_chunk_num): New functions. (_dict_open, _dict_read, _dict_seek): Handle dzip format. (_dict_strerror): Handle new error code.s (_dict_read_dzip): New placeholder. (_dict_seek_dzip): New function. (dict_stream_create): Take two arguments. Change signatures of stream I/O functions. * include/dico/stream.h (dico_stream_read_unbuffered) (dico_stream_write_unbuffered) (dico_stream_read, dico_stream_write): buf argument is void*, not char*. (dico_stream_getdelim): New function. * lib/stream.c: Likewise. (dico_stream_seek): Clear eof marker. Bugfix in dictorg module. * modules/dict.org/dictorg.c (suffix_match): Fix lost entry. Bugfix in outline module. * modules/outline/outline.c (outline_match0): Fix coredump. Minor improvement in dictorg module. * modules/dict.org/dictorg.c: Implement trim-ws option. Silent compiler warnings. * dictd/config-gram.y, dictd/dictd.h, dictd/main.c, lib/jiscvt.c, lib/utf8.c, makedict/index.c, makedict/makedict.h, modules/outline/outline.c: Avoid compiler warnings. * dictd/logstr.c, dictd/ostream.c, dictd/xscript.c, include/dico/stream.h, lib/fdstream.c, lib/fltstream.c, lib/iostr.c, lib/stream.c: dico_stream_write takes const char * buffer. Delay setting capabilities until the end of config parsing. * dictd/capa.c (dictd_capa_register): Move actual initialization to dictd_capa_flush. (dictd_capa_flush): New function. * dictd/cmdline.opt: New option --lint (-t). * dictd/dictd.h (config_lint_option): New extern. * dictd/main.c (config_lint_option): New global. (main): Call dictd_capa_flush. Exit immediately if config_lint_option is set. Provide library functions for parsing module command lines. * include/dico.h: Include dico/parseopt.h. * include/dico/Makefile.am (pkginclude_HEADERS): Add parseopt.h * include/dico/parseopt.h: New file. * lib/Makefile.am (libdico_la_SOURCES): Add parseopt.c. * lib/parseopt.c: New file. Ported from pam-modules. * modules/dict.org/dictorg.c (mod_init, mod_open): Use dico_parseopt to parse command line. (free_db): Free suf_index. Minor improvement. * modules/dict.org/dictorg.c (mod_open): Additional option "sort" forces sortin of the index. Bugfixes. * dictd/commands.c (_show_database): Print "" if the database description is NULL. * dictd/loader.c (print_definitions): Likewise. * modules/dict.org/dictorg.c (parse_index_entry): Use \t as a field separator. (_match_simple): Fix coredump. 2008-05-25 Sergey Poznyakoff Another minor update. * utils/bdfextract.pl: Fix bitmasks. Minor update for completeness sake. * utils/Makefile.am: Remove revbits. * utils/revbits.c: Remove. * utils/bdfextract.pl: Compute reversed bit string in place. * utils/mkbushufont.awk: Compute reversed bit string in place. Keep namespace clean. * include/dico/types.h (ARRAY_SIZE): Rename to DICO_ARRAY_SIZE. * dictd/config-gram.y: Likewise. * dictd/dictd.c: Likewise. * modules/dict.org/dictorg.c: Likewise. * modules/outline/outline.c: Likewise. Implement `size' method in streams. * include/dico/stream.h (dico_stream_set_size, dico_stream_size): New functions. * lib/fdstream.c (fd_size, dico_fd_stream_create): Implement size method. * lib/mapstream.c (_mapfile_size, dico_mapfile_stream_create): Implement size method. * lib/stream.c (struct dico_stream): New member size. (dico_stream_set_size, dico_stream_size): New functions. Avoid building programs whose requisite libraries are missing. * configure.ac: Remove leftover --with-log-facility option. Detect presence of libz. Do not abort if no Berkeley DB is found. Set BUILD_JDICT_PROGS substitution variable if libdb is found. (check_bdb): Make sure -ldb does not make it into LIBS. * dictd/Makefile.am (INCLUDES): Remove DB_INCLUDES (LDADD): Remove DB_LIBS. * makedict/Makefile.am (bin_PROGRAMS): Set to @BUILD_JDICT_PROGS@ * modules/dict.org/Makefile.am (dictorg_la_LIBADD): Replace -lz with @LIBZ@ Initial implementation of dict.org format. * README: Update. * include/dico/stream.h (dico_stream_seek): New prototype. (dico_mapfile_stream_create): New prototype. * lib/Makefile.am (libdico_la_SOURCES): Add mapstream.c. * lib/mapstream.c: New file. * lib/list.c (dico_list_insert_sorted): Bugfix: increase count when adding a new entry. * lib/stream.c (all functions): Return a meaningful error code. (dico_stream_strerror): Bugfix. (dico_stream_seek): Implement. * modules/dict.org/Makefile.am (dictorg_la_SOURCES): Add dictstr.c. * modules/dict.org/dictstr.c: New file. * modules/dict.org/dictorg.c: Implement full functionality. * modules/dict.org/dictorg.h: Include zlib.h. Add dict.org format definitions. 2008-05-23 Sergey Poznyakoff MInor fix. * lib/fltstream.c (filter_wr_flush): Make sure the output is terminated with CRLF. Merge branch 'master' of ssh://gray@git.gnu.org.ua/gitroot/dico ./F 2008-05-20 Sergey Poznyakoff Update the docs. * README, README-hacking: Update. 2008-05-19 Sergey Poznyakoff Add modules/dict.org/data.c Add modules/dict.org/crc.c Minor change. * modules/dict.org/Makefile.am (dictorg_la_SOURCES): Add crc.c and data.c (noinst_HEADERS): New variable. Add crc.h and dictorg.h * modules/dict.org/crc.h: New file. * modules/dict.org/dictorg.h: New file. * modules/dict.org/dictorg.c: Move includes and data definitions to dictorg.h * include/dico/util.h: New file * lib/xutil.c: Renamed from util.c (make_full_file_name): Rewrite using dico_full_file_name. * lib/util.c: New file. * include/dico.h: Include dico/util.h * include/dico/Makefile.am (pkginclude_HEADERS): Add util.h. * include/dico/filter.h (dico_base64_input): New prototype. * lib/Makefile.am (libdico_la_SOURCES): Add util.c (libxdico_a_SOURCES): Remove util.c, add xutil.c * lib/base64.c (b64_input): Rename to dico_base64_input. All callers changed. * modules/dict.org/dictorg.c: Implement mod_init and, partially, mod_open. Parse index file. Fix coredump in outline module. * modules/outline/outline.c (outline_define): Fix coredump on missing definitions. 2008-05-18 Sergey Poznyakoff Add session transcript feature. * dictd/logstr.c: New file. * dictd/xscript.c: New file * dictd/Makefile.am (dictd_SOURCES): Add logstr.c and xscript.c * dictd/dictd.c (dictd_loop): Set up session transcript, if requested. * dictd/dictd.h (transcript): New declaration. (transcript_stream_create, log_stream_create): New proto. * dictd/main.c (transcript): New variable. (keywords): New keyword "transcript". Implement suffix matching strategy. * outline/outline.c (struct entry): New fields: length and peer. (struct outline_file): New field suf_index. (alloc_entry): Set length and wordlen. (suffix_match): New function. (strat_tab): Add suffix_match. (revert_word, init_suffix_index): New functions. (exact_match, prefix_match): Initialize x.length and x.wordlen. Set result type to result_match; (compare_entry_ptr): New function. (outline_close): Free suf_index. (outline_define): Set result type to result_define. Re-create the test dictionary. * tests/devils.out: Re-create. 2008-05-17 Sergey Poznyakoff Provide a macro for the size of a soundex buffer. * include/dico/utf8.h (DICO_SOUNDEX_SIZE): New macro. * dictd/dictd.c (soundex_sel): Use DICO_SOUNDEX_SIZE macro. * lib/soundex.c (dico_soundex): Use DICO_SOUNDEX_SIZE macro. Minor change * Makefile.am (ChangeLog): Append Local variables section. 2008-05-16 Sergey Poznyakoff Add a framework for dict.org module. * modules/dict.org: New directory. * modules/dict.org/Makefile.am, modules/dict.org/dictorg.c * modules/sample.c: New file. * configure.ac, modules/Makefile.am: Add modules/dict.org. * dictd/Makefile.am (dictd_SOURCES): Add stat.c * dictd/stat.c: New file. * dictd/commands.c, dictd/dictd.c: Use begin_timing/report_timing. * dictd/dictd.h (num_defines, num_matches, num_compares): New globals. (begin_timing, report_timing): New prototypes. * dictd/loader.c (print_timing): Remove. Use begin_timing/report_timing for stat output. Use module_compare_count to retrieve number of comparisons. * modules/outline/outline.c: Keep track of the number of comparisons. Provide module_compare_count method. Report overall timing. * dictd/commands.c (dictd_quit): Print timing information. * dictd/dictd.c (dictd_loop): Start timer. Minor change. * tests/devils.out: Fix typos. Implement Soundex strategy. * lib/soundex.c: New file * lib/Makefile.am (libdico_la_SOURCES): Add soundex.c. * dictd/dictd.c (dictd_init_strategies): Add soundex. * include/dico/utf8.h (dico_soundex): New proto. Implement regex strategies. * dictd/regex.c: New file. * dictd/Makefile.am (dictd_SOURCES): Add regex.c * dictd/loader.c (dictd_load_module0): Update. (dictd_word_first, dictd_word_all, dictd_word_db): Use new dico_strategy_t type. (ictd_match_word_first, ictd_match_word_all): Likewise. * dictd/commands.c, dictd/dictd.c, lib/strat.c, modules/outline/outline.c: Use new dico_strategy_t type. * dictd/config-gram.y (config_error): Correctly handle locus->file == NULL. * dictd/dictd.h (register_lev, register_regex): New functions. * dictd/lev.c (lev_sel): Use new signature. * dictd/main.c (main): Call register_regex. * include/dico/strat.h: Move typedef to types.h Use new dico_strategy_t type in prototypes * include/dico/types.h (dico_select_t): Change signature. (struct dico_handler_module.module_match_all): Remove. (struct dico_handler_module.module_match): Take const dico_strategy_t strat as the 2nd argument. 2008-05-15 Sergey Poznyakoff Minor fixes. * dictd/loader.c (print_matches): Quote the word. This is not required by the RFC, but some clients (kdict) expect it. * dictd/server.c (dictd_server): Fix copy-n-paste errors. Implement Levenshtein and Damerau-Levenshtein match strategies. * dictd/lev.c: New file. * dictd/Makefile.am (dictd_SOURCES): Add lev.c. * dictd/commands.c (dictd_match): Update calls to dictd_match_* functions. * dictd/dictd.h (struct dictd_database.mod): Fix type. (dictd_match_word_db, dictd_match_word_first) (dictd_define_word_db): Change type of `strat'. (DICTD_DEFAULT_STRATEGY): Define to "lev". * dictd/loader.c (dictd_load_module0): Bail out if the module does not define mandatory methods. (dictd_word_first, dictd_word_all) (dictd_match_word_db, dictd_match_word_all): Change type of `strat'. * dictd/main.c: Call register_lev. * include/dico/types.h: New file. * include/dico/Makefile.am (pkginclude_HEADERS): Add types.h * include/dico.h: Move all definitions to dico/types.h. Include it. (dico_handle_t, dico_result_t): Change typedefs to help improve compilation diagnostics. * include/dico/diag.h: Include dico/types.h, instead of sys/types.h. (DICO_PRINTFLIKE): Remove redefinition. * include/dico/strat.h: Include dico/types.h, instead of sys/types.h. (struct dico_strategy): New members `sel' and `closure'. * lib/strat.c (dico_strategy_dup): Handle new fields. * include/dico/stream.h (dico_linebuf_t, dico_stream_t): Move to dico/types.h * include/dico/utf8.h (dico_levenshtein_distance): First two arguments are const. * lib/levenshtein.c: Likewise. * modules/outline/outline.c: Implement module_match_all. Minor change. * include/dico/utf8.h, lib/utf8.c: Fix a typo. Improve UTF-8 functions. Add a function for computing levenshtein distance. * lib/levenshtein.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add levenshtein.c * dico/utf8.h (utf8_symcmp, utf8_symcasecmp, utf8_strcasecmp) (utf8_strncasecmp,utf8_mbstr_to_wc) (dico_levenshtein_distance): New prototypes. * lib/utf8.c (utf8_symcmp, utf8_symcasecmp, utf8_strcasecmp) (utf8_strncasecmp,utf8_mbstr_to_wc): New functions. * modules/outline/outline.c: Use utf8 comparitors. Add ChangeLog rule. Use fmt to split long lines in ChangeLog Move diagnostics functions to libdico. * include/dico/diag.h: New file * lib/diag.c: Prefix all global symbols with dico_. All uses updated. * lib/Makefile.am (libxdico_a_SOURCES): Remove diag.c (libdico_la_SOURCES): Add diag.c * include/dico.h: Include dico/diag.h * include/dico/Makefile.am (pkginclude_HEADERS): Add diag.h * modules/outline/outline.c: Use dico_log instead of syslog. 2008-05-14 Sergey Poznyakoff Discontinue ChangeLog, use git log to regenerate it when making a distribution. * .gitignore: Add ChangeLog * ChangeLog: Rename to ChangeLog.2008 * Makefile.am (EXTRA_DIST): Add ChangeLog.2008 (make-ChangeLog): New rule. (dist-hook): New rule. * bootstrap.conf: Create a placeholder for ChangeLog. * gnulib.modules: Add gitlog-to-changelog 2008-05-13 Sergey Poznyakoff Minor changes. * doc/Makefile.am: Add check-options rule * doc/gjdict.texi: New file. * utils/Makefile.am: Remove helpcmp.pl * utils/helpcmp.pl: Remove. Introduce a documentation framework: * doc/.gitignore, doc/Makefile.am, doc/check-docs.sh, doc/dico.texi, doc/fdl.texi, doc/gendocs_template, doc/macros.texi, doc/mastermenu.el, doc/rendition.texi, doc/untabify.el: New files. * Makefile.am (SUBDIRS): Add doc. * configure.ac (RENDITION): New subst variable. (AC_CONFIG_FILES): Add doc/Makefile. Implement quoted-printable encoding. * lib/Makefile.am (libdico_la_SOURCES): Add qp.c * lib/qp.c: New file. Implementation of quoted-printable encoding/decoding. * lib/fltstream.c (dico_codec_stream_create): New function. * dictd/ostream.c (print_headers): Use dico_codec_stream_create to create encoder stream. * include/dico/filter.h (dico_codec_stream_create) (dico_qp_stream_create,dico_qp_decodeflush, if not NULL. (dico_stream_destroy): Call stream->destroy, if not NULL. * modules/outline/outline.c (outline_output_result): Fix return value. 2008-05-12 Sergey Poznyakoff Implement OPTION MIME. * README: Update. * dictd/Makefile.am (dictd_SOURCES): Add mime.c, ostream.c. * dictd/dictd.h (register_mime, dictd_ostream_create): New prototypes. * dictd/loader.c (print_matches, print_definitions): Use ostream for output. * dictd/commands.c (dictd_help, dictd_show_info) (dictd_show_databases, dictd_show_strategies) (dictd_show_strategies): Use ostream for output. * dictd/main.c (main): Call register_mime. * tests/dictd.cfin: Request mime capability. * lib/stream.c (dico_stream_read_unbuffered) (dico_stream_write_unbuffered): Return 1 and set errno to ENOSYS if the underlying method is NULL. Implement authentication and database authorization. * dictd/auth.c (auth): Set user_name and user_groups. (init_auth_data): New function. * dictd/commands.c (dictd_show_info): Use database_count and database_iterate instead of dico_list_ functions. * dictd/dbtext.c (dbtext_get_groups): Store groups in a list. * dictd/dictd.c (dictd_loop): Call init_auth_data before returning. * dictd/dictd.h (user_name, user_groups): New globals. (struct dictd_database): New fields: require_auth and groups. (database_count, database_iterate, database_visible_p): New prototypes. (struct udb_def._db_get_groups): Change signature. (udb_get_groups): Change signature. (init_auth_data): New function. * dictd/loader.c (dictd_word_first, dictd_word_all): Ignore databases that are not visible. (dictd_define_word_db): Restore accidentally deleted call to mp->module_define. * dictd/main.c (require_auth, user_name, user_groups): New variables. (kwd_database): New keywords: `require-auth' and `groups'. (keywords): New keyword `require-auth'. (database_visible_p, database_count, database_iterate): New functions. (cmp_database_name): Ignore invisible databases. (struct dictd_user_db._db_get_groups): Change signature. (udb_get_groups): Change signature. * include/dico/list.h (dico_list_intersect_p): New function. * lib/list.c (dico_list_intersect_p): New function. * modules/outline/outline.c (compare_prefix): Bugfix. * tests/devils.out (PRECIPITATE): Remove duplicate entry. Optionally print timing information for match and define commands. * dictd/commands.c (dictd_match): Resolve strategy before passing it to the handler module. * dictd/dictd.h (timing_option): New global. * dictd/loader.c (print_timing): New function. (dictd_word_first, dictd_word_all, dictd_match_word_db) (dictd_match_word_first, dictd_match_word_all) (dictd_define_word_db, dictd_define_word_first) (dictd_define_word_all): Optionally print timing information. * dictd/main.c (timing_option): New global. (keywords): New statement `timing'. * gnulib.modules: Add gettimeofday. * include/xdico.h (xdico_timer_t): New data type. (timer_get, timer_start, timer_stop, timer_reset) (timer_get_real, timer_get_user, timer_get_system) (timer_format_time): New functions. * lib/Makefile.am (libxdico_a_SOURCES): Add timer.c * lib/timer.c: New file. Implement prefix matches Update Implement working outline module. Add example data and configuration, for testing. * dictd/loader.c (dictd_word_all): Bugfix (print_matches): Fix output. (print_definitions): Remove optional ': text follows' part, as it seems to confuse some clients (notably, kdict). * include/dico.h: Include dico/utf8.h * include/dico/utf8.h: New file. * include/xdico.h (utf8_*): Move to dico/utf8.h * lib/Makefile.am (libdico_la_SOURCES): Add utf8.c. (libxdico_la_SOURCES): Remove utf8.c. * lib/utf8.c: Do not include xalloc.h and xdico.h, include dico.h instead. (utf8_wc_strdup): Use calloc. (utf8_wc_to_mbstr): Do not use logmsg. * modules/outline/outline.c: Working implementation. * tests/.gitignore, tests/Makefile.am, tests/devils.out, tests/dictd.cfin * Makefile.am (SUBDIRS): Add tests. * configure.ac (AC_CONFIG_FILES): Add tests/Makefile.am 2008-05-11 Sergey Poznyakoff Provide a generalized framework for ! and * (matches and defines). * dictd/commands.c (dictd_match): Handle ! and *. * dictd/dictd.h (dictd_match_word): Remove. (dictd_match_word_db, dictd_match_word_first) (dictd_match_word_all): New functions. * dictd/loader.c (dictd_word_first, dictd_word_all): New functions. (dictd_match_word): Rename to dictd_match_word_db. (dictd_match_word_first,dictd_match_word_all): New functions. (dictd_define_word_first, dictd_define_word_all): Rewrite using dictd_word_first and dictd_word_all. Provide a framework for ! and * searches. * dictd/commands.c (dictd_define): Implement ! and * searches. * dictd/dictd.h (dictd_define_word): Remove. (dictd_define_word_db, dictd_define_word_first) (dictd_define_word_all): New prototypes. * dictd/loader.c (print_definitions): New function. (dictd_define_word): Rename to dictd_define_word_db; use print_definitions. (dictd_define_word_first, dictd_define_word_all): New functions. Provide a default strategy. * dictd/dictd.c (init_strategies): Rename to dictd_init_strategies. (dictd_server_init): Remove call to init_strategies, it is done in main. Ensure that a default strategy is set. * dictd/dictd.h (DICTD_DEFAULT_STRATEGY): New define. (dictd_init_strategies): New prototype. * dictd/main.c: Fix typos in diagnostics messages. (keywords): New statement `default-strategy'. (main): Call dictd_init_strategies. * include/dico/strat.h (dico_set_default_strategy) (dico_get_default_strategy): New prototypes. * lib/strat.c (dico_set_default_strategy) (dico_get_default_strategy): New functions. 2008-05-10 Sergey Poznyakoff Initial implementation of MATCH and DEFINE. * README: Update. * dictd/commands.c: Initial implementation of MATCH and DEFINE commands. * dictd/dictd.c (init_strategies): Always define the "prefix" strategy. * dictd/dictd.h (dictd_match_word, dictd_define_word): New functions. * dictd/fdio.c (fd_close): Don't raise error on closing descr -1. * dictd/loader.c (dictd_get_database_descr) (dictd_get_database_info): Bugfix. (dictd_match_word, dictd_define_word): New functions. * include/dico.h (dico_result_t): New data type. (struct dico_handler_module): Change signatures of module_match and module_define. Add new methods: module_output_result, module_result_count, module_free_result. * modules/outline/outline.c: Reflect changes to struct dico_handler_module. 2008-05-07 Sergey Poznyakoff Bugfix. * dictd/dictd.c (tokenize_input): Correctly handle quoted arguments. Rewrite interface to strategies. * include/dico/strat.h: New file. * include/dico/Makefile.am (pkginclude_HEADERS): Add strat.h * lib/strat.c: New file. * lib/Makefile.am (libdico_la_SOURCES): Add strat.c * dictd/dictd.c (init_databases): Remove querying for supported strategies. (init_strategies): New function. (dictd_server_init): Call init_strategies. * dictd/commands.c (dictd_show_strategies): Use new interface to strategies. * dictd/dictd.h (dictd_database_t): Remove stratc and stratv. * dictd/loader.c (strat_name_cmp, add_strategies) (dictd_database_get_strats): Remove. * dictd/main.c (strategy_list): Remove. (dictd_database_free): Remove references to stratc and stratv. * include/dico.h: Include dico/strat.h (dico_strategy_t): Move definition to dico/strat.h (struct dico_handler_module): Remove module_strats. * outline/outline.c (outline_strats): Remove. Register strategies in outline_init. Implement SHOW STRAT. Begin writing `outline' handler module. * modules: New directory. * modules/Makefile.am: New file. * modules/outline: New directory. * modules/outline/Makefile.am: New file. * modules/outline/outline.c: New file. * Makefile.am (SUBDIRS): Add modules. * configure.ac (AC_CONFIG_FILES): Add modules, modules/outline * dictd/commands.c (_show_database, dictd_show_info): Use data returned by the backend module, if not configured in the database structure. (dictd_show_strategies): New function. (command_tab): Implement show strat. * dictd/dictd.c (init_databases): Initialize strategy list. * dictd/dictd.h (strategy_list): New declaration. (dictd_get_database_descr, dictd_free_database_descr) (dictd_get_database_info, dictd_free_database_info): New prototypes. * dictd/loader.c (_add_load_dir): Bugfix. (add_strategies, strat_name_cmp): New functions. (dictd_database_get_strats): Rewrite using new version of module_strats. (dictd_get_database_descr, dictd_free_database_descr) (dictd_get_database_info, dictd_free_database_info): New functions. (dictd_match_word): New placeholder. * dictd/main.c (strategy_list): New variable. * include/dico.h (dico_strategy_t): New data type. (dico_handler_module): New members module_db_info and module_db_descr. (module_strats, module_define): Change signature. * lib/list.c: Initialize p with zeroes. Add loader.c * README: Update * configure.ac: Require libtool 2.2.5a (DICO_MODDIR): Define * dictd/loader.c: New file. * dictd/Makefile.am: Add loader.c. * dictd/dictd.h (dictd_loader_init): New proto. * dictd/main.c (main): Call dictd_loader_init. 2008-05-06 Sergey Poznyakoff Initialize databases. * dictd/dictd.c (init_databases): New function. (dictd_server_init): Call init_databases. * dictd/dictd.h (struct dictd_dictionary): New fields: mod, argc, argv. (dictd_open_dictionary_handler): New proto. * dictd/loader.c (dictd_open_dictionary_handler): New function. * dictd/main.c (set_dico_handler): Rename to set_dict_handler (fix a typo). Intialize command, argc and argv. Load modules. * dictd/commands.c (dictd_show_databases): Return 554 response if no databases are configured. * dictd/dictd.c (dictd_loop): Load all configured handlers. * dictd/dictd.h: Include ltdl.h (handler_list, dictionary_list): Add declarations. (dictd_handler_t): New fields: module and handle. (dictionary_remove_dependent, dictd_load_module): New proto. * dictd/loader.c (dictd_load_module): New function. * dictd/main.c (dictionary_remove_dependent): New function. * dictd/udb.c (udb_create): Improve error diagnostics. * include/dico.h: Include dico/argcv.h (DICO_EXPORT): New define. (dico_handle_t, struct dico_handler_module): New declarations. * include/dico/Makefile.am (pkginclude_HEADERS): Add argcv.h. * include/dico/argcv.h: New file. * include/dico/list.h (dico_iterator_remove_current): Change return type. * lib/Makefile.am (libdico_la_SOURCES): add argcv.c * lib/argcv.c: New file. * lib/list.c, lib/url.c: Fix dummy errors. Forgot to add with the previous commit Provide an installable library and header files for dico database modules. * include/dico/Makefile.am: New file. * include/dico/assoc.h: New file. * include/dico/list.h: New file. * include/dico/url.h: New file. * include/dico/xlat.h: New file. * include/xdico.h: New file. * include/dico.h: Rewrite. Installable header. * include/Makefile.am (pkginclude_HEADERS): New var. Add SUBDIRS. * dictd/linebuf.c: Move to ... * lib/linebuf.c: ... this (with mods). * dictd/stream.c: Move to ... * lib/stream.c: ... this (with mods). * lib/Makefile.am (lib_LTLIBRARIES): New installable library libdico.la. (noinst_LIBRARIES): New library libxdico. * lib/assoc.c, lib/list.c, lib/url.c: Avoid using xalloc calls, instead return error status and set errno. * lib/diag.c, lib/iputil.c, lib/userprivs.c, lib/utf8.c, lib/xalloc-die.c: Include xdico.h * lib/util.c: Likewise. (xdico_list_create, xdico_iterator_create, xdico_list_append) (xdico_list_prepend, xdico_assoc_create, xdico_assoc_add): New functions. * .gitignore: Update. * configure.ac (AC_CONFIG_FILES): Add include/dico/Makefile * dictd/Makefile.am (dictd_SOURCES): Remove linebuf.c and stream.c. (LDADD): Add libxdico.a, libdico.la * dictd/auth.c, dictd/capa.c, dictd/commands.c, dictd/config-gram.y, dictd/dictd.c, dictd/dictd.h, dictd/fdio.c, dictd/main.c, dictd/server.c, dictd/udb.c: Reflect changes to the namespace. * makedict/Makefile.am (LDADD): Add libxdico.a, libdico.la * makedict/makedict.h: Include xdico.h Add loader.c * README: Update * configure.ac: Require libtool 2.2.5a (DICO_MODDIR): Define * dictd/loader.c: New file. * dictd/Makefile.am: Add loader.c. * dictd/dictd.h (dictd_loader_init): New proto. * dictd/main.c (main): Call dictd_loader_init. Local Variables: mode: change-log version-control: never buffer-read-only: t End: dico-2.2/ChangeLog.2008000066400000000000000000000560131172612674100144510ustar00rootroot000000000000002008-05-05 Sergey Poznyakoff Moved to the new project. Namespace cleanup. 2008-05-04 Sergey Poznyakoff Further fixes. * dictd/Makefile.am (LDADD): Change libgnu.a to libgnu.la * makedict/Makefile.am: Likewise. Minor fixes. * dictd/dictd.h (handler_extern): Replace with handler_loadable. All uses changed. * dictd/main.c (set_handler_type): Bugfix. Add preliminary ltdl support. * .gitignore: Add libtool and libltdl * Makefile.am (SUBDIRS): Add libltdl * README-hacking: Update. * bootstrap: Pass --ltdl flag to libtoolize, if necessary. * configure.ac: Use ltdl. * makedict/index.c: Minor changes. * doc: New directory * doc/rfc2229.txt: New file. Document configuration statements. * dictd/Makefile.am (dictd_SOURCES): Add config-format.c * dictd/config-format.c: New file. * dictd/cmdline.opt: New option `--config-help'. * dictd/config-gram.y: Reflect changes to struct config_keyword. * dictd/dbtext.c: Shut gcc warnings. * dictd/dictd.h (cfg_callback): Remove. (struct config_keyword): New members argname and docstring. (format_statement_array, config_help, dictd_server): New prototypes. * dictd/main.c: Provide docstrings for configuration statements. (config_help): New function. 2008-05-03 Sergey Poznyakoff Implement AUTH command. * dictd/Makefile.am (dictd_SOURCES): Add auth.c, dbtext.c, udb.c. * dictd/auth.c, dictd/dbtext.c, dictd/udb.c: New files. * dictd/capa.c (dictd_capa_add): Fail if init finction returns non-zero. * dictd/dictd.c (msg_id): New global. (initial_banner): Save msg_id for further use. (trim): Move to the library. All uses updated. * dictd/dictd.h (msg_id): New declaration. Add udb prototypes and declarations. * dictd/main.c (user_db): New global. (user_db_config): Call udb_create. (main): Call udb_init and register_auth. * include/dico.h (struct dict_assoc): New data type. (dict_assoc_create, dict_assoc_destroy, dict_assoc_add, dict_assoc_find, dict_assoc_remove): New prototypes. (struct dict_url,dict_url_t): New data types. (dict_url_parse, dict_url_destroy, dict_url_get_arg) (dict_url_full_path): New prototypes. (make_full_file_name, trimnl): New prototypes. * lib/Makefile.am (libgjdict_a_SOURCES): Add assoc.c, url.c, util.c. * lib/assoc.c, lib/url.c, lib/util.c: New files. Fix handling of continuation strings in configuration file. * dictd/config-gram.y (stmt_end): Get kw as argument and use it to compute target pointer. (slist,slist0): Fix algorithm for coalescing string parts. * dictd/config-lex.l: Return QSTRING for quoted strings. * dictd/main.c (user-db): New configuration block statement. (set_handler, set_dictionary): Fix handling of callback_set_value. * include/dico.h (dict_list_intersect): New prototype. * lib/list.c (dict_list_intersect): New function. Capability framework. * dictd/Makefile.am (dictd_SOURCES): Add capa.c * dictd/capa.c: New file. * dictd/commands.c (command_tab): Remove capability-dependent commands. (command_list): New variable. (dictd_add_command, dictd_init_command_tab): New finctions. (dictd_show_std_help,locate_command): Rewrite using list of commands. * dictd/dictd.c (output_capabilities): Implement. * dictd/dictd.h (dictd_init_command_tab,dictd_add_command) (dictd_capa_register, dictd_capa_add) (dictd_capa_iterate): New protos. * dictd/main.c (keywords): New statement `capability'. (main): Initialize command and capability lists. 2008-05-01 Sergey Poznyakoff Redo command handling. Improve daemon help output. Control inactivity timeouts. * dictd/commands.c (dictd_help): Use help strings provided in the command tab. If help-text (config) begins with a `+', append it to the default help output. (dictd_show): Split into separate functions for each show subcommand: (dictd_show_info, dictd_show_databases, dictd_show_server); (command_tab): Use new structure. (locate_command): Take into account arguments, so that "SHOW INFO" and "SHOW DB" are recognized as different commands (no matter what the amount of whitespace between the keywords). (dictd_show_std_help): New function. * dictd/dictd.c: Handle inactivity timeout. * dictd/dictd.h (struct dictd_command): Rewritten. * dictd/main.c (inactivity_timeout): New variable. (keywords): New statement `inactivity-timeout'. * dictd/server.c (handle_connection): Reset signals in child. * gnulib.modules: Add crypto/md5 and hash. * include/dico.h: Move #endif to the end of file. 2008-04-30 Sergey Poznyakoff Preliminary implementation of "SHOW" commands. * dictd/commands.c: Preliminary implementation of "SHOW" commands. * dictd/dictd.c (stream_write_multiline): New function. * dictd/dictd.h (dictionary_list, server_info): New declarations. (stream_write_multiline, find_dictionary): New prototype. * dictd/main.c (find_dictionary): New function. Implement RFC 2229 dialog. * dictd/commands.c: New file. * dictd/Makefile.am (dictd_SOURCES): Add commands.c * dictd/cmdline.opt: New option `--inetd' (`-i') * dictd/config-lex.l (quote_char): New function. * dictd/dictd.c: Implement RFC 2229 dialog. (tokenize_input, stream_writez) (stream_printf, output_capabilities, initial_banner): New functions. * dictd/dictd.h (mode, hostname, program_version) (initial_banner_text, got_quit, help_text): New globals. (quote_char, unquote_char): New functions. (stream_writez, stream_printf): New functions. (dictd_cmd_fn, struct dictd_command): New data types. (dictd_handle_command): New function. * dictd/main.c (hostname, initial_banner_text, help_text): New globals. (initial-banner-text, help-text, hostname): New config statements. * dictd/server.c (dictd_server): Refuse to restart if the configuration file name is not a full file name. * gnulib.modules: Add xgethostname. * include/dico.h: Add utf8 prototypes and declarations. * lib/utf8.c (utf8_char_width, utf8_strlen, utf8_strbytelen) (utf8_iter_end_p, utf8_iter_first, utf8_iter_next): New functions. Normalize the namespace. * utils/getopt.m4 (GETOPT): Exit if an invalid option is given. (program_version): Make global. 2008-04-29 Sergey Poznyakoff Minor changes. * lib/utf8.c: New file. * lib/Makefile.am (libgjdict_a_SOURCES): Add utf8.c. * gnulib.modules: Add c-strcase * makedict/Makefile.am (LDADD) Swap libgjdict.a and libgnu.a. Add libextra.a. Implement daemon and inetd modes. * dictd/dictd.c, dictd/server.c: New files. * dictd/Makefile.am (dictd_SOURCES): Add dictd.c and server.c (LDADD): Swap libgjdict.a and libgnu.a. Add libextra.a. * lib/userprivs.c: New file. * lib/Makefile.am (noinst_LIBRARIES): Add libextra.a (libgjdict_a_SOURCES): Add userprivs.c; remove xalloc-die.c. (libextra_a_SOURCES): Add xalloc-die.c. * lib/iputil.c (sockaddr_to_str, sockaddr_to_astr): New functions. * configure.ac: Check for setegid, setregid, setresgid, seteuid, setreuid, sysconf, getdtablesize. (PIDFILE): Remove define. * dictd/cmdline.opt (console-logging): Rename to stderr. * dictd/dictd.h: Update. * dictd/main.c (pidfile_name, shutdown_timeout): New globals. (user): Replace with : (user_id, group_id): New variables. (keywords): New configuration file statements `pidfile' and `shutdown-timeout'. (main): Call dictd driver appropriate for the current mode. * dictd/stream.c (stream_set_error_string): Change type to void. * include/dico.h (offsetof, GD_ARG_UNUSED, GD_PRINTFLIKE): New defines (move from ../dictd/dictd.h). (logmsg, die): Mark with GD_PRINTFLIKE. (sockaddr_to_str, sockaddr_to_astr, switch_to_privs): New protos. 2008-04-28 Sergey Poznyakoff Add stream I/O framework. * README-hacking: New file. * dictd/fdio.c, dictd/linebuf.c, dictd/stream.c: New files. * dictd/Makefile.am (dictd_SOURCES): Add new files. * include/dico.h (dict_list_t, dict_iterator_t): Change definitions. All uses updated. * lib/list.c: Likewise. * dictd/config-gram.y: Reflect changes to dict_list_t. Add missing gettext markers. * gnulib.modules: Add strerror. * configure.ac (LOG_FACILITY): New configuration variable. * dictd/dictd.h (LOG_FACILITY): New define. Reflect changes to dict_list_t. Add linebuf and stream prototypes and declarations. (dictd_dictionary_t): New field `info'. * dictd/main.c: Reflect changes to dict_list_t. 2008-04-27 Sergey Poznyakoff Finish configuration framework. Some minor issues still remain, though. * lib/list.c, lib/xlat.c: New files. * lib/Makefile.am: Add list.c and xlat.c * dictd/config-gram.y: Remove unneeded productions. Implement C code. * dictd/config-lex.l: Remove NUMBER. * dictd/dictd.h: Add more includes and new prototypes. * dictd/main.c: Add configuration structures. * gnulib.modules: More modules. * include/dico.h: Add prototypes for list and xlat functions. * lib/bushu.dat, lib/diag.c, lib/iputil.c, lib/jiscvt.c: Add copyleft headers. * lib/list.c (dict_iterator_remove_current) (dict_iterator_set_data): New functions. 2008-04-26 Sergey Poznyakoff Implement configuration framework for dictd. * configure.ac: Add AC_PROG_LEX * dictd/Makefile.am: Add config-gram.y and config-lex.l. * dictd/config-gram.y, dictd/config-lex.l: New files. * dictd/cmdline.opt: Implement the --config option. New options --trace-gram and --trace-lex. * dictd/dictd.h: Add new protos. * dictd/main.c (main): Call config_parse. * include/dico.h (vlogmsg): New proto. * lib/diag.c (vlogmsg): New function. 2008-04-23 Sergey Poznyakoff Use gnulib. Remove old server. Start to write dictd. * bootstrap, bootstrap.conf, gnulib.modules: New files. * dictd/.gitignore, dictd/Makefile.am, dictd/cmdline.opt: New files. * lib/xmalloc.c: remove. * dictd/dictd.h, dictd/main.c: New file. * include/gjdictd.h: Delete. * lib/xalloc-die.c: New file. * server/*: Remove. 2008-04-22 Sergey Poznyakoff Finish new makedict. * makedict/Makefile.am: Add romaji.c. * makedict/romaji.c: Rewrite from scratch. * makedict/index.c: Implement all indexes. * makedict/makedict.h (romaji_out_fn): New data type. (kana_to_romaji,kana_to_romaji_str): New prototypes. Begin switching to Berkeley DB. * Makefile.am: Remove dbs * configure.ac: Check for Berkeley DB. Remove dbs * include/Makefile.am: Remove dbs * include/dict.h: Remove include dbs.h. (*_TREE macros): use `.db' suffix. (DictEntry): Use Bushu structure. Text entries are represented by their offsets after the end of the structure. (DICT_PTR, DICT_ENGLISH_PTR, DICT_PINYIN_PTR, DICT_KANJI_PTR, DICT_YOMI_PTR): New macros. * include/dico.h: Include stdlib.h. (xmalloc, xzalloc, xcalloc, xrealloc): New functions. * include/gjdictd.h: Remove include dbs.h. * dbs/Makefile.am, dbs/dclose.c, dbs/dcreate.c, dbs/dflush.c, dbs/dmode.c, dbs/dopen.c, dbs/dread.c, dbs/dreadpriv.c, dbs/dseek.c, dbs/dwrite.c, dbs/dwritepriv.c, dbs/iadd.c, dbs/iblk.c, dbs/ibottom.c, dbs/ibuild.c, dbs/iclose.c, dbs/icmp.c, dbs/icmplen.c, dbs/icreate.c, dbs/ilock.c, dbs/imode.c, dbs/iopen.c, dbs/irecno.c, dbs/iseek.c, dbs/iseq.c, dbs/iskip.c, dbs/isync.c, dbs/itop.c, dbs/ivalue.c, dbs/mem.c, dbs/reorder.c, include/dbs.h, makedict/btree.opt, makedict/check.c, makedict/info.c, makedict/output.c: Remove. * makedict/.gitignore: Remove btree * makedict/Makefile.am: Remove btree. Rewrite makedict using Berkeley DB. * makedict/compile.c, makedict/index.c, makedict/main.c, makedict/makedict.h, makedict/makedict.opt, makedict/utils.c: Rewrite using Berkeley DB. * lib/xmalloc.c: New file. * lib/Makefile.am: Add xmalloc.c * lib/iputil.c: Include dico.h 2008-04-21 Sergey Poznyakoff * client/Gjdict.ad: Set kanjilarge height. * client/search.c: Do not set width/height of the kanjilarge widget. 2008-04-20 Sergey Poznyakoff Control verbosity level. * client/Gjdict.ad: Update. * client/client.c (sendf, get_lines): use config.transcript instead of config.verbose. * client/client.h (Config): Remove `debug', change type of `verbose' to int. * client/cmdline.opt: New option `--transcript'. Change the meaning of the `--verbose' option. * client/init.c: Add new resources. (_gjdict_log_printer): New function. (initsys): Set _gjdict_log_printer as the default diagnostics printer. (translate_options): Handle verbose field. * client/options.h (OptionsRec) Remove `debug', change type of `verbose' to String. * include/dico.h (str_to_diag_level): New function. * lib/diag.c: Likewise. Fix building of the help file. * client/Makefile.am: Set GROFF_TMAC_PATH. * client/dico.help: Minor changes. * client/gjdict.chl: Remove generated file. * client/.gitignore: Add gjdict.chl * utils/helpcmp.pl (replace_upper_ascii): New function. (convert): Remove. Housekeeping work. * configure.ac: Provide placeholders for eventual i18n framework. Place pidfile in /var/run on all systems. * client/Gjdict.ad: Widen status bar to match recent changes. * client/cmdline.opt, makedict/makedict.h, server/cmdline.opt: Remove redefinitions of N_, _ and gettext. Implement inetd-style connections. * server/cmdline.opt: New option --inetd (-i). * server/main.c: Implement inetd-style connections. * server/server.c (server): Change signature. (set_fd_ctl_addr, set_lo_ctl_addr): New functions. * server/server.h (inetd): New extern. (server): Change function signature. * client/Gjdict.ad: Widen pinyinText widget. * client/client.c (get_line): Bugfix: return actual code. * client/help.c, client/search.c: Use myXawtextScrollWhenNeeded. * client/util.c (format_string): Return empty output on empty input. * configure.ac (SCROLL_WHEN_NEEDED): New configuration variable. 2008-04-19 Sergey Poznyakoff * client/client.c, client/helpfile.c, client/util.c, dbs/dopen.c, dbs/dreadpriv.c, dbs/iblk.c, dbs/ibuild.c, dbs/icreate.c, dbs/ilock.c, dbs/iopen.c, dbs/mem.c, makedict/check.c, makedict/info.c, makedict/output.c, server/dict.c, server/main.c, server/search.c, server/server.c: Fix wording of the diagnostic messages (can't -> cannot). Speed up input operations. * client/client.c (get_lines): Optimize * client/client.h (get_lines): Change prototype. * server/server.c (server): Do not ignore SIGINT. Remove unneeded files. * client/options.c, client/util.h: Remove. * client/Makefile.am: Remove unneded files. * client/client.h, client/cmdline.opt, client/init.c, client/util.c: Remove unneded includes. * include/gjdictd.h (ip_hostname,get_ipaddr,str2port): Move to dico.h (good_ipaddr,ipaddr2str,ipstr2long): Remove. * include/dico.h (ip_hostname,get_ipaddr,str2port): New protos. Use autogenerated argument parsing in all programs. * client/.gitignore, makedict/.gitignore: Add generated files. * client/Makefile.am, makedict/Makefile.am: Add rules for generating command line parsers. * client/client.h, makedict/makedict.h, server/server.h: Add new protos. Explicitly mark void argument lists as such. * client/cmdline.opt: New file. * client/init.c, client/main.c: Rewrite command line handling. * makedict/btree.c: Rename to... * makedict/btree.opt: ... this and rewrite command line handling. * makedict/check.c, makedict/info.c, makedict/output.c: Add missing includes. * makedict/main.c: Rewrite command line handling. * makedict/makedict.opt: New file. * server/main.c: Remove unused variables. * utils/getopt.m4 (print_help, print_usage): Remove static. Automate generation of command-line argument parsing code. * server/.gitignore, server/Makefile.am, server/main.c, server/server.h: Rewrite command line handling. * server/cmdline.opt: New file * utils/Makefile.am: Add getopt.m4 * utils/getopt.m4: New file * client/init.c (options): Use GJDICT_PORT Provide a general-purpose framework for diagnostic functions. * client/log.c, client/log.h, client/msg.c: Remove * lib/diag.c: new file * server/log.h, server/patchlevel.h: Remove * client/Makefile.am, client/bushusearch.c, client/client.c, client/client.h, client/convert.c, client/cornersearch.c, client/help.c, client/helpfile.c, client/init.c, client/kanasearch.c, client/main.c, client/search.c, client/util.c, client/widgets.c, client/xref.c, dbs/dopen.c, dbs/dreadpriv.c, dbs/dwritepriv.c, dbs/iblk.c, dbs/ibuild.c, dbs/iclose.c, dbs/icreate.c, dbs/ilock.c, dbs/iopen.c, dbs/iseq.c, dbs/mem.c, dbs/reorder.c, include/dbs.h, include/dico.h, lib/Makefile.am, makedict/Makefile.am, makedict/btree.c, makedict/check.c, makedict/index.c, makedict/info.c, makedict/main.c, makedict/makedict.h, makedict/output.c, server/Makefile.am, server/dict.c, server/gram.y, server/log.c, server/main.c, server/search.c, server/server.c, server/server.h, server/utils.c: Use new diagnostic functions. Fix minor incosistencies: provide prototypes, remove unused variables, etc. * client/bushusearch.c, client/client.c, client/client.h, client/cornersearch.c, client/getfile.c, client/help.c, client/init.c, client/kanasearch.c, client/license.c, client/log.c, client/main.c, client/search.c, client/skipsearch.c, client/util.c, client/widgets.c, client/xref.c, dbs/dwrite.c, dbs/icmp.c, dbs/iseq.c, dbs/reorder.c, include/dbs.h, lib/iputil.c, lib/jiscvt.c, makedict/btree.c, makedict/check.c, makedict/index.c, makedict/info.c, makedict/main.c, makedict/makedict.h, makedict/output.c, makedict/romaji.c, server/bushu.code.c, server/dict.c, server/gram.y, server/log.c, server/log.h, server/main.c, server/server.c, server/server.h, server/utils.c, utils/bushu.awk, utils/revbits.c. 2008-04-14 Sergey Poznyakoff * fonts/*.xbm: Add copyright header. Relicense under GPLv3+ * COPYING * client/license.c * fonts/Makefile.am * lib/jiscvt.c * makedict/main.c * server/main.c Fix make distcheck. * Makefile.am (distcleancheck_listfiles): New var. * client/license.c (helptext): Remove * configure.ac (AM_INIT_AUTOMAKE): Remove std-options/ * fonts/Makefile.am: Fix build. * utils/Makefile.am: Fix build. Improve make in fonts. * fonts/3.xbm: Fix erroneous declarations. * fonts/Makefile.am (bushu.bdf): Change rule * fonts/header, fonts/footer: New files. * fonts/bushu.pcf: Delete auto-generated file. * utils/knr2ansi: Delete unneeded file. * utils/mkbushufont: Replaced by ... * utils/mkbushufont.awk: ... this. * utils/revbits.c: Include config.h Improve fallback resource generation. * client/Makefile.am (fallback.h): Use resource.sed * client/resource.sed: New file. 2008-04-13 Sergey Poznyakoff Provide fallback resources. * client/.gitignore: Add fallback.h * client/Makefile.am: New rule for creating fallback.h * client/init.c (fallback): Include fallback.h 2008-04-12 Sergey Poznyakoff * client/Gjdict.ad (replaceMode): Remove. Not available in Xaw8. * client/search.c (makesouth): make searchDropInput editable, otherwise pastes don't work. * All files: switch to ANSI C. 2008-04-11 Sergey Poznyakoff Rewrite for Xaw v. >= 7. Use asciiTextWidgetClass instead of the custom wcharTextWidgetClass. * client/Gjdict.ad: Rewrite for Xaw >= 7 * client/bushusearch.c: Force international: false on all bushu widgets. * client/kanasearch.c: Force international: false * client/client.h (struct popup_info): remove LargeKanjiFont, EnglishFont. * client/options.h: Likewise. * client/widgets.c: Likewise. * client/init.c: Likewise. Force ja_JP.eucjp locale. * client/cornersearch.c, client/help.c, client/search.c, client/skipsearch.c, client/xref.c: Rewrite using asciiTextWidgetClass and assuming international: true. Delegate as much as possible to the resource file. * lib/Makefile.am: Remove Wchar* sources. * lib/WcharCommon.h, lib/WcharCommonP.h, lib/WcharSink.h, lib/WcharSinkP.h, lib/WcharSrc.h, lib/WcharSrcP.h, lib/WcharText.h, lib/WcharTextP.h: Remove. * makedict/btree.c, makedict/main.c: Fix va_start calls. * server/server.c: Move eofline several lines up. 2008-04-09 Sergey Poznyakoff Set up Git `ident' replacement for all sources. * configure.in: Rename to configure.ac. Update to newer autoconf syntax. * acconfig.h: Remove. * .gitconfig: New file. 2008-04-08 Sergey Poznyakoff * INSTALL: Remove auto-generated file. * client/client.c, client/getfile.c, client/log.c, client/log.h, client/msg.c, client/search.c, client/util.c, include/dbs.h, makedict/btree.c, makedict/main.c, makedict/makedict.h, server/gram.y, server/log.c, server/log.h, server/main.c, server/search.c, server/server.c, server/server.h: use stdarg * client/search.c (makesouth): Give correct default of XtNencoding for searchDropInput. * lib/WcharSink.c, lib/WcharSrc.c: Cleanup * client/client.h: Update * client/main.c: Remove unneded globals. * client/help.c: Use XawtextScrollAlways (temp kludge). 2002-05-23 Sergey Poznyakoff * include/Makefile.am: Added Xaw.h 2002-04-18 Sergey Poznyakoff * acconfig.h: Placeholder for USE_XAW3D * configure.in: Define USE_XAW3D if requested. * include/Xaw.h: (new) libXaw dependent definitions. * client/bushusearch.c: Removed lots of X11/Xaw includes. Include single file Xaw.h instead. * client/cornersearch.c: Likewise. * client/getfile.c: Likewise. * client/help.c: Likewise. * client/init.c: Likewise. * client/kanasearch.c: Likewise. * client/license.c: Likewise. * client/main.c: Likewise. * client/options.c: Likewise. * client/search.c: Likewise. * client/skipsearch.c: Likewise. * client/widgets.c: Likewise. * client/xref.c: Likewise. * client/msg.c: Include errno.h. * include/gjdictd.h: Include errno.h. Renamed global variable daemon to daemon_mode. * lib/WcharSink.h: Discern between Xaw and Xaw3d * lib/WcharSinkP.h: Likewise. * lib/WcharSrc.h: Likewise. * lib/WcharSrcP.h: Likewise. * lib/WcharText.c: Likewise. * lib/WcharText.h: Likewise. * server/log.c: Include errno.h. * server/main.c: Renamed global variable daemon to daemon_mode. 2001-11-06 Sergey Poznyakoff * server/main.c: -i (--ip-address) option. * server/search.c: Issue OK reply before starting to transmit data. In ascii mode, output results using udata(). 2001-11-04 Sergey Poznyakoff * client/init.c: Send BIN to server at startup. * dbs/iopen.c: Increase default number of index pages. * include/dict.h: Declare Xref structure. * makedict/index.c: Changed xref index strcture: it now has two subkeys, a jis code of kanji and its position in the sentence. This results in all cross-references being ordered by the position of the kanji in sentence. * makedict/output.c: Likewise. * server/search.c: Likewise. * server/gram.y: Special handling for binary mode. * server/server.c: Rudimentary implementation of ASCII mode. NB: the mode name itself seems to be a misnomer :^) Housekeeping: * .cvsignore: (new) * dbs/.cvsignore: (new) * fonts/.cvsignore: (new) * include/.cvsignore: (new) * lib/.cvsignore: (new) * makedict/.cvsignore: (new) * server/.cvsignore: (new) * utils/.cvsignore: (new) 2001-11-03 Sergey Poznyakoff Excavated this beast from among my old projects. As far as I can tell, this started on March, 1999. The RCS snapshots of DBS subsystem date back to September, 1998. Local Variables: mode: change-log version-control: never End: dico-2.2/INSTALL000066400000000000000000000366001172612674100133400ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. 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. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. 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 the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package 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 can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. 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: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. dico-2.2/Makefile.am000066400000000000000000000027101172612674100143360ustar00rootroot00000000000000# This file is part of GNU Dico # Copyright (C) 1998-2000, 2008-2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I gint -I imprimatur SUBDIRS=\ include\ utils\ examples\ gint\ gnu\ grecs\ lib\ libltdl\ dicod\ modules\ dico\ scripts\ imprimatur\ doc\ po #FIXME: add these when ready: makedict client fonts EXTRA_DIST = ChangeLog.2008 dist-hook: tar -C $(srcdir) -c -f - --exclude-vcs app dicoweb | \ tar -C $(distdir) -x -f - # Start Git ChangeLog from this date. gen_start_date = 2008-05-05 .PHONY: ChangeLog ChangeLog: $(AM_V_GEN)if test -d .git; then \ git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \ awk -f $(top_srcdir)/@GRECS_SUBDIR@/build-aux/git2chg.awk \ -vsince=$(gen_start_date) > ChangeLog; \ fi dico-2.2/Makefile.in000066400000000000000000001464341172612674100143630ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of GNU Dico # Copyright (C) 1998-2000, 2008-2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS THANKS TODO build-aux/config.guess \ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \ build-aux/missing build-aux/texinfo.tex build-aux/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I gint -I imprimatur SUBDIRS = \ include\ utils\ examples\ gint\ gnu\ grecs\ lib\ libltdl\ dicod\ modules\ dico\ scripts\ imprimatur\ doc\ po #FIXME: add these when ready: makedict client fonts EXTRA_DIST = ChangeLog.2008 # Start Git ChangeLog from this date. gen_start_date = 2008-05-05 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnits'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnits \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_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 case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am dist-hook: tar -C $(srcdir) -c -f - --exclude-vcs app dicoweb | \ tar -C $(distdir) -x -f - .PHONY: ChangeLog ChangeLog: $(AM_V_GEN)if test -d .git; then \ git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \ awk -f $(top_srcdir)/@GRECS_SUBDIR@/build-aux/git2chg.awk \ -vsince=$(gen_start_date) > ChangeLog; \ fi # 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: dico-2.2/NEWS000066400000000000000000000100061172612674100127760ustar00rootroot00000000000000GNU Dico NEWS -- history of user-visible changes. 2012-03-04 Copyright (C) 2008-2010, 2012 Sergey Poznyakoff See the end of file for copying conditions. Please send Dico bug reports to Version 2.2, 2012-03-04 * Configuration changes ** load-module The load-module form allows for a statement use, e.g.: load-module word; The above statement is equivalent to: load-module word { command "word"; } Either string or list of strings is accepted as argument. The latter is useful for loading several modules with a single statement, e.g.: load-module (stratall,substr,word); * New modules ** gcide This module provides support for GNU Collaborative International Dictionary of English. ** wordnet This module provides support for WordNet, a lexical database for the English language developed in the Princeton University and distributed under a BSD style license. ** word This module provides the following strategies: word "Match separate words within headwords" first "Match the first word within headwords" last "Match the last word within headwords" ** nprefix Provides the nprefix strategy. It is similar to prefix but returns the specified range of matches. For example MATCH nprefix ## returns at most headwords whose prefix matches , skipping first unique matches. ** pcre Provides matching strategy based on Perl regular expressions. ** pam Implements PAM authentication. * New utility: gcider "Gcider" is a window-based application for browsing the GNU Collaborative International Dictionary of English (see http://www.gnu.org/software/gcide). Version 2.1, 2010-07-07 * Normalize exit codes. The dicod server uses exit codes from sysexits.h. * Replies to MATCH command. The dictorg backend filters out duplicate entries from MATCH replies. Only the first one from a sequence of such duplicates is retained. * New configuration statements. ** prepend-load-path Acts much the same as module-load-path, but adds directories at front of the default Dico module directory. * Strategies ** All The `all' strategy has been re-implemented as a loadable module. To enable this strategy in daemon, load the `stratall' module: load-module stratall { command "stratall"; } ** Substr New strategy `substr' matches a substring anywhere in the headword. To enable this strategy, load the `substr' module: load-module substr { command "substr"; } * LDAP Dicod now supports LDAP as an underlying mechanism for storing user databases. The LDAP support is loaded as a module: load-module ldap { command "ldap"; } See the documentation, subsection 3.3.3.2 "LDAP Databases", for a detailed description. * Dicoweb Improved handling of databases without a descriptive name (previous version would throw exception for such cases). The file settings.py renamed to settings-sample.py. The file static/opensearch.xml has been moved to templates. If you are upgrading from an earlier version, you may safely remove it. * Bugfixes: ** Fixed improper handling of conversion errors in levenshtein.c (debian #582692) ** Removed the use of fixed-size buffer in dictorg.c (fixes debian #582708) Version 2.0, 2009-03-29 Initial version. ========================================================================= Copyright information: Copyright (C) 2008, 2009, 2010 Sergey Poznyakoff Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local variables: mode: outline paragraph-separate: "[ ]*$" eval: (add-hook 'write-file-hooks 'time-stamp) time-stamp-start: "changes. " time-stamp-format: "%:y-%02m-%02d" time-stamp-end: "\n" end: dico-2.2/README000066400000000000000000000147321172612674100131710ustar00rootroot00000000000000GNU Dico README Copyright (C) 2008-2010, 2012 Sergey Poznyakoff * Introduction ============== This file contains brief information about configuring, testing and running GNU Dico. It is *not* intended as a replacement for the documentation, but is provided as a brief reference only. The complete documentation for Dico is available in doc/ subdirectory. To read it without installing the package run `info -f doc/dico.info'. After the package is installed the documentation can be accessed running `info Dico'. Invoking `info dico' and `info dicod' (with a lower-case `d') will show you a concise description of the command line syntax (similar to a man-page style) of `dico' and `dicod' programs, correspondingly. An online copy of the documentation in various formats is available at http://dico.man.gnu.org.ua. * Overview ========== Dico is a flexible implementation of DICT server (RFC 2229). The server is modular: the daemon itself (dicod) provides only the server functionality, and knows nothing about database formats. Actual searches are performed by functions supplied in loadable modules. A single module can handle any number of database instances. The package includes several modules for searching in different dictionary databases, such as dict.org, WordNet and others. The server can be configured to handle both anonymous and authorized access. It supports a wide variety of authentication algorithms. Simpler configurations can keep the user database in plaintext files, while more complex ones can use LDAP. A console client program, `dico', is included. A module for lookups in Jim Breen's Kanjidic and Edict databases will be added in future. * What's in a name? =================== Dico is informal French for "Dictionary". It is pronounced "Deekoh", with the stress on the last syllable. * Modules ========= The package comes with the following modules: - dictorg This module handles databases in dict.org format. - outline Support for databases in Emacs outline format. This module is designed mostly as an example and for testing purposes. - gcide GNUCIDE dictionary support. - wordnet WordNet support. WordNet is a lexical database for the English language, created and maintained at the Cognitive Science Laboratory of Princeton University. - guile An abstract layer for interfacing with database modules written in Guile. - python An abstract layer for interfacing with database modules written in Python. - substr Defines the "substr" lookup strategy, which matches a supplied substring anywhere in the headword. - stratall Defines a special lookup strategy, named "all", which returns all headwords from the database. - word Defines the "word" lookup strategy, which matches a supplied word anywhere in the headword. - pcre Defines a strategy for using Perl-compatible regular expressions. - ldap Brings support for LDAP user databases. - pam Implements PAM authentication. * Building ========== As usual: $ ./configure $ make $ make install See INSTALL for the generic configure instructions. The rest of this section describes configuration options and variables specific for Dico. ** Default Preprocessor ------------------------ The runtime configuration system uses `m4' to preprocess the configuration file, which makes the configuration extremely flexible. We recommend to use GNU m4 as a preprocessor, although any other implementation of `m4' can be used as well. The `configure' script tries to determine the full file name of the preprocessor binary and the necessary command line options. In case it makes a wrong guess, you can instruct it to use a particular preprocessor by defining the `DEFAULT_PREPROCESSOR' configuration variable. For example, the following `configure' invocation instructs it to use `/usr/local/bin/gm4': $ ./configure DEFAULT_PREPROCESSOR="/usr/local/bin/gm4 -s" Note the use of the `-s' preprocessor option. It tells `m4' to produce line directives which help `dicod' produce correct diagnostics about eventual configuration errors. Unless your `m4' implementation does not have this feature, we recommend to always use it in `DEFAULT_PREPROCESSOR' value. Finally, if you do not wish to use preprocessor at all, use the `--without-preprocessor' option. ** Default Server ----------------- Unless given an explicit dictionary server, the client program `dico' attempts to connect the server `dict://dico.gnu.org.ua'. You can change this default by setting the DEFAULT_DICT_SERVER environment variable to the desired server hostname. For example: $ ./configure DEFAULT_DICT_SERVER=dict.org ** Guile Support ----------------- The "GNU's Ubiquitous Intelligent Language for Extensions" (Guile) can be used to write database modules for `dico'. This requires Guile version 1.8.4 or newer. The `configure' script will probe for the presence of Guile on your system and automatically enable its use if its version number is high enough. If you do not wish to use Guile, use `--without-guile' to disable it. ** WordNet database ------------------- If you plan to use WordNet database, you will most probably need the `--with-wordnet' option to inform the script about the location where WordNet libraries and headers can be found. For example, the command ./configure --with-wordnet=/usr/local/WordNet-3.0 instructs the script to look for WordNet library files in /usr/local/WordNet-3.0/lib and for include files in /usr/local/WordNet-3.0/include. ** Other Configure Settings ---------------------------- The `dicod' daemon uses syslog for diagnostics. The default syslog facility can be set using `LOG_FACILITY' configuration variable. Allowed arguments are `user', `daemon', `auth', `authpriv', `mail', `cron', and `local0' through `local7' (case insensitive). By default, the `daemon' facility is used. * Bug reporting. Send bug reports to . * Copyright information: Copyright (C) 2008-2010, 2012 Sergey Poznyakoff Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local Variables: mode: outline paragraph-separate: "[ ]*$" version-control: never End: dico-2.2/THANKS000066400000000000000000000006171172612674100132210ustar00rootroot00000000000000GNU Dico THANKS file. Many people further contributed to GNU Dico by reporting problems, suggesting various improvements or submitting actual code. Here is a list of these people. Help us keep it complete and exempt of errors. Goran Tal Karl Berry Marc Dequènes Wojciech Polak dico-2.2/TODO000066400000000000000000000006041172612674100127720ustar00rootroot00000000000000Dico TODO list. * Streams Drop stream functions from lib and import the stream library from Mailutils. It sprang off from Dico a couple of years ago and evolved into a pretty mature system. * Documentation. ** Add a pointer to ellinika.gnu.org.ua:dict. * A module for kanjidic/edict. * X client for the above. Local variables: mode: outline paragraph-separate: "[ ]*$" end: dico-2.2/aclocal.m4000066400000000000000000001211431172612674100141440ustar00rootroot00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_COND_IF -*- Autoconf -*- # Copyright (C) 2008 Free Software Foundation, Inc. # # This file 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. # serial 1 # _AM_COND_IF # _AM_COND_ELSE # _AM_COND_ENDIF # -------------- # These macros are only used for tracing. m4_define([_AM_COND_IF]) m4_define([_AM_COND_ELSE]) m4_define([_AM_COND_ENDIF]) # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) # --------------------------------------- # If the shell condition matching COND is true, execute IF-TRUE, # otherwise execute IF-FALSE. Allow automake to learn about conditional # instantiating macros (the AC_CONFIG_FOOS). AC_DEFUN([AM_COND_IF], [m4_ifndef([_AM_COND_VALUE_$1], [m4_fatal([$0: no such condition "$1"])])dnl _AM_COND_IF([$1])dnl if _AM_COND_VALUE_$1; then m4_default([$2], [:]) m4_ifval([$3], [_AM_COND_ELSE([$1])dnl else $3 ])dnl _AM_COND_ENDIF([$1])dnl fi[]dnl ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file 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. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file 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. # serial 16 # 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. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file 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. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file 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. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file 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. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $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]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009 Free Software Foundation, Inc. # # This file 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. # serial 1 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([imprimatur/imprimatur.m4]) m4_include([gint/gint.m4]) m4_include([gint/guile.m4]) m4_include([grecs/am/grecs.m4]) m4_include([am/gsasl.m4]) m4_include([am/lib.m4]) m4_include([am/testdir.m4]) m4_include([m4/00gnulib.m4]) m4_include([m4/alloca.m4]) m4_include([m4/argz.m4]) m4_include([m4/btowc.m4]) m4_include([m4/codeset.m4]) m4_include([m4/configmake.m4]) m4_include([m4/des.m4]) m4_include([m4/errno_h.m4]) m4_include([m4/extensions.m4]) m4_include([m4/fcntl-o.m4]) m4_include([m4/float_h.m4]) m4_include([m4/fprintftime.m4]) m4_include([m4/fseeko.m4]) m4_include([m4/getdelim.m4]) m4_include([m4/getdomainname.m4]) m4_include([m4/gethostname.m4]) m4_include([m4/getline.m4]) m4_include([m4/getopt.m4]) m4_include([m4/getpass.m4]) m4_include([m4/gettext.m4]) m4_include([m4/gettimeofday.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) m4_include([m4/hash.m4]) m4_include([m4/iconv.m4]) m4_include([m4/include_next.m4]) m4_include([m4/inline.m4]) m4_include([m4/intlmacosx.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttostr.m4]) m4_include([m4/inttypes-pri.m4]) m4_include([m4/inttypes.m4]) m4_include([m4/inttypes_h.m4]) m4_include([m4/langinfo_h.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) m4_include([m4/localcharset.m4]) m4_include([m4/locale-fr.m4]) m4_include([m4/locale-ja.m4]) m4_include([m4/locale-zh.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lseek.m4]) m4_include([m4/ltdl.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/malloc.m4]) m4_include([m4/mbrtowc.m4]) m4_include([m4/mbsinit.m4]) m4_include([m4/mbstate_t.m4]) m4_include([m4/mbtowc.m4]) m4_include([m4/md5.m4]) m4_include([m4/memchr.m4]) m4_include([m4/mmap-anon.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/netdb_h.m4]) m4_include([m4/nl_langinfo.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/printf.m4]) m4_include([m4/progtest.m4]) m4_include([m4/quote.m4]) m4_include([m4/quotearg.m4]) m4_include([m4/realloc.m4]) m4_include([m4/regex.m4]) m4_include([m4/sha1.m4]) m4_include([m4/size_max.m4]) m4_include([m4/snprintf.m4]) m4_include([m4/socketlib.m4]) m4_include([m4/sockets.m4]) m4_include([m4/socklen.m4]) m4_include([m4/ssize_t.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stddef_h.m4]) m4_include([m4/stdint.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/stdio_h.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/strerror.m4]) m4_include([m4/strftime.m4]) m4_include([m4/string_h.m4]) m4_include([m4/strtoimax.m4]) m4_include([m4/strtol.m4]) m4_include([m4/strtoll.m4]) m4_include([m4/strtoul.m4]) m4_include([m4/strtoull.m4]) m4_include([m4/strtoumax.m4]) m4_include([m4/sys_socket_h.m4]) m4_include([m4/sys_time_h.m4]) m4_include([m4/sysexits.m4]) m4_include([m4/time_h.m4]) m4_include([m4/time_r.m4]) m4_include([m4/tm_gmtoff.m4]) m4_include([m4/unistd_h.m4]) m4_include([m4/vasnprintf.m4]) m4_include([m4/vasprintf.m4]) m4_include([m4/warn-on-use.m4]) m4_include([m4/wchar_h.m4]) m4_include([m4/wchar_t.m4]) m4_include([m4/wcrtomb.m4]) m4_include([m4/wctype_h.m4]) m4_include([m4/wint_t.m4]) m4_include([m4/xalloc.m4]) m4_include([m4/xsize.m4]) dico-2.2/am/000077500000000000000000000000001172612674100126775ustar00rootroot00000000000000dico-2.2/am/gsasl.m4000066400000000000000000000037511172612674100142600ustar00rootroot00000000000000dnl This file is part of GNU mailutils. dnl Copyright (C) 2003, 2007-2008, 2012 Free Software Foundation, Inc. dnl dnl GNU Mailutils is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3, or (at your option) dnl any later version. dnl dnl GNU Mailutils is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License along dnl with GNU Mailutils; if not, write to the Free Software Foundation, dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA dnl AC_DEFUN([MU_CHECK_GSASL], [AC_CACHE_VAL([mu_cv_lib_gsasl], [if test "x$mu_cv_lib_gsasl" = x; then cached="" mu_cv_lib_gsasl=no AC_ARG_WITH(gsasl, AC_HELP_STRING([--with-gsasl], [use libgsasl for SASL authentication]), [case $withval in yes|no) wantgsasl=$withval;; *) AC_MSG_ERROR([bad value for --with-gsasl: $withval]);; esac], [wantgsasl=yes]) if test $wantgsasl = yes; then AC_CHECK_HEADER(gsasl.h, [:], [wantgsasl=no]) if test $wantgsasl != no; then save_LIBS=$LIBS AC_SEARCH_LIBS(gsasl_init, gsasl, [mu_cv_lib_gsasl=-lgsasl], [mu_cv_lib_gsasl=no]) if test $mu_cv_lib_gsasl != no; then LIBS="$LIBS $mu_cv_lib_gsasl" AC_TRY_RUN([ #include int main() { return gsasl_check_version ("$1") == (char*) 0; }], [:], [mu_cv_lib_gsasl=no], [mu_cv_lib_gsasl=no]) fi LIBS=$save_LIBS fi fi fi]) if test $mu_cv_lib_gsasl != no; then AC_SUBST(GSASL_LIBS,$mu_cv_lib_gsasl) ifelse([$2],,,[$2]) fi]) dico-2.2/am/lib.m4000066400000000000000000000033771172612674100137210ustar00rootroot00000000000000# This file is part of GNU Dico # Copyright (C) 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . dnl Arguments: dnl $1 -- Library to look for dnl $2 -- Function to check in the library dnl $3 -- Any additional libraries that might be needed dnl $4 -- Action to be taken when test succeeds dnl $5 -- Action to be taken when test fails dnl $6 -- Directories where the library may reside AC_DEFUN([DICO_CHECK_LIB], [m4_ifval([$4], , [AH_CHECK_LIB([$1])])dnl AS_VAR_PUSHDEF([dico_lib], [mu_cv_lib_$1])dnl AC_CACHE_CHECK([for $2 in -l$1], [dico_lib], [AS_VAR_SET([dico_lib], [no]) dico_check_lib_save_LIBS=$LIBS for path in "" $6 do if test -n "$path"; then dico_ldflags="-L$path -l$1 $3" else dico_ldflags="-l$1 $3" fi LIBS="$dico_ldflags $mu_check_lib_save_LIBS" AC_LINK_IFELSE([AC_LANG_CALL([], [$2])], [AS_VAR_SET([dico_lib], ["$mu_ldflags"]) break]) done LIBS=$dico_check_lib_save_LIBS]) AS_IF([test "AS_VAR_GET([dico_lib])" != no], [m4_default([$4], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) LIBS="-l$1 $LIBS" ])], [$5])dnl AS_VAR_POPDEF([dico_lib])dnl ])# DICO_CHECK_LIB dico-2.2/am/testdir.m4000066400000000000000000000014721172612674100146230ustar00rootroot00000000000000# testdir.m4 serial 1 # This file is part of GNU Dico # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AC_DEFUN([DICO_TESTS],[ AC_CONFIG_TESTDIR($1/tests) AC_CONFIG_FILES($1/tests/Makefile) AC_CONFIG_FILES($1/tests/atlocal) ])dico-2.2/app/000077500000000000000000000000001172612674100130625ustar00rootroot00000000000000dico-2.2/app/python/000077500000000000000000000000001172612674100144035ustar00rootroot00000000000000dico-2.2/app/python/mediawiki.py000066400000000000000000000115001172612674100167150ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import sys import re import socket import urllib2 from htmlentitydefs import name2codepoint from xml.dom import minidom from wit import wiki2text # Set utf-8 as the default encoding. # Trying to do so using encode('utf_8')/unicode, which is # supposed to be the right way, does not work. # Simply calling sys.setdefaultencoding is not possible, # because, for some obscure reason, Python chooses to delete # this symbol from the namespace after setting its default # encoding in site.py. That's why reload is needed. reload(sys) sys.setdefaultencoding('utf-8') try: import json except ImportError: import simplejson as json import dico __version__ = '1.03' class DicoModule: user_agent = 'Mozilla/1.0' endpoint_match = '/w/api.php?action=opensearch&format=json&search=' endpoint_define = '/wiki/Special:Export/' def __init__ (self, *argv): self.wikihost = argv[0] socket.setdefaulttimeout (4) dico.register_markup ('wiki') def open (self, dbname): self.dbname = dbname return True def close (self): return True def descr (self): return self.wikihost def info (self): return False def define_word (self, word): url = 'http://%s%s%s' % (self.wikihost, self.endpoint_define, urllib2.quote (word)) req = urllib2.Request (url) req.add_header ('User-Agent', self.user_agent) try: xml = urllib2.urlopen (req).read () except urllib2.URLError: return False dom = minidom.parseString (xml) el = dom.getElementsByTagName ('text') if len (el): data = el[0].firstChild.data if dico.current_markup () != 'wiki': data = self.__htmlentitydecode (data).encode ('utf_8') wikiparser = wiki2text.TextWiktionaryMarkup (text=data) wikiparser.parse () data = str (wikiparser) return ['define', data] else: return False def match_word (self, strat, key): url = 'http://%s%s%s' % (self.wikihost, self.endpoint_match, urllib2.quote (key.word)) req = urllib2.Request (url) req.add_header ('User-Agent', self.user_agent) try: result = json.load (urllib2.urlopen (req)) if result: if strat.has_selector: fltres = [] for k in result[1]: if strat.select (k, key): fltres.append (k) if fltres.count > 0: return ['match', sorted(fltres, key=unicode.lower)] else: result[1].sort () return ['match', sorted(result[1], key=unicode.lower)] return False except urllib2.URLError: return False def output (self, rh, n): if rh[0] == 'define': try: print rh[1].encode ('utf_8'), except UnicodeDecodeError: print rh[1], else: list = rh[1] sys.stdout.softspace = 0 try: print list[n].encode ('utf_8'), except UnicodeDecodeError: print list[n], return True def result_count (self, rh): if rh[0] == 'define': return 1 else: return len (rh[1]) def compare_count (self, rh): return 1 def result_headers (self, rh, hdr): if dico.current_markup () != 'wiki': hdr['Content-Type'] = 'text/plain'; elif '.wikipedia.org' in self.wikihost: hdr['Content-Type'] = 'text/x-wiki-wikipedia'; elif '.wiktionary.org' in self.wikihost: hdr['Content-Type'] = 'text/x-wiki-wiktionary'; else: hdr['Content-Type'] = 'text/x-wiki'; return hdr def free_result (self, rh): pass def __htmlentitydecode (self, s): return re.sub ('&(%s);' % '|'.join (name2codepoint), lambda m: unichr (name2codepoint[m.group (1)]), s) dico-2.2/app/python/wit/000077500000000000000000000000001172612674100152065ustar00rootroot00000000000000dico-2.2/app/python/wit/__init__.py000066400000000000000000000013511172612674100173170ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008 Sergey Poznyakoff # # 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 3, 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, see . __all__ = [ "wiki2html", "wiki2text" ] dico-2.2/app/python/wit/build-aux/000077500000000000000000000000001172612674100171005ustar00rootroot00000000000000dico-2.2/app/python/wit/build-aux/extrns.php000066400000000000000000000027161172612674100211420ustar00rootroot00000000000000 $val) { if ($val == '') continue; if (preg_match('/(.*)\$1(.*)/', $val, $matches)) array_push($reg, array($matches[1], $matches[2], $ns)); else printf(" \"%s\": \"%s\",\n", $val, $ns); } print "}\n"; if (count($reg)) { array_push($ns_res, $lang); printf("wiki_ns_re_%s = [\n", $lang); foreach ($reg as $val) { printf(" (\"%s\", \"%s\", \"%s\"),\n", $val[0], $val[1], $val[2]); } print "]\n"; } } } function process_dir($dir) { if (!($dp = opendir ($dir))) die ("Can't open data directory."); while ($name = readdir ($dp)) { if (preg_match('|.*/?Messages([A-Z][a-z_-]+).php|', $name, $matches)) { $lang = strtolower($matches[1]); #print "$lang\n"; select_ns($name, $lang); } } closedir ($dp); } echo "# This file is generated automatically. Do not edit.\n"; echo "# -*- coding: utf-8 -*-\n"; process_dir("."); print "wiki_ns = {\n"; if (count($nss)) { foreach ($nss as $lang) printf(" \"%s\": wiki_ns_%s,\n", $lang, $lang); } print "}\n"; print "wiki_ns_re = {\n"; if (count($ns_res)) { foreach ($nss as $lang) printf(" \"%s\": wiki_ns_re_%s,\n", $lang, $lang); } print "}\n"; ?> dico-2.2/app/python/wit/setup.py000066400000000000000000000026671172612674100167330ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008,2009 Sergey Poznyakoff # # 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 3, 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, see . from distutils.core import setup import wikimarkup setup(name='wit', version='0.1', author='Sergey Poznyakoff', author_email='gray@gnu.org.ua', url='http://gray.gnu.org.ua/', package_dir = {'wit': ''}, packages=['wit'], license='GPL License', description='Wiki markup translator.', platforms=['any'], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Processing :: Markup' ] ) dico-2.2/app/python/wit/test.py000066400000000000000000000035631172612674100165460ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008 Sergey Poznyakoff # # 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 3, 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, see . import unittest import wiki2html class TestMarkupParserBasic (unittest.TestCase): def test_colon(self): self.assert_(self.__test('colon')) pass def test_headings(self): self.assert_(self.__test('headings')) pass def test_hz(self): self.assert_(self.__test('hz')) pass def test_numlist(self): self.assert_(self.__test('numlist')) pass def test_unlist(self): self.assert_(self.__test('unlist')) pass def test_door(self): self.assert_(self.__test('door')) pass def test_drzwi(self): self.assert_(self.__test('drzwi')) pass def __test(self, filename): name_in = 'testdata/' + filename + '.wiki' name_out = 'testdata/' + filename + '.html' fh = open(name_out) buf = ''.join(fh.readlines()).strip() hwm = wiki2html.HtmlWiktionaryMarkup(filename=name_in, lang="pl") hwm.parse() if str(hwm).strip() == buf: return True # fail print "\n>>>%s<<<" % buf print ">>>%s<<<" % str(hwm).strip() return False if __name__ == '__main__': unittest.main() dico-2.2/app/python/wit/testdata/000077500000000000000000000000001172612674100170175ustar00rootroot00000000000000dico-2.2/app/python/wit/testdata/bold.wiki000066400000000000000000000000621172612674100206220ustar00rootroot00000000000000now is the time for '''all good''' men to come to dico-2.2/app/python/wit/testdata/boldit0.wiki000066400000000000000000000000661172612674100212430ustar00rootroot00000000000000now is the time for '''''all good''''' men to come to dico-2.2/app/python/wit/testdata/boldit1.wiki000066400000000000000000000000661172612674100212440ustar00rootroot00000000000000now is the time for ''all '''good''''' men to come to dico-2.2/app/python/wit/testdata/boldit2.wiki000066400000000000000000000000661172612674100212450ustar00rootroot00000000000000now is the time for '''all ''good''''' men to come to dico-2.2/app/python/wit/testdata/boldit3.wiki000066400000000000000000000000661172612674100212460ustar00rootroot00000000000000now is the time for ''all '''good''' men'' to come to dico-2.2/app/python/wit/testdata/boldit4.wiki000066400000000000000000000000601172612674100212410ustar00rootroot00000000000000'''''Door''' files kan ik niet op tijd komen.'' dico-2.2/app/python/wit/testdata/boldit5.wiki000066400000000000000000000000601172612674100212420ustar00rootroot00000000000000'''''Door'' files kan ik niet op tijd komen.''' dico-2.2/app/python/wit/testdata/colon.html000066400000000000000000000005271172612674100210230ustar00rootroot00000000000000

A colon (:) indents a line or paragraph.
A newline starts a new paragraph. Should only be used on talk pages. For articles, you probably want the blockquote tag.
We use 1 colon to indent once.
We use 2 colons to indent twice.
3 colons to indent 3 times, and so on.
dico-2.2/app/python/wit/testdata/colon.wiki000066400000000000000000000004251172612674100210170ustar00rootroot00000000000000: A colon (:) indents a line or paragraph. A newline starts a new paragraph. Should only be used on talk pages. For articles, you probably want the blockquote tag. : We use 1 colon to indent once. :: We use 2 colons to indent twice. ::: 3 colons to indent 3 times, and so on. dico-2.2/app/python/wit/testdata/dom.wiki000066400000000000000000000140141172612674100204630ustar00rootroot00000000000000[[cs:dom]] [[de:dom]] [[el:dom]] [[en:dom]] [[es:dom]] [[fr:dom]] [[ko:dom]] [[hr:dom]] [[io:dom]] [[id:dom]] [[is:dom]] [[it:dom]] [[ky:dom]] [[ku:dom]] [[lt:dom]] [[li:dom]] [[hu:dom]] [[nl:dom]] [[oc:dom]] [[om:dom]] [[pt:dom]] [[sl:dom]] [[fi:dom]] [[sv:dom]] [[vi:dom]] [[tr:dom]] [[uk:dom]] [[vo:dom]] [[zh:dom]] {{zobteż|DOM|Dom}} == dom ({{jÄ™zyk polski}}) == [[Grafika:BrunnHeiligenstadtBauernhaus.jpg|thumb|right|200px|dom (1.1)]] {{wymowa}} {{lp}} {{IPA|dÉ”m}} {{audio|Pl-dom.ogg}} {{audio|dom.ogg}} {{lm}} {{IPA2|ˈdÉ”mɨ}} {{znaczenia}} ''rzeczownik, rodzaj mÄ™ski'' : (1.1) [[budynek]] [[mieszkalny]] : (1.2) [[pomieszczenie]], [[miejsce]] [[staÅ‚y|staÅ‚ego]] [[zamieszkanie|zamieszkania]] ([[pobyt]]u) : (1.3) [[placówka]] [[spoÅ‚eczny|spoÅ‚eczna]] [[lub]] [[handlowy|handlowa]] : (1.4) [[ród]], [[rodzina]], [[dynastia]] {{odmiana}} {{lp}} dom, ~u, ~owi, ~, ~em, ~u, ~u; {{lm}} dom|y, ~ów, ~om, ~y, ~ami, ~ach, ~y {{przykÅ‚ady}} : (1.1) ''[[w|W]] [[miasto|mieÅ›cie]] [[wyrosnąć|wyrosÅ‚o]] [[wiele]] [[nowy]]ch '''domów.''''' : (1.2) ''[[szkoÅ‚a|SzkoÅ‚a]] [[być|jest]] [[drugi]]m '''domem''' [[uczeÅ„|ucznia]].'' : (1.3) ''[[za|Za]] [[kradzież]] [[dokonywać|dokonanÄ…]] [[w]] '''domu''' [[handlowy]]m [[trafiać|trafiÅ‚]] [[do]] '''domu''' [[poprawczy|poprawczego]].'' : (1.4) ''...[[Joanna]] Kowalska, [[z]] '''domu''' Nowak''. {{skÅ‚adnia}} {{kolokacje}} (1.1) [[budować]]/[[burzyć]]/[[remontować]] '''~''', [[stary]]/[[nawiedzony]] '''~'''; (1.2) [[uciec]] [[z]] '''~u''', [[nie]] [[mieć]] '''~u'''; (1.3) '''~''' [[poprawczy]]/[[handlowy]]/[[towarowy]]/[[studencki]]; (1.4) [[dziecko]] [[z]] [[dobry|dobrego]]/[[porzÄ…dny|porzÄ…dnego]]/[[biedny|biednego]] '''~u''' {{synonimy}} (1.1) [[blok]], [[budynek]], [[chaÅ‚upa]], [[chata]], [[dach nad gÅ‚owÄ…]], [[dwór]], [[gniazdo rodzinne]], [[kamienica]], [[mieszkanie]], [[ojcowska strzecha]], [[ognisko domowe]], [[paÅ‚ac]], [[pielesze]], [[przybytek]], [[rezydencja]], [[siedlisko]], [[wieżowiec]], [[wÅ‚asny kÄ…t]], [[zamek]] {{antonimy}} {{pokrewne}} {{rzecz}} [[bezdomność]], [[domator]]/[[domatorka]], [[domownik]], [[podomka]]; {{przym}} [[domowy]], [[przydomowy]] {{frazeologia}} (1.1) [[szklane domy]]; (1.2) [[dom boży]]; (1.3) [[dom dziecka]], [[dom publiczny]] {{etymologia}} {{uwagi}} {{tÅ‚umaczenia}} * angielski: (1.1) [[house]]; (1.2) [[home]] * arabski: (1.1) [[آلمنزل]]; (1.2) [[آلدار]] * biaÅ‚oruski: (1.1) [[дом]] {{m}} * buÅ‚garski: (1.1) [[къща]] {{f}} * chorwacki: (1.1) [[kuća]] {{f}} * czeski: (1.1) [[dům]] {{m}} * dolnoÅ‚użycki: (1.1) [[#dom (jÄ™zyk dolnoÅ‚użycki)|dom]] {{m}} * duÅ„ski: (1.1) [[hus]] {{n}}; (1.2) [[hjem]] {{n}} * esperanto: (1.1) [[domo]]; (1.4) [[hejmo]] * fiÅ„ski: (1.1) [[talo]]; (1.2) [[koti]] * francuski: (1.1-2,4) [[maison]] {{f}} * górnoÅ‚użycki: (1.1) [[#dom (jÄ™zyk górnoÅ‚użycki)|dom]] {{m}} * grecki: (1.1-2,4) [[σπίτι]] {{n}}; (1.1-4) [[οίκος]] {{m}}; (1.3) [[κατάστημα]] {{n}} * hawajski: (1.1) [[hale]] * hiszpaÅ„ski: (1.1-4) [[casa]] {{f}} * hebrajski: (1.1-4) [[בית]] {{m}} (bajit) * interlingua: (1.1) [[casa]] * irlandzki: (1.1) [[teach]] {{m}} * islandzki: (1.1) [[hús]] {{n}}; (1.2) [[heimili]] {{n}}; (1.3) [[hús]] {{n}}; (1.4) [[ætt]] * japoÅ„ski: (1.1) ([[ã†ã¡]], uchi) * jidysz: (1.1) [[הויז]] {{n}} (hojz); (1.2) [[×”×™×™×]] {{f}} (hejm); (1.3) ...[[בית]]Ö¾ {{n}} (bejs-...) * kaszubski: (1.1-2) [[dóm]] {{m}}, [[chëcz]] {{f}} * kataloÅ„ski: (1.1-4) [[casa]] {{f}} * klingoÅ„ski: (1.1) [[juh|juH]] * krymskotatarski: (1.1) [[üy]] * litewski: (1.1) [[namas]] {{m}} * macedoÅ„ski: (1.1) [[куќа]] {{f}} * niemiecki: (1.1,3) [[Haus]] {{n}} (1.2) [[Heim]] {{n}} * norweski (bokmÃ¥l): (1.1) [[hus#hus (jÄ™zyk norweski)|hus]] {{n}} * perski: (1.1) [[خانÙÙ‡|خانه]] (khÄneh) * portugalski: (1.1,3) [[casa]] {{f}}; (1.2) [[casa]] {{f}}, [[lar]] {{m}}, [[residência]] {{f}} * rosyjski: (1.1) [[дом]] {{m}} * rumuÅ„ski: (1.1) [[casă]] {{f}} * serbski: (1.) [[дом]] {{m}} * slovio: (1.1) [[domo]] * sÅ‚owacki: (1.1) [[#dom (jÄ™zyk sÅ‚owacki)|dom]] * szwedzki: (1.1) [[hus#hus (jÄ™zyk szwedzki)|hus]] {{n}} (1.2) [[hem]] {{n}} * turecki: (1.1) [[ev]] * ukraiÅ„ski: (1.1-2) [[дім]] {{m}}; (1.3) [[будинок]] {{m}} * wÄ™gierski: (1.1) [[ház]] * wÅ‚oski (1.1) [[casa]] {{f}} == dom ({{jÄ™zyk dolnoÅ‚użycki}}) == {{wymowa}} {{znaczenia}} ''rzeczownik, rodzaj mÄ™ski'' : (1.1) [[#dom (jÄ™zyk polski)|dom]] : (1.2) [[katedra]] {{odmiana}} {{lp}} dom, ~a, ~oju, ~, ~om, ~je; {{du}} ~a, ~owo, ~owa, ~a, ~oma, ~oma; {{lm}} ~y, ~ow, ~am, ~y, ~ami, ~ach {{przykÅ‚ady}} : (1.1) ''[[wón|Wón]] [[byÅ›|jo]] [[wóna|jej]] '''dom''' [[wugotowaÅ›|wugótowaÅ‚]]''. → [[on#on (jÄ™zyk polski)|On]] [[zapisać|zapisaÅ‚]] [[ona|jej]] '''[[#dom (jÄ™zyk polski)|dom]]''' [[w]] [[testament|testamencie]]. {{skÅ‚adnia}} {{kolokacje}} '''dom''' [[za]] [[stary#stary (jÄ™zyk dolnoÅ‚użycki)|starych]] [[luź]]i → [[dom]] [[starzec|starców]] {{synonimy}} {{antonimy}} {{pokrewne}} {{przysÅ‚}} [[doma]], [[domoj]] {{frazeologia}} {{etymologia}} (1.2) {{etym|niem|Dom}} {{uwagi}} == dom ({{esperanto}}) == {{wymowa}} {{znaczenia}} ''morfem'' : (1.1) [[#dom (jÄ™zyk polski)|dom]] ''(budynek)'' {{odmiana}} {{przykÅ‚ady}} : (1.1) {{skÅ‚adnia}} {{kolokacje}} {{synonimy}} {{antonimy}} {{pochodne}} {{rzecz}} [[domo]] {{frazeologia}} {{etymologia}} {{uwagi}} {{por|hejm}} == dom ({{jÄ™zyk górnoÅ‚użycki}}) == {{wymowa}} {{znaczenia}} ''rzeczownik, rodzaj mÄ™ski'' : (1.1) [[#dom (jÄ™zyk polski)|dom]] : (1.2) [[katedra]] {{odmiana}} {{przykÅ‚ady}} : (1.1) {{skÅ‚adnia}} {{kolokacje}} {{synonimy}} {{antonimy}} {{pokrewne}} {{frazeologia}} {{etymologia}} {{uwagi}} == dom ({{slovio}}) == {{wymowa}} {{znaczenia}} ''rzeczownik'' : (1.1) [[#dom (jÄ™zyk polski)|dom]] {{odmiana}} {{przykÅ‚ady}} : (1.1) ''[[oni|Oni]] [[kupit|kupili]] [[starju]] '''dom''' [[vo]] [[malgrod]]''. → Oni [[kupić|kupili]] [[stary]] '''[[#dom (jÄ™zyk polski)|dom]]''' [[na]] [[wieÅ›|wsi]]. {{skÅ‚adnia}} {{kolokacje}} {{synonimy}} (1.1) [[domo]] {{antonimy}} {{pokrewne}} {{czas}} [[domovit]] {{frazeologia}} {{etymologia}} {{uwagi}} ''zapis cyrylicÄ…'' [[дом]] dico-2.2/app/python/wit/testdata/door.html000066400000000000000000000350271172612674100206570ustar00rootroot00000000000000
wikipedia:

English


rank:

Pronunciation

thumb|right|A door.
  • a enPR, IPA, SAMPA
    • rhymes
  • a enPR, IPA, SAMPA
    • audio
  • homophones qualifier

Etymology

From etyl term < etyl term, term < proto < proto. Cognates include Gothic term, Danish term, German term ( < Old High German term), Icelandic term ( < Old Norse term), Latin term, Modern Greek term ( < Ancient Greek term), Persian term, and Russian term.

Noun


wikipedia:

en-noun:
  1. A portal of entry into a building or room, consisting of a rigid plane movable on a hinge. Doors are frequently made of wood or metal. May have a handle to help open and close, a latch to hold the door closed , and a lock that ensures the door cannot be opened without the key.
    1. I knocked on the vice president's door
  2. An non-physical entry into the next world, a particular feeling, a company, etc.
    1. Keep a dooron your anger.

Translations


trans-top:

trans-mid:

trans-bottom:

Derived terms

Verb


en-verb:
  1. transitive To cause a collision by opening the door of a vehicle in the front of (an oncoming cyclist or pedestrian).
Category:1000 English basic words

Dutch

Pronunciation

  • audio
  • IPA

Preposition


infl:
  1. through
    1. Hij schoot de bal doorhet raam. &mdash; He kicked the ball throughthe window.
  2. around within an enclosed space
    1. Dolenthousiast rende het hondje doorde kamer. &mdash; Very enthusiastically the puppy ran aroundthe room.
  3. because of
    1. Doorfiles kan ik niet op tijd komen. &mdash; Because oftraffic jams I'm unable to arrive on time.

Synonyms

Postposition


infl:
  1. through (implying motion)
    1. Ik rijd nu de stad door &mdash; I'm now driving throughthe city.
  2. around within an enclosed space
    1. Dolenthousiast rende het hondje de kamer door &mdash; Very enthusiastically the puppy ran aroundthe room.

Adverb


infl:
  1. through, forward, on
    1. Ondanks slecht weer ging het feest ging toch door.&mdash; Despite bad weather, the party went onanyway.

Derived terms


top4:

bottom:

Conjunction


infl:
  1. by
    1. Hij vermeed een confrontatie doorde andere kant op te lopen. &mdash; He avoided a confrontation bywalking the other way.

Derived terms

አማርኛ Englisc العربية ÄŒesky Deutsch Eesti Ελληνικά Español ÙØ§Ø±Ø³ÛŒ Français 한국어 Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ Ido Bahasa Indonesia Italiano Қазақша Kurdî / كوردی ລາວ Lietuvių Limburgs Magyar Nederlands 日本語 Norsk (BokmÃ¥l) Occitan Oyghurque ភាសាážáŸ’មែរ Polski Português Simple English СрпÑки / Srpski Suomi Svenska தமிழ௠తెలà±à°—ౠไทย Tiếng Việt Türkçe УкраїнÑька 中文 dico-2.2/app/python/wit/testdata/door.wiki000066400000000000000000000167741172612674100206660ustar00rootroot00000000000000{{wikipedia|Door (disambiguation)}} ==English== {{rank|myself|morning|money|275|door|round|kind|form}} ===Pronunciation=== [[Image:Doorway La Ronce National Trust for Jersey.jpg|thumb|right|A door.]] * {{a|RP}} {{enPR|dô(r)}}, {{IPA|/dÉ”Ë(ɹ)/}}, {{SAMPA|/dO:(r)/}} *: {{rhymes|É”Ë(r)}} * {{a|US}} {{enPR|dôr}}, {{IPA|/dÉ”Ëɹ/|/doʊɹ/}}, {{SAMPA|/dO:r/|/doUr/}} *: {{audio|en-us-door.ogg|Audio (US)}} * {{homophones|daw}} {{qualifier|in [[non-rhotic]] accents}} ===Etymology=== From {{etyl|enm|en}} {{term|dor|lang=enm}} < {{etyl|ang|en}} {{term|duru||door|lang=ang}}, {{term|dor||gate|lang=ang}} < {{proto|Germanic|dur-|lang=en}} < {{proto|Indo-European|dʰwer-||dʰwor-|doorway, door, gate|lang=en}}. Cognates include Gothic {{term|ðŒ³ðŒ°ðŒ¿ð‚|sc=Goth|tr=daúr|lang=got}}, Danish {{term|dør}}, German {{term|Tür|lang=de}} ( < Old High German {{term|turi|lang=goh}}), Icelandic {{term|dyr|lang=is}} ( < Old Norse {{term|dyrr|lang=non}}), Latin {{term|foris|lang=la}}, Modern Greek {{term|sc=Grek|θÏÏα|tr=thýra}} ( < Ancient Greek {{term|sc=polytonic|θÏÏα|tr=thura|lang=grc}}), Persian {{term|sc=fa-Arab|در|tr=dar|lang=fa}}, and Russian {{term|sc=Cyrl|дверь|tr=dver’|lang=ru}}. ===Noun=== {{wikipedia}} {{en-noun}} # A [[portal]] of entry into a building or room, consisting of a rigid plane movable on a [[hinge]]. Doors are frequently made of [[wood]] or [[metal]]. May have a [[handle]] to help open and close, a [[latch]] to hold the door closed{{,}} and a [[lock]] that ensures the door cannot be opened without the key. #: ''I knocked on the vice president's '''door''''' # An non-physical entry into the next world, a particular feeling, a company, etc. #: ''Keep a '''door''' on your anger.'' ====Translations==== {{trans-top|portal of entry into a building or room}} * Albanian: [[derë]] * Arabic: {{Arab|[[باب|بَابٌ]]}} {{IPAchar|(bÄb)}} {{m}}, {{Arab|[[باب|أبْوَاب]]}} {{IPAchar|(’abwÄb)}} {{p}} * Aramaic: *: Syriac: [[ܬܪܥÜ]] (tar‘Ä’, tar‘o’) {{m}} *: Hebrew: [[תרע×]] (tar‘Ä’, tar‘o’) {{m}} * Armenian: {{t+|hy|Õ¤Õ¸Ö‚Õ¼|sc=Hayeren|xs=Armenian}} (duá¹™) * [[Basque]]: [[ate]] * Bengali: [[দরজা]] * Bosnian: [[vrata]] {{f|s}}/{{p}} * [[Breton]]: [[dor]] {{f}}, dorioù {{p}} ''(note:'' nor ''after article in the singular)'' * Bulgarian: {{t+|bg|врата|n|p|tr=vrata|sc=Cyrl}} * [[Catalan]]: [[porta]] {{f}} * Chinese: [[é–€]], [[é—¨]] (mén) * Croatian: {{t-|hr|vrata|n|p}} * Czech: {{t-|cs|dveÅ™e|f|p}} * Danish: {{t-|da|dør}} * Dutch: {{t+|nl|deur|f}} * Esperanto: {{t+|eo|pordo|xs=Esperanto}} * Estonian: {{t+|et|uks}} * [[Ewe]]: [[ʋɔtru]] {{n}} * Faroese: {{t-|fo|dyr|xs=Faroese}}, {{t-|fo|hurð|xs=Faroese}} * Finnish: {{t+|fi|ovi}} * French: {{t+|fr|porte|f}} * Georgian: [[კáƒáƒ áƒ˜]] (kari) * German: [[Tür]] {{f}}, [[Türen]] {{p}}, [[Türe]] {{f}} * Greek: {{t+|el|πόÏτα|f|tr=pórta|sc=Grek}}, {{t+|el|θÏÏα|f|tr=thýra|sc=Grek}} ** Ancient Greek: {{t+|el|θÏÏα|f|tr=thýra|sc=Grek}} * Hebrew: [[דלת]] (délet) {{f}} * Hindi: [[दरवाज़ा]] (darvÄzÄ) {{m}} * Hungarian: [[ajtó]], [[kapu]], [[bejárat]]; [[ajtónyílás]] * Indonesian: {{t-|id|pintu|xs=Indonesian}} * Irish: {{t-|ga|doras|m|xs=Irish}} * Italian: {{t+|it|porta|f}}, {{t-|it|portiera|f}}, {{t+|it|sportello|m}} * Japanese: [[戸]] ([[ã¨]], to), [[扉]] ([[ã¨ã³ã‚‰]], tobira), [[ドア]] (dóa) * {{trreq|Kannada}} * Korean: [[문]] (mun) * Kurdish: {{t+|ku|derî|m}}, {{t+|ku|dergeh|m}}, {{t+|ku|ده‌رگا|sc=KUchar}}, {{t+|ku|قاپی|sc=KUchar}} * Lao: {{t|lo|ປະຕູ|tr=pa-tuu|sc=Laoo}} * Latin: {{t-|la|ostium|n}}, {{t+|la|ianua|f}} {{trans-mid}} * Latvian: [[durvis]] {{m}} * Lithuanian: {{t-|lt|durys|xs=Lithuanian}} * [[Lower Sorbian]]: [[źurja]] {{p}} * Malay: {{t+|ms|pintu|xs=Malay}} * [[Malayalam]]: [[വാതിലàµâ€]], [[കതകàµ]], [[കവാടം]], [[à´ªàµà´°à´µàµ‡à´¶à´¨à´®àµà´–à´‚]] * Maltese: [[bieb]] {{m}} * [[Marathi]]: [[दरवाजा]] (darvÄjÄ), [[दार]] (dÄr) * Mongolian: [[үүд]] (üüd) * Norwegian: {{t-|no|dør|m}} * Old English: {{t+|ang|duru|xs=Old English}}, {{t-|ang|dor|xs=Old English}} * {{trreq|Oriya}} * Persian: {{fa-Arab|[[در]]}} (dar) * Polish: {{t+|pl|drzwi|n|p}} * Portuguese: {{t+|pt|porta|f}} * [[Punjabi]]: [[ਬੂਹਾ]] (bÅ«hÄ), [[ਦਰਵਾਜ਼ਾ]] (darvÄzÄ) * Romanian: {{t+|ro|uşă|f}} * Russian: [[дверь]] (dver’) {{f}} * Sanskrit: [[दà¥à¤µà¤¾à¤°à¤‚]] * [[Scottish Gaelic]]: [[dorus]] {{m}} * Serbian: {{t-|sr|врата|f|sc=Cyrl}}, {{t-|sr|vrata|f}} * Slovak: {{t-|sk|dvere|f|p}} * Slovene: {{t+|sl|vrata|n|p}} * Spanish: {{t+|es|puerta|f}} * Swahili: [[mlango]] * Swedish: {{t+|sv|dörr|c}} * [[Tagalog]]: [[pinto]] * [[Tamil]]: [[கதவà¯]] (kathavu) * [[Taos]]: [[kÉ™ÌdénemÄ…]] * [[Telugu]]: [[తలà±à°ªà±]], [[à°¦à±à°µà°¾à°°à°®à±]] * Thai: {{Thai|[[ประตู]]}} (bprà-dtoo) * Turkish: {{t+|tr|kapı}} * Ukrainian: {{t+|uk|двері|f|p|tr=dveri|sc=Cyrl|xs=Ukrainian}} * [[Upper Sorbian]]: [[durje]] {{p}} * Urdu: {{ur-Arab|[[دروازÛ]]}} (darvÄza) {{m}} * Vietnamese: {{t+|vi|cá»­a|xs=Vietnamese}} * Welsh: {{t-|cy|drws|xs=Welsh}} * [[West Frisian]]: [[doar]] * Yiddish: [[טיר]] (tir) {{f}} * {{trreq|Zulu}} {{trans-bottom}} ====Derived terms==== * [[door brake]] * [[sliding door]] * [[up and over door]] * [[show somebody the door]] ===Verb=== {{en-verb}} # {{transitive|cycling}} To cause a collision by opening the door of a vehicle in the front of (an oncoming cyclist or pedestrian). [[Category:1000 English basic words]] ---- ==Dutch== ===Pronunciation=== * {{audio|Nl-door.ogg|audio}} * {{IPA|lang=nl|[dÊŠËr]}} ===Preposition=== {{infl|nl|preposition}} # [[through]] #: ''Hij schoot de bal '''door''' het raam.'' &mdash; He kicked the ball '''through''' the window. # [[around]] within an enclosed space #: ''Dolenthousiast rende het hondje '''door''' de kamer.'' &mdash; Very enthusiastically the puppy ran '''around''' the room. # [[because of]] #: '''''Door''' files kan ik niet op tijd komen.'' &mdash; '''Because of''' traffic jams I'm unable to arrive on time. ====Synonyms==== * {{sense|because of}} [[vanwege]] ===Postposition=== {{infl|nl|postposition}} # [[through]] (implying motion) #: ''Ik rijd nu de stad '''door'''.'' &mdash; I'm now driving '''through''' the city. # [[around]] within an enclosed space #: ''Dolenthousiast rende het hondje de kamer '''door'''.'' &mdash; Very enthusiastically the puppy ran '''around''' the room. ===Adverb=== {{infl|nl|adverb}} # [[through]], [[forward]], [[on]] #: ''Ondanks slecht weer ging het feest ging toch '''door.''''' &mdash; Despite bad weather, the party went '''on''' anyway. ====Derived terms==== {{top4}} * [[doorgaan]] * [[doorgang]] * [[doorgeven]] * [[doorstaan]] * [[doorstart]] * [[doortocht]] * [[doorwerken]] * [[doorzichtig]] {{bottom}} ===Conjunction=== {{infl|nl|conjunction}} # [[by]] #: ''Hij vermeed een confrontatie '''door''' de andere kant op te lopen.'' &mdash; He avoided a confrontation '''by''' walking the other way. ====Derived terms==== * [[door middel van]] [[am:door]] [[ang:door]] [[ar:door]] [[cs:door]] [[de:door]] [[et:door]] [[el:door]] [[es:door]] [[fa:door]] [[fr:door]] [[ko:door]] [[hy:door]] [[io:door]] [[id:door]] [[it:door]] [[kk:door]] [[ku:door]] [[lo:door]] [[lt:door]] [[li:door]] [[hu:door]] [[nl:door]] [[ja:door]] [[no:door]] [[oc:door]] [[ug:door]] [[km:door]] [[pl:door]] [[pt:door]] [[simple:door]] [[sr:door]] [[fi:door]] [[sv:door]] [[ta:door]] [[te:door]] [[th:door]] [[vi:door]] [[tr:door]] [[uk:door]] [[zh:door]]dico-2.2/app/python/wit/testdata/drzwi.html000066400000000000000000000156231172612674100210530ustar00rootroot00000000000000Deutsch Ελληνικά English Esperanto Français 한국어 Hrvatski Oyghurque Suomi Türkçe

drzwi ( język polski)

thumb|right|200px|drzwi (1.1)
wymowa:
IPA audio
znaczenia:
rzeczownik, rodzaj niemęskoosobowy
(1.1) ruchome zakrycie otworu w ścianie umożliwiającego przejście; sam taki otwór
(1.2) zakrycie każdego otworu na podobieństwo drzwi (1.1)

odmiana:
(1) bez lp; lm drzwi, ~, ~om, ~, ~ami, ~ach, ~
przykłady:
(1.1) Stare drzwiotwierają się z głośnym piskiem.

składnia:

kolokacje:
(1.1) dębowe/metalowe/pancerne/antywłamaniowe/... drzwi; otwierać/zamykać drzwi; otwierać drzwi na oścież; trzaskać drzwiami; drzwi do pokoju/toalety/garażu/stajni/samochodu...; skrzydło drzwi; framuga/zamek/klamka/... drzwi; stać/oczekiwać pod drzwiami; drzwi obrotowe; (1.2) drzwi do szafy/pieca/...
synonimy:

antonimy:

pokrewne:
(1) zdrobn drzwiczki; przym drzwiowy
frazeologia:
(1.1) pokazywać komuś drzwi, pi razy drzwi
etymologia:

uwagi:

tłumaczenia:
dico-2.2/app/python/wit/testdata/drzwi.wiki000066400000000000000000000046121172612674100210460ustar00rootroot00000000000000[[de:drzwi]] [[el:drzwi]] [[en:drzwi]] [[eo:drzwi]] [[fr:drzwi]] [[ko:drzwi]] [[hr:drzwi]] [[ug:drzwi]] [[fi:drzwi]] [[tr:drzwi]] == drzwi ({{jÄ™zyk polski}}) == [[Grafika:Doorway Hamptonne in Jersey.jpg|thumb|right|200px|drzwi (1.1)]] {{wymowa}} {{IPA|dÊvi}} {{audio|pl-drzwi.ogg}} {{znaczenia}} ''rzeczownik, rodzaj niemÄ™skoosobowy'' :(1.1) [[ruchomy|ruchome]] [[zakrycie]] [[otwór|otworu]] [[w]] [[Å›ciana|Å›cianie]] [[umożliwiać|umożliwiajÄ…cego]] [[przejÅ›cie]]; [[sam]] [[taki]] [[otwór]] :(1.2) [[zakrycie]] [[każdy|każdego]] [[otwór|otworu]] [[na]] [[podobieÅ„stwo]] drzwi (1.1) {{odmiana}} (1) ''bez'' {{lp}}; {{lm}} drzwi, ~, ~om, ~, ~ami, ~ach, ~ {{przykÅ‚ady}} : (1.1) ''[[stary|Stare]] '''drzwi''' [[otwierać|otwierajÄ…]] [[siÄ™]] [[z]] [[gÅ‚oÅ›ny]]m [[pisk]]iem.'' {{skÅ‚adnia}} {{kolokacje}} (1.1) [[dÄ™bowy|dÄ™bowe]]/[[metalowy|metalowe]]/[[pancerny|pancerne]]/[[antywÅ‚amaniowy|antywÅ‚amaniowe]]/... drzwi; [[otwierać]]/[[zamykać]] drzwi; [[otwierać]] drzwi [[na oÅ›cież]]; [[trzaskać]] drzwiami; drzwi [[do]] [[pokój|pokoju]]/[[toaleta|toalety]]/[[garaż]]u/[[stajnia|stajni]]/[[samochód|samochodu]]...; [[skrzydÅ‚o]] drzwi; [[framuga]]/[[zamek]]/[[klamka]]/... drzwi; [[stać]]/[[oczekiwać]] [[pod]] drzwiami; [[drzwi obrotowe]]; (1.2) drzwi [[do]] [[szafa|szafy]]/[[piec]]a/... {{synonimy}} {{antonimy}} {{pokrewne}} (1) {{zdrobn}} [[drzwiczki]]; {{przym}} [[drzwiowy]] {{frazeologia}} (1.1) [[pokazywać komuÅ› drzwi]], [[pi razy drzwi]] {{etymologia}} {{uwagi}} {{tÅ‚umaczenia}} * angielski: (1.1) [[door]] * arabski: (1.1) [[بَابٌ]] (bÄb) {{m}}; [[أبْوَاب]] (’abwÄb) {{lm}} * aramejski: (1.1) [[ܬܲܪܥܵÜ]] * chorwacki: (1.1) [[vrata]] {{lm}} * czeski: (1.1) [[dveÅ™e]] {{lm}} * dolnoÅ‚użycki: (1.1) [[źurja]] {{lm}} * duÅ„ski: (1.1) [[dør]] ''w'' * esperanto: (1.1) [[pordo]] * estoÅ„ski: (1.1) [[uks]] * fiÅ„ski: (1.1) [[ovi]] * francuski: (1.1) [[porte]] {{f}} * górnoÅ‚użycki: (1.1) [[durje]] {{lm}} * grecki: (1.1) [[πόÏτα]] {{f}} * hebrajski: (1.1) [[דֵלֶת]] * hiszpaÅ„ski: (1.1) [[puerta]] ''f'' * islandzki: (1.1) [[hurð]] {{f}} * niemiecki: (1.1) [[Tür]] {{f}} * norweski (bokmÃ¥l): (1.1) [[dør]] ''m/f'' * rosyjski: (1.1) [[дверь]] {{f}} * serbski: (1.1) [[врата]]/[[vrata]] * slovio: (1.1) [[двер]]/[[dver]] * sÅ‚owacki: (1.1) [[dvere]] * sÅ‚oweÅ„ski: (1.1) [[vrata]] * staropolski: (1.1) [[dźwirze]] * szwedzki: (1.1) [[dörr]] ''w'' dico-2.2/app/python/wit/testdata/header0.wiki000066400000000000000000000000311172612674100212060ustar00rootroot00000000000000== Header == Paragraph. dico-2.2/app/python/wit/testdata/headings.html000066400000000000000000000007411172612674100214710ustar00rootroot00000000000000

Section headings

Headings organize your writing into sections. The Wiki software can automatically generate a table of contents from them.

Subsection

Using more "equals" (=) signs creates a subsection.

A smaller subsection

Don't skip levels, like from two to four equals signs. Start with 2 equals signs not 1 because 1 creates H1 tags which should be reserved for page title. dico-2.2/app/python/wit/testdata/headings.wiki000066400000000000000000000006361172612674100214730ustar00rootroot00000000000000== Section headings == ''Headings'' organize your writing into sections. The Wiki software can automatically generate a [[table of contents]] from them. === Subsection === Using more "equals" (=) signs creates a subsection. ==== A smaller subsection ==== Don't skip levels, like from two to four equals signs. Start with 2 equals signs not 1 because 1 creates H1 tags which should be reserved for page title. dico-2.2/app/python/wit/testdata/hz.html000066400000000000000000000002361172612674100203270ustar00rootroot00000000000000You can make horizontal dividing lines (----) to separate text.
But you should usually use sections instead, so that they go in the table of contents. dico-2.2/app/python/wit/testdata/hz.wiki000066400000000000000000000002351172612674100203250ustar00rootroot00000000000000You can make horizontal dividing lines (----) to separate text. ---- But you should usually use sections instead, so that they go in the table of contents. dico-2.2/app/python/wit/testdata/it.wiki000066400000000000000000000000601172612674100203140ustar00rootroot00000000000000now is the time for ''all good'' men to come to dico-2.2/app/python/wit/testdata/link.wiki000066400000000000000000000000541172612674100206400ustar00rootroot00000000000000[[link|foo|bar|baz|text]] is a simple link. dico-2.2/app/python/wit/testdata/numlist.html000066400000000000000000000003001172612674100213710ustar00rootroot00000000000000
  1. Numbered lists are:
    1. Very organized
    2. Easy to follow
A newline marks the end of the list.
  1. New numbering starts with 1.
dico-2.2/app/python/wit/testdata/numlist.wiki000066400000000000000000000002031172612674100213720ustar00rootroot00000000000000# ''Numbered lists'' are: ## Very organized ## Easy to follow A newline marks the end of the list. # New numbering starts with 1. dico-2.2/app/python/wit/testdata/para.wiki000066400000000000000000000002541172612674100206300ustar00rootroot00000000000000First paragraph consists of two sentences. Each sentence occupies a line. Second paragraph consists of two sentences as well. Each of them, again, occupies its own line. dico-2.2/app/python/wit/testdata/reclink.wiki000066400000000000000000000001131172612674100213260ustar00rootroot00000000000000[[link|foo|bar|baz|text [[inny link|znów text]] słowo [[jeszcze link]]]] dico-2.2/app/python/wit/testdata/unlist.html000066400000000000000000000004751172612674100212310ustar00rootroot00000000000000
  • Unordered lists are easy to do:
    • Start every line with a star.
      • More stars indicate a deeper level.
    • Previous item continues.
    • A newline
  • in a list
marks the end of the list.
  • Of course you can start again.
dico-2.2/app/python/wit/testdata/unlist.wiki000066400000000000000000000003421172612674100212210ustar00rootroot00000000000000* ''Unordered lists'' are easy to do: ** Start every line with a star. *** More stars indicate a deeper level. *: Previous item continues. ** A newline * in a list marks the end of the list. *Of course you can start again. dico-2.2/app/python/wit/wiki2html.py000066400000000000000000000202221172612674100174700ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008 Sergey Poznyakoff # # 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 3, 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, see . from wikimarkup import * from types import TupleType from wikins import wiki_ns_re, wiki_ns import re import urllib class HtmlWikiMarkup (WikiMarkup): """ A (hopefully) general-purpose Wiki->HTML translator class. FIXME: 1. See WikiMarkup for a list 2. [[official position]]s : final 's' gets after closing tag. Should be before. """ def wiki_ns_name(self, str): if str in wiki_ns[self.lang]: return wiki_ns[self.lang][str] elif str in wiki_ns_re[self.lang]: for elt in wiki_ns_re[self.lang][str]: if str.beginswith(elt[0]) and str.endswith(elt[1]): return elt[2] return None envhdr = [ "ul", "ol", "dl" ] envel = [ "li", "li", "dd" ] def mktgt(self, tgt, lang = None): if not lang: lang = self.lang return self.html_base % { 'lang' : lang } + urllib.quote(tgt) def tmpl_term(self, s): if len(s) == 2: return s[1] text = None trans = None for x in s[1:]: m = re.match('(\w+)=', x) if m: if m.group(1) == "tr": trans = x[m.end(1)+1:] elif not text: text = x if text: if trans: text += ' [' + trans + ']' return text def tmpl_proto(self, s): text = 'Proto-' + s[1] + '' if len(s) >= 4: n = 0 for x in s[2:-2]: if n > 0: text += ',' n += 1 text += ' ' + x + '' text += ' (' + s[-2] + ')' return text def fmtlink(self, elt, istmpl): arg = self.format(elt[1][0]) text = None if len(elt[1]) > 1: s = map(self.format, elt[1]) if s[0] == 'disambigR' or s[0] == 'wikiquote': return "" elif len(s) > 1 and s[1] == 'thumb': return "" text = '' + s[1] + '' if istmpl: if re.match("t[+-]$", s[0]): if len(s) > 2: text = s[2] elif s[0] == "term": text = self.tmpl_term(s) elif s[0] == "proto": text = self.tmpl_proto(s) return text (qual,sep,tgt) = arg.partition(':') if tgt != '': ns = self.wiki_ns_name(qual) if ns: if ns == 'NS_IMAGE': return '' elif ns == 'NS_MEDIA': tgt = self.media_base + '/' + tgt else: tgt = self.mktgt(tgt) elif not istmpl and qual in self.langtab: tgt = self.mktgt(tgt, qual) if not text or text == '': text = self.langtab[qual] else: tgt = self.mktgt(tgt) else: tgt = self.mktgt(arg) return "%s" % (tgt, text if (text and text != '') \ else arg) def str_link(self, elt): return self.fmtlink(elt, False) def str_tmpl(self, elt): return self.fmtlink(elt, True) def str_ref(self, elt): target = elt[1] text = self.format(elt[2]) return "%s" % (target, text if (text and text != '') \ else target) def concat(self, eltlist): string = "" for x in eltlist: string += self.format(x) return string def str_it(self, elt): return "" + self.concat(elt[1]) + "" def str_bold(self, elt): return "" + self.concat(elt[1]) + "" def str_hdr(self, elt): level = elt[1] + 1 if level > 4: level = 4 return "%s" % (level, self.format(elt[2]), level) def str_bar(self): return "
" def str_env(self, elt): type = elt[1] lev = elt[2] if lev > 4: lev = 2 string = "" for s in elt[3]: x = self.format(s) string += "<%s>%s" % (self.envel[type], self.format(s), self.envel[type]) return "<%s>%s" % (self.envhdr[type], string, self.envhdr[type]) def str_para(self, elt): string = ""; for x in elt[1]: string += self.format(x) return "

" + string + "

" def str_ind(self, elt): return (" " * 2 * elt[1]) + self.format(elt[2]) def format(self, elt): if elt[0] == TEXT: if isinstance(elt[1],list): string = "" for s in elt[1]: string += s else: string = elt[1] return string elif elt[0] == PARA: return self.str_para(elt) elif elt[0] == IT: return self.str_it(elt) elif elt[0] == BOLD: return self.str_bold(elt) elif elt[0] == LINK: return self.str_link(elt) elif elt[0] == TMPL: return self.str_tmpl(elt) elif elt[0] == BAR: return self.str_bar() elif elt[0] == HDR: return self.str_hdr(elt) elif elt[0] == REF: return self.str_ref(elt) elif elt[0] == ENV: return self.str_env(elt) elif elt[0] == IND: return self.str_ind(elt) elif elt[0] == SEQ: string = "" for x in elt[1]: string += self.format(x) return string else: return str(elt) def __str__(self): str = "" for elt in self.tree: str += self.format(elt) return str class HtmlWiktionaryMarkup (HtmlWikiMarkup): """ A class for translating Wiktionary articles into HTML. This version does not do much, except that it tries to correctly format templates. But "tries" does not mean "does". The heuristics used here is clearly not enough to cope with it. 1. FIXME: The right solution would be to have a database of templates with their semantics and to decide on their rendering depending on that. E.g. {{term}} in en.wiktionary means "replace this with the search term". This, however, does not work in other wiktionaries. There are also more complex templates, e.g.: {{t+|bg|врата|n|p|tr=vrata|sc=Cyrl}} I don't know what it means. Couldn't find any documentation either. Again, this template does not work in other dictionaries. 2. Capitulation notice: Given the: 1. waste amount of wiktionaries available, 2. abundance of various templates for each wictionary, 3. apparent lack of documentation thereof, 4. the lack of standardized language-independent templates, I dont see any way to cope with the template-rendering task within a reasonable amount of time. Faeci quod potui, faciant meliora potentes. """ dico-2.2/app/python/wit/wiki2text.py000066400000000000000000000171061172612674100175170ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008 Sergey Poznyakoff # # 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 3, 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, see . from wikimarkup import * from types import TupleType from wikins import wiki_ns_re, wiki_ns import re import urllib class TextWikiMarkup (WikiMarkup): """ A (general-purpose Wiki->Text translator class. """ # Output width width = 78 # Do not show references. references = False # Provide a minimum markup markup = True # Number of current element in the environment num = 0 def __init__(self, *args, **keywords): WikiMarkup.__init__(self, *args, **keywords) if 'width' in keywords: self.width = keywords['width'] if 'refs' in keywords: self.references = keywords['refs'] if 'markup' in keywords: self.markup = keywords['markup'] def xref(self, text, target): if text: return "%s (see %s) " % (text, target) else: return "see " + target def wiki_ns_name(self, str): if str in wiki_ns[self.lang]: return wiki_ns[self.lang][str] elif str in wiki_ns_re[self.lang]: for elt in wiki_ns_re[self.lang][str]: if str.beginswith(elt[0]) and str.endswith(elt[1]): return elt[2] return None def mktgt(self, tgt, lang = None): if not lang: lang = self.lang return self.html_base % { 'lang' : lang } + urllib.quote(tgt) def fmtlink(self, elt, istmpl): arg = self.format(elt[1][0]) if len(elt[1]) > 1: s = map(self.format, elt[1]) text = s[1] else: s = None text = None if s: if s[0] == 'disambigR' or s[0] == 'wikiquote': return "" if len(s) > 1 and s[1] == 'thumb': return "" (qual,sep,tgt) = arg.partition(':') if tgt != '': ns = self.wiki_ns_name(qual) if ns: if ns == 'NS_IMAGE': if not self.references: return "" text = "[%s: %s]" % (qual, text if text else arg) tgt = self.image_base + '/' + \ urllib.quote(tgt) + \ '/250px-' + urllib.quote(tgt) elif ns == 'NS_MEDIA': text = "[%s]" % (qual) else: tgt = self.mktgt(tgt) elif not istmpl and qual in self.langtab: text = self.langtab[qual] + ": " + tgt tgt = self.mktgt(tgt, qual) else: tgt = self.mktgt(tgt) else: tgt = self.mktgt(arg) if self.references: return "%s (see %s) " % (text, tgt) elif not text or text == '': return arg else: return text def indent (self, lev, text): if text.find('\n') == -1: s = (" " * lev) + text else: s = "" for elt in text.split('\n'): if elt: s += (" " * lev) + elt + '\n' if not text.endswith('\n'): s = s.rstrip('\n') # print "IN: '%s'" % (text) # print "OUT: '%s'" % (s) return s def fmtpara(self, input): output = "" linebuf = "" length = 0 for s in input.split(): wlen = len(s) if linebuf.endswith("."): wsc = 2 else: wsc = 1 if length + wsc + wlen > self.width: # FIXME: fill out linebuf output += linebuf + '\n' wsc = 0 length = 0 linebuf = "" linebuf += " " * wsc + s length += wsc + wlen return output + linebuf def format(self, elt): if elt[0] == TEXT: if isinstance(elt[1],list): string = "" for s in elt[1]: if string: if string.endswith("."): string += " " else: string += " " string += s else: string = elt[1] elif elt[0] == PARA: string = ""; for x in elt[1]: string += self.format(x) string = self.fmtpara(string) + '\n\n' elif elt[0] == IT: string = "" for x in elt[1]: s = self.format(x) if s: string += " " + s string = "_" + string.lstrip(" ") + "_" elif elt[0] == BOLD: string = "" for x in elt[1]: s = self.format(x) if s: if string.endswith("."): string += " " else: string += " " string += s string = string.upper() elif elt[0] == LINK: string = self.fmtlink(elt, False) elif elt[0] == TMPL: s = self.fmtlink(elt, True) if s: string = '[' + s + ']' else: string = s elif elt[0] == BAR: w = self.width if w < 5: w = 5 string = "\n" + ("-" * (w - 5)).center(w - 1) + "\n" elif elt[0] == HDR: level = elt[1] string = "\n" + ("*" * level) + " " + \ self.format(elt[2]).lstrip(" ") + "\n\n" elif elt[0] == REF: string = self.xref(self.format(elt[2]), elt[1]) elif elt[0] == ENV: type = elt[1] lev = elt[2] if lev > self.width - 4: lev = 1 string = "" n = 1 for s in elt[3]: if not string.endswith("\n"): string += "\n" x = self.format(s) if type == ENVUNNUM: string += self.fmtpara(self.indent(lev, "- " + x.lstrip(" "))) elif type == ENVNUM: string += self.fmtpara(self.indent(lev, "%d. %s" % (n, x))) n += 1 if not string.endswith("\n"): string += "\n" elif elt[0] == IND: string = (" " * elt[1]) + self.format(elt[2]) + '\n' elif elt[0] == SEQ: string = "" for x in elt[1]: if len(string) > 1 and not string[-1].isspace(): string += ' ' string += self.format(x) else: string = str(elt) return string def __str__(self): str = "" for elt in self.tree: str += self.format(elt) return str class TextWiktionaryMarkup (TextWikiMarkup): """ See documentation for HtmlWiktionaryMarkup """ # FIXME: It is supposed to do something about templates dico-2.2/app/python/wit/wikicvt.py000077500000000000000000000045121172612674100172450ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008 Sergey Poznyakoff # # 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 3, 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, see . import sys import getopt from wiki2html import * from wiki2text import * def usage(code=0): print """ usage: %s [-hvt] [-l lang] [-o kw=val] [--lang=lang] [--option kw=val] [--text] [--help] [--verbose] file """ % (sys.argv[0]) sys.exit(code) def main(): verbose_flag = 0 html = 1 lang = "pl" kwdict = {} debug = 0 try: opts, args = getopt.getopt(sys.argv[1:], "d:hl:o:tv", ["debug=", "help", "lang=", "option=", "text", "input-text", "verbose" ]) except getopt.GetoptError: usage(1) for o, a in opts: if o in ("-h", "--help"): usage() elif o in ("-v", "--verbose"): verbose_flag = verbose_flag + 1 elif o in ("-t", "--text"): html = 0 elif o in ("-l", "--lang"): lang = a elif o in ("-o", "--option"): (kw,sep,val) = a.partition('=') if val != '': kwdict[kw] = eval(val) elif o == "--input-text": input_text = True elif o in ("-d", "--debug"): debug = eval(a) if len(args) == 1: if args[0] == '-': kwdict['file'] = sys.stdin else: kwdict['filename'] = args[0] else: usage(1) kwdict['lang']=lang if html: markup = HtmlWiktionaryMarkup(**kwdict) else: markup = TextWiktionaryMarkup(**kwdict) markup.debug_level = debug markup.parse() print str(markup) # if verbose_flag > 0: # markup.output() if __name__ == '__main__': main() dico-2.2/app/python/wit/wikimarkup.py000066400000000000000000000704451172612674100177550ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008, 2009 Sergey Poznyakoff # # 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 3, 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, see . import sys import re from types import * __all__ = [ "BaseWikiMarkup", "WikiMarkup", "NIL", "TEXT", "DELIM", "NL", "PARA", "IT", "BOLD", "LINK", "TMPL", "BAR", "HDR", "REF", "ENV", "IND", "SEQ", "ENVUNNUM", "ENVNUM", "envtypes" ] delim = re.compile("^==+|==+[ \\t]*$|(^----$)|^\\*+|^#+|^:+|(\\[\\[)|\\[|(\\{\\{)|(\\]\\])|\\]|(\\}\\})|\\||(\\'\\'\\'?)") NIL = 0 TEXT = 1 DELIM = 2 NL = 3 PARA = 4 IT = 5 BOLD = 6 LINK = 7 TMPL = 8 BAR = 9 HDR = 10 REF = 11 ENV = 12 IND = 13 SEQ = 14 # Environment types: # Unnumbered list ENVUNNUM = 0 # Numbered list ENVNUM = 1 envtypes = [ "*", "#" ] class BaseWikiMarkup: toklist = None tokind = 0 tree = None debug_level = 0 def dprint(self, lev, fmt, *argv): if self.debug_level >= lev: print "[DEBUG]", fmt % argv def tokread(self): line = None pos = 0 while 1: if (not line or pos == len(line)): try: line = self.input() pos = 0 except StopIteration: line = u'' if not line or line == "": self.dprint(100, "YIELD: NIL") yield(NIL,) break if line == '\n': self.dprint(100, "YIELD: NL") yield(NL,line) line = None continue self.dprint(100, "LINE: %s", line[pos:]) m = delim.search(line, pos) if m: if (pos < m.start(0)): self.dprint(100, "YIELD: TEXT %s", line[pos:m.start(0)]) yield(TEXT, line[pos:m.start(0)]) pos = m.end(0) if m.group(0)[0] in envtypes and line[pos] == ":": self.dprint(100, "YIELD: DELIM %s, True", m.group(0)) yield(DELIM, m.group(0), True) pos += 1 else: self.dprint(100, "YIELD: DELIM %s", m.group(0)) yield(DELIM, m.group(0)) else: if line[-1] == '\n': self.dprint(100, "YIELD: TEXT %s", line[pos:-1]) if line[pos:-1] != '': yield(TEXT, line[pos:-1]) self.dprint(100, "YIELD: NL") yield(NL,'\n') else: self.dprint(100, "YIELD: TEXT %s", line[pos:]) yield(TEXT, line[pos:]) line = None def input(self): return None def tokenize(self): self.toklist = [] for tok in self.tokread(): self.toklist.append(tok) # Determine and fix up the ordering of bold and italic markers # This helps correctly parse inputs like: # '''''Door''' files kan ik niet op tijd komen.'' stack = [] for i in range(0,len(self.toklist)): if self.toklist[i][0] == DELIM \ and (self.toklist[i][1] == "''" \ or self.toklist[i][1] == "'''"): if len(stack) > 0 \ and self.toklist[stack[-1]][1] == self.toklist[i][1]: stack.pop() elif len(stack) > 1: x = self.toklist[stack[-2]] self.toklist[stack[-2]] = self.toklist[stack[-1]] self.toklist[stack[-1]] = x stack.pop() else: stack.append(i) def peektkn(self): return self.toklist[self.tokind] def setkn(self,val): self.toklist[self.tokind] = val def getkn(self): tok = self.toklist[self.tokind] if tok[0] != NIL: self.tokind = self.tokind + 1 return tok def ungetkn(self): self.tokind = self.tokind - 1 return self.toklist[self.tokind] def parse_fontmod(self,delim,what): self.dprint(80, "ENTER parse_fontmod(%s,%s), tok %s", delim, what, self.peektkn()) seq = [] textlist = [] while 1: tok = self.getkn() if tok[0] == TEXT: textlist.append(tok[1]) elif tok[0] == DELIM: if tok[1] == delim: break elif self.is_inline_delim(tok): if textlist: seq.append((TEXT, textlist)) textlist = [] x = self.parse_inline(tok) if x: seq.append(x) else: self.dprint(80, "LEAVE parse_fontmod=%s", "None") return None else: self.dprint(80, "LEAVE parse_fontmod=None") return None elif tok[0] == NL: if self.peektkn()[0] == NL: self.dprint(80, "LEAVE parse_fontmod=None") return None seq.append((TEXT, '\n')) else: self.dprint(80, "LEAVE parse_fontmod=None") return None if textlist: seq.append((TEXT, textlist)) res = (what, seq) self.dprint(80, "LEAVE parse_fontmod=%s", res) return res def parse_link(self, type, delim): self.dprint(80, "ENTER parse_link(%s,%s), tok %s", type, delim, self.peektkn()) subtree = [] list = [] while 1: tok = self.getkn() if tok[0] == DELIM: if tok[1] == delim: if list: subtree.append((SEQ,list)) break elif tok[1] == "|": if len(list) > 1: subtree.append((SEQ,list)) elif list: subtree.append(list[0]) list = [] else: x = self.parse_inline(tok) if x: list.append(x) else: self.dprint(80, "LEAVE parse_link=%s", "None") return None elif tok[0] == TEXT: list.append(tok) else: self.dprint(80, "LEAVE parse_link=%s", "None") return None self.dprint(80, "LEAVE parse_link=(%s,%s)", type, subtree) return (type, subtree) def parse_ref(self): self.dprint(80, "ENTER parse_ref, tok %s", self.peektkn()) list = [] while 1: tok = self.getkn() if tok[0] == DELIM: if tok[1] == "]": break else: x = self.parse_inline(tok) if x: list.append(x) else: self.dprint(80, "LEAVE parse_ref=%s", "None") return None elif tok[0] == TEXT: list.append(tok) elif tok[0] == NL: list.append((TEXT, '\n')) continue else: self.dprint(80, "LEAVE parse_ref=%s", "None") return None if len(list) == 0 or list[0][0] != TEXT: self.dprint(80, "LEAVE parse_ref=%s", "None") return None (ref,sep,text) = list[0][1].partition(' ') ret = (REF, ref, (SEQ, [(TEXT, text)] + list[1:])) self.dprint(80, "LEAVE parse_ref= %s", ret) return ret inline_delims = [ "''", "'''", "[", "[[", "{{" ] def is_inline_delim(self, tok): return tok[0] == DELIM and tok[1] in self.inline_delims def is_block_delim(self, tok): return tok[0] == DELIM and tok[1] not in self.inline_delims def parse_inline(self, tok): self.dprint(80, "ENTER parse_inline(%s), tok %s", tok, self.peektkn()) tokind = self.tokind if tok[1] == "''": x = self.parse_fontmod(tok[1], IT) elif tok[1] == "'''": x = self.parse_fontmod(tok[1], BOLD) elif tok[1] == "[": x = self.parse_ref() elif tok[1] == "[[": x = self.parse_link(LINK, "]]") elif tok[1] == "{{": x = self.parse_link(TMPL, "}}") else: # FIXME self.dprint(80, "LEAVE parse_inline=%s", "None") x = None if not x: self.tokind = tokind self.dprint(80, "LEAVE parse_inline=%s", x) return x def parse_para(self): self.dprint(80, "ENTER parse_para, tok %s", self.peektkn()) seq = [] textlist = [] while 1: tok = self.getkn() if tok[0] == TEXT: textlist.append(tok[1]) elif tok[0] == NL: tok = self.getkn() if tok[0] == NL or tok[0] == NIL: break else: self.ungetkn() if self.is_block_delim(tok): break textlist.append('\n') elif tok[0] == NIL: break elif tok[0] == DELIM: if self.is_inline_delim(tok): if textlist: seq.append((TEXT, textlist)) textlist = [] x = self.parse_inline(tok) if x: seq.append(x) else: seq.append(tok) break else: seq.append((TEXT,tok[1])) # self.ungetkn() break if textlist: seq.append((TEXT, textlist)) self.dprint(80, "LEAVE parse_para=%s", seq) return (PARA, seq) def parse_header(self, delim): self.dprint(80, "ENTER parse_header(%s), tok %s", delim, self.peektkn()) list = [] while 1: tok = self.getkn() if tok[0] == NIL: self.dprint(80, "LEAVE parse_header=%s", "None") return None elif tok[0] == TEXT: list.append(tok) elif tok[0] == DELIM: if tok[1] == delim: if self.peektkn()[0] == NL: break else: self.dprint(80, "LEAVE parse_header=%s", "None") return None else: x = self.parse_inline(tok) if x: list.append(x) else: self.dprint(80, "LEAVE parse_header=%s", "None") return None #FIXME? else: self.dprint(80, "LEAVE parse_header=%s", "None") return None self.dprint(80, "LEAVE parse_header=(HDR, %s, (SEQ,%s))",len(delim)-1,list) return (HDR,len(delim)-1,(SEQ,list)) def parse_line(self): self.dprint(80, "ENTER parse_line, tok %s", self.peektkn()) list = [] while 1: tok = self.getkn() if tok[0] == NL or tok[0] == NIL: break elif tok[0] == TEXT: list.append(tok) elif tok[0] == DELIM and tok[1][0] == ":": list.append(self.parse_indent(len(tok[1]))) break else: x = self.parse_inline(tok) if x: list.append(x) else: list.append(tok) self.dprint(80, "LEAVE parse_line=(SEQ, %s)", list) return (SEQ, list) def parse_env(self, type, lev): self.dprint(80, "ENTER parse_env(%s,%s), tok %s",type,lev,self.peektkn()) list = [] while 1: tok = self.getkn() if tok[0] == DELIM and tok[1][0] in envtypes and type == envtypes.index(tok[1][0]): if len(tok[1]) < lev: self.ungetkn() break elif len(tok[1]) > lev: self.ungetkn() elt = self.parse_env(type, len(tok[1])) else: elt = self.parse_line() if len(tok) == 2: list.append(elt) continue if list[-1][0] != SEQ: x = list[-1] list[-1] = (SEQ, [x]) list[-1][1].append(elt) else: self.ungetkn() break self.dprint(80, "LEAVE parse_env=(ENV, %s, %s, %s)", type, lev, list) return (ENV, type, lev, list) def parse_indent(self, lev): self.dprint(80, "ENTER parse_indent(%s), tok %s", lev, self.peektkn()) x = (IND, lev, self.parse_line()) self.dprint(80, "LEAVE parse_indent=%s", x) return x def parse0(self): tok = self.getkn() toktype = tok[0] if toktype == NIL: return None elif toktype == TEXT: self.ungetkn() return self.parse_para() elif toktype == DELIM: if tok[1] == "----": return (BAR,) elif tok[1][0:2] == "==": return self.parse_header(tok[1]) elif tok[1][0] in envtypes: type = envtypes.index(tok[1][0]) lev = len(tok[1]) self.ungetkn() return self.parse_env(type, lev) elif tok[1][0] == ":": return self.parse_indent(len(tok[1])) else: self.ungetkn() return self.parse_para() elif toktype == NL: return (TEXT, '\n') # return self.parse0() def parse(self): if not self.toklist: self.tokenize() self.dprint(90, "TOKLIST: %s", self.toklist) self.tokind = 0 self.tree = [] while 1: subtree = self.parse0() if subtree == None: break self.tree.append(subtree) self.dprint(70, "TREE: %s", self.tree) def __str__(self): return str(self.tree) class WikiMarkup (BaseWikiMarkup): """ A derived class, that supplies a basic input method. Three types of inputs are available: 1. filename= The file is opened and used for input. 2. file= The already opened file is used for input. 3. text= Input is taken from , line by line. Usage: obj = WikiMarkup(arg=val) obj.parse ... Do whatever you need with obj.tree ... """ file = None text = None lang = 'en' html_base = 'http://%(lang)s.wiktionary.org/wiki/' image_base = 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/bf' media_base = 'http://www.mediawiki.org/xml/export-0.3' def __init__(self, *args, **keywords): for kw in keywords: if kw == 'file': self.file = keywords[kw] elif kw == 'filename': self.file = open(keywords[kw]) elif kw == 'text': self.text = keywords[kw].split("\n") elif kw == 'lang': self.lang = keywords[kw] elif kw == 'html_base': self.html_base = keywords[kw] elif kw == 'image_base': self.image_base = keywords[kw] elif kw == 'media_base': self.media_base = keywords[kw] def __del__(self): if self.file: self.file.close() def input(self): if self.file: return self.file.readline() elif self.text: return self.text.pop(0) + '\n' else: return None def is_lang_link(self, elt): if elt[0] == LINK and isinstance(elt[1],list) and len(elt[1]) == 1: if elt[1][0][0] == TEXT: m = re.match('([\w-]+):', elt[1][0][1]) if m: # and m.group(1) in self.langtab: return True elif elt[1][0][0] == SEQ and len(elt[1][0][1]) == 1 and\ elt[1][0][1][0][0] == TEXT: m = re.match('([\w-]+):',elt[1][0][1][0][1]) if m: # and m.group(1) in self.langtab: return True return False def is_empty_text(self, elt): if elt[0] == TEXT: if isinstance(elt[1],list): for s in elt[1]: if re.search('\w', s): return False elif re.search('\w', elt[1]): return False return True return False def is_empty_para(self, seq): for x in seq: if not (self.is_lang_link(x) or self.is_empty_text(x)): return False return True def parse(self): BaseWikiMarkup.parse(self) # Remove everything before the first header for i in range(0, len(self.tree)): if self.tree[i][0] == HDR: self.tree = self.tree[i:] break # Remove trailing links for i in range(len(self.tree)-1, 0, -1): if self.tree[i][0] == PARA \ and not self.is_empty_para(self.tree[i][1]): self.tree = self.tree[0:i+1] break # ISO 639 langtab = { "aa": "Afar", # Afar "ab": "ÐÒ§Ñуа", # Abkhazian "ae": None, # Avestan "af": "Afrikaans", # Afrikaans "ak": "Akana", # Akan "als": "Alemannisch", "am": "አማርኛ", # Amharic "an": "Aragonés", # Aragonese "ang": "Englisc", "ar": "العربية" , # Arabic "arc": "ÜܪܡÜÜ", "as": "অসমীয়া", # Assamese "ast": "Asturian", "av": "Ðвар", # Avaric "ay": "Aymar", # Aymara "az": "AzÉ™rbaycan" , # Azerbaijani "ba": "Башҡорт", # Bashkir "bar": "Boarisch", "bat-smg": "ŽemaitÄ—Å¡ka", "bcl": "Bikol", "be": "БеларуÑкаÑ", # Byelorussian; Belarusian "be-x-old": "БеларуÑÐºÐ°Ñ (тарашкевіца)", "bg": "БългарÑки", # Bulgarian "bh": "भोजपà¥à¤°à¥€", # Bihari "bi": "Bislama", # Bislama "bm": "Bamanankan", # Bambara "bn": "বাংলা" , # Bengali; Bangla "bo": "བོད་སà¾à½‘", # Tibetan "bpy": "ইমার ঠার/বিষà§à¦£à§à¦ªà§à¦°à¦¿à¦¯à¦¼à¦¾ মণিপà§à¦°à§€" , "br": "Brezhoneg" , # Breton "bs": "Bosanski" , # Bosnian "bug": "Basa Ugi", "bxr": "БурÑад", "ca": "Català" , # Catalan "cbk-zam": "Chavacano de Zamboanga", "cdo": "Mìng-dĕ̤ng-ngṳ̄", "cho": "Choctaw", "ce": "Ðохчийн", # Chechen "ceb": "Sinugboanong Binisaya" , # Cebuano "ch": "Chamor", # Chamorro "chr": "á£áŽ³áŽ©", "chy": "Tsetsêhestâhese", "co": "Cors", # Corsican "cr": "Nehiyaw", # Cree "crh": "Qırımtatarca", "cs": "ÄŒesky" , # Czech "csb": "Kaszëbsczi", "c": "СловѣньÑкъ", # Church Slavic "cv": "Чăваш", # Chuvash "cy": "Cymraeg" , # Welsh "da": "Dansk" , # Danish "de": "Deutsch" , # German "diq": "Zazaki", # Dimli (Southern Zazaki) "dsb": "Dolnoserbski", "dv": "Þ‹Þ¨ÞˆÞ¬Þ€Þ¨Þ„Þ¦ÞÞ°", # Divehi "dz": "ཇོང་à½", # Dzongkha; Bhutani "ee": "EÊ‹egbe", # Ewe "el": "Ελληνικά" , # Greek "eml": "Emiliàn e rumagnòl", "en": "English" , # English "eo": "Esperanto" , "es": "Español" , # Spanish "et": "Eesti" , # Estonian "eu": "Euskara" , # Basque "ext": "Estremeñ", "fa": "ÙØ§Ø±Ø³ÛŒ" , # Persian "ff": "Fulfulde", # Fulah "fi": "Suomi" , # Finnish "fiu-vro": "Võro", "fj": "Na Vosa Vakaviti",# Fijian; Fiji "fo": "Føroyskt" , # Faroese "fr": "Français" , # French "frp": "Arpitan", "fur": "Furlan", "fy": "Frysk", # Frisian "ga": "Gaeilge", # Irish "gan": "贛語 (GànyÅ­)", "gd": "Gàidhlig", # Scots; Gaelic "gl": "Gallego" , # Gallegan; Galician "glk": "گیلکی", "got": "ðŒ²ðÂŒ¿ð„ðŒ¹ðÂƒðŒº ", "gn": "Avañe'ẽ", # Guarani "g": "ગà«àªœàª°àª¾àª¤à«€", # Gujarati "gv": "Gaelg", # Manx "ha": "Ù‡ÙŽÙˆÙØ³ÙŽ", # Hausa "hak": "Hak-kâ-fa / 客家話", "haw": "Hawai`i", "he": "עברית" , # Hebrew (formerly iw) "hi": "हिनà¥à¤¦à¥€" , # Hindi "hif": "Fiji Hindi", "ho": "Hiri Mot", # Hiri Motu "hr": "Hrvatski" , # Croatian "hsb": "Hornjoserbsce", "ht": "Krèyol ayisyen" , # Haitian; Haitian Creole "hu": "Magyar" , # Hungarian "hy": "Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶", # Armenian "hz": "Otsiherero", # Herero "ia": "Interlingua", "ie": "Interlingue", "id": "Bahasa Indonesia",# Indonesian (formerly in) "ig": "Igbo", # Igbo "ii": "ꆇꉙ ", # Sichuan Yi "ik": "Iñupiak", # Inupiak "ilo": "Ilokano", "io": "Ido" , "is": "Ãslenska" , # Icelandic "it": "Italiano" , # Italian "i": "áƒá“„ᒃᑎá‘ᑦ", # Inuktitut "ja": "日本語", # Japanese "jbo": "Lojban", "jv": "Basa Jawa", # Javanese "ka": "ქáƒáƒ áƒ—ული" , # Georgian "kaa": "Qaraqalpaqsha", "kab": "Taqbaylit", "kg": "KiKongo", # Kongo "ki": "GÄ©kÅ©yÅ©", # Kikuyu "kj": "Kuanyama", # Kuanyama "kk": "Қазақша", # Kazakh "kl": "Kalaallisut", # Kalaallisut; Greenlandic "km": "ភាសាážáŸ’មែរ", # Khmer; Cambodian "kn": "ಕನà³à²¨à²¡", # Kannada "ko": "한국어" , # Korean "kr": "Kanuri", # Kanuri "ks": "कशà¥à¤®à¥€à¤°à¥€ / كشميري", # Kashmiri "ksh": "Ripoarisch", "ku": "Kurdî / كوردی", # Kurdish "kv": "Коми", # Komi "kw": "Kernewek/Karnuack", # Cornish "ky": "Кыргызча", # Kirghiz "la": "Latina" , # Latin "lad": "Dzhudezmo", "lb": "Lëtzebuergesch" , # Letzeburgesch "lbe": "Лакку", "lg": "Luganda", # Ganda "li": "Limburgs", # Limburgish; Limburger; Limburgan "lij": "Lígur", "ln": "Lingala", # Lingala "lmo": "Lumbaart", "lo": "ລາວ", # Lao; Laotian "lt": "Lietuvių" , # Lithuanian "lua": "Luba", # Luba "lv": "LatvieÅ¡" , # Latvian; Lettish "map-bms": "Basa Banyumasan", "mdf": "Мокшень (Mokshanj Kälj)", "mg": "Malagasy", # Malagasy "mh": "Ebon", # Marshall "mi": "MÄori", # Maori "mk": "МакедонÑки" , # Macedonian "ml": None, # Malayalam "mn": "Монгол", # Mongolian "mo": "МолдовенÑÑкÑ", # Moldavian "mr": "मराठी" , # Marathi "ms": "Bahasa Melay" , # Malay "mt": "Malti", # Maltese "mus": "Muskogee", "my": "မ္ရန္‌မာစာ", # Burmese "myv": "ЭрзÑнь (Erzjanj Kelj)", "mzn": "Ù…ÙŽØ²ÙØ±ÙˆÙ†ÙŠ", "na": "dorerin Naoero", # Nauru "nah": "NÄhuatl", "nap": "Nnapulitano", "nb": "Norsk (BokmÃ¥l)", # Norwegian Bokm@aa{}l "nd": None, # Ndebele, North "nds": "Plattdüütsch", "nds-nl": "Nedersaksisch", "ne": "नेपाली", # Nepali "new": "नेपाल भाषा" , # Nepal Bhasa "ng": "Oshiwambo", # Ndonga "nl": "Nederlands" , # Dutch "nn": "Nynorsk", # Norwegian Nynorsk "no": "Norsk (BokmÃ¥l)" , # Norwegian "nov": "Novial", "nr": None, # Ndebele, South "nrm": "Nouormand/Normaund", "nv": "Diné bizaad", # Navajo "ny": "Chi-Chewa", # Chichewa; Nyanja "oc": "Occitan", # Occitan; Proven@,{c}al "oj": None, # Ojibwa "om": "Oromoo", # (Afan) Oromo "or": "ଓଡ଼ିଆ", # Oriya "os": "Иронау", # Ossetian; Ossetic "pa": "ਪੰਜਾਬੀ" , # Panjabi; Punjabi "pag": "Pangasinan", "pam": "Kapampangan", "pap": "Papiament", "pdc": "Deitsch", "pi": "पाऴि", # Pali "pih": "Norfuk", "pl": "Polski" , # Polish "pms": "Piemontèis" , "ps": "پښتو", # Pashto, Pushto "pt": "Português" , # Portuguese "q": "Runa Simi" , # Quechua "rm": "Rumantsch", # Rhaeto-Romance "rmy": "romani - रोमानी", "rn": "Kirundi", # Rundi; Kirundi "ro": "Română" , # Romanian "roa-rup": "Armãneashce", "roa-tara": "Tarandíne", "ru": "РуÑÑкий" , # Russian "rw": "Ikinyarwanda", # Kinyarwanda "sa": "संसà¥à¤•ृतमà¥", # Sanskrit "sah": "Саха тыла (Saxa Tyla)", "sc": "Sardu", # Sardinian "scn": "Sicilian", "sco": "Scots", "sd": "سنڌي، سندھی ØŒ सिनà¥à¤§", # Sindhi "se": "Sámegiella", # Northern Sami "sg": "Sängö", # Sango; Sangro "sh": "Srpskohrvatski / СрпÑкохрватÑки" , "si": "සිංහල", "simple": "Simple English" , "sk": "SlovenÄina" , # Slovak "sl": "SlovenÅ¡Äina" , # Slovenian "sm": "Gagana Samoa", # Samoan "sn": "chiShona", # Shona "so": "Soomaaliga", # Somali "sr": "СрпÑки / Srpski", # Serbian "srn": "Sranantongo", "ss": "SiSwati", # Swati; Siswati "st": "Sesotho", # Sesotho; Sotho, Southern "stk": "Seeltersk", "s": "Basa Sunda", # Sundanese "sq": "Shqip" , # Albanian "szl": "Åšlůnski", "sv": "Svenska" , # Swedish "sw": "Kiswahili", # Swahili "ta": "தமிழà¯" , # Tamil "te": "తెలà±à°—à±" , # Telugu "tet": "Tetun", "tg": "Тоҷикӣ", # Tajik "th": "ไทย" , # Thai "ti": "ትáŒáˆ­áŠ›", # Tigrinya "tk": "تركمن / Туркмен", # Turkmen "tl": "Tagalog" , # Tagalog "tn": "Setswana", # Tswana; Setswana "to": "faka Tonga", # Tonga (?) # Also ZW ; MW "tokipona": "Tokipona", "tpi": "Tok Pisin", "tr": "Türkçe" , # Turkish "ts": "Xitsonga", # Tsonga "tt": "Tatarça / Татарча", # Tatar "tum": "chiTumbuka", "tw": "Twi", # Twi "ty": "Reo MÄ`ohi", # Tahitian "udm": "Удмурт кыл", "ug": "Oyghurque", # Uighur "uk": "УкраїнÑька" , # Ukrainian "ur": "اردو", # Urdu "uz": "O‘zbek", # Uzbek "ve": "Tshivenda", # Venda "vec": "Vèneto", "vi": "Tiếng Việt" , # Vietnamese "vls": "West-Vlams", "vo": "Volapük" , "wa": "Walon", # Walloon "war": "Winaray", "wo": "Wolof", # Wolof "w": "å´è¯­", "xal": "Хальмг", "xh": "isiXhosa", # Xhosa "yi": "ייִדיש", # Yiddish "yo": "Yorùbá", # Yoruba "za": "Cuengh", # Zhuang "zea": "Zeêuws", "zh": "中文" , # Chinese "zh-classical": "夿–‡ / 文言文", "zm-min-nan": "Bân-lâm-gú", "zh-yue": "粵語", "zu": "isiZulu" # Zulu } dico-2.2/app/python/wit/wikins.py000066400000000000000000003006371172612674100170750ustar00rootroot00000000000000# This file is generated automatically. Do not edit. # -*- coding: utf-8 -*- wiki_ns_io = { "Media": "NS_MEDIA", "Specala": "NS_SPECIAL", "Debato": "NS_TALK", "Uzanto": "NS_USER", "Uzanto_Debato": "NS_USER_TALK", "Imajo": "NS_IMAGE", "Imajo_Debato": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Debato": "NS_MEDIAWIKI_TALK", "Shablono": "NS_TEMPLATE", "Shablono_Debato": "NS_TEMPLATE_TALK", "Helpo": "NS_HELP", "Helpo_Debato": "NS_HELP_TALK", "Kategorio": "NS_CATEGORY", "Kategorio_Debato": "NS_CATEGORY_TALK", } wiki_ns_re_io = [ ("", "_Debato", "NS_PROJECT_TALK"), ] wiki_ns_et = { "Meedia": "NS_MEDIA", "Eri": "NS_SPECIAL", "Arutelu": "NS_TALK", "Kasutaja": "NS_USER", "Kasutaja_arutelu": "NS_USER_TALK", "Pilt": "NS_IMAGE", "Pildi_arutelu": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_arutelu": "NS_MEDIAWIKI_TALK", "Mall": "NS_TEMPLATE", "Malli_arutelu": "NS_TEMPLATE_TALK", "Juhend": "NS_HELP", "Juhendi_arutelu": "NS_HELP_TALK", "Kategooria": "NS_CATEGORY", "Kategooria_arutelu": "NS_CATEGORY_TALK", } wiki_ns_re_et = [ ("", "_arutelu", "NS_PROJECT_TALK"), ] wiki_ns_is = { "Miðill": "NS_MEDIA", "Kerfissíða": "NS_SPECIAL", "Spjall": "NS_TALK", "Notandi": "NS_USER", "Notandaspjall": "NS_USER_TALK", "Mynd": "NS_IMAGE", "Myndaspjall": "NS_IMAGE_TALK", "Melding": "NS_MEDIAWIKI", "Meldingarspjall": "NS_MEDIAWIKI_TALK", "Snið": "NS_TEMPLATE", "Sniðaspjall": "NS_TEMPLATE_TALK", "Hjálp": "NS_HELP", "Hjálparspjall": "NS_HELP_TALK", "Flokkur": "NS_CATEGORY", "Flokkaspjall": "NS_CATEGORY_TALK", } wiki_ns_re_is = [ ("", "spjall", "NS_PROJECT_TALK"), ] wiki_ns_mr = { "मिडिया": "NS_MEDIA", "विशेष": "NS_SPECIAL", "चरà¥à¤šà¤¾": "NS_TALK", "सदसà¥à¤¯": "NS_USER", "सदसà¥à¤¯_चरà¥à¤šà¤¾": "NS_USER_TALK", "चितà¥à¤°": "NS_IMAGE", "चितà¥à¤°_चरà¥à¤šà¤¾": "NS_IMAGE_TALK", "मिडियाविकी": "NS_MEDIAWIKI", "मिडियाविकी_चरà¥à¤šà¤¾": "NS_MEDIAWIKI_TALK", "साचा": "NS_TEMPLATE", "साचा_चरà¥à¤šà¤¾": "NS_TEMPLATE_TALK", "साहायà¥à¤¯": "NS_HELP", "साहायà¥à¤¯_चरà¥à¤šà¤¾": "NS_HELP_TALK", "वरà¥à¤—": "NS_CATEGORY", "वरà¥à¤—_चरà¥à¤šà¤¾": "NS_CATEGORY_TALK", } wiki_ns_re_mr = [ ("", "_चरà¥à¤šà¤¾", "NS_PROJECT_TALK"), ] wiki_ns_tyv = { "Медиа": "NS_MEDIA", "ТуÑкай": "NS_SPECIAL", "Чугаа": "NS_TALK", "Aжыглакчы": "NS_USER", "Aжыглакчы_чугаа": "NS_USER_TALK", "Чурук": "NS_IMAGE", "Чурук_чугаа": "NS_IMAGE_TALK", "МедиаВики": "NS_MEDIAWIKI", "МедиаВики_чугаа": "NS_MEDIAWIKI_TALK", "Ð¥ÑÑ": "NS_TEMPLATE", "Ð¥ÑÑ_чугаа": "NS_TEMPLATE_TALK", "Дуза": "NS_HELP", "Дуза_чугаа": "NS_HELP_TALK", "Бөлүк": "NS_CATEGORY", "Бөлүк_чугаа": "NS_CATEGORY_TALK", } wiki_ns_re_tyv = [ ("", "_чугаа", "NS_PROJECT_TALK"), ] wiki_ns_qu = { "Midya": "NS_MEDIA", "Sapaq": "NS_SPECIAL", "Rimanakuy": "NS_TALK", "Ruraq": "NS_USER", "Ruraq_rimanakuy": "NS_USER_TALK", "Rikcha": "NS_IMAGE", "Rikcha_rimanakuy": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_rimanakuy": "NS_MEDIAWIKI_TALK", "Plantilla": "NS_TEMPLATE", "Plantilla_rimanakuy": "NS_TEMPLATE_TALK", "Yanapa": "NS_HELP", "Yanapa_rimanakuy": "NS_HELP_TALK", "Katiguriya": "NS_CATEGORY", "Katiguriya_rimanakuy": "NS_CATEGORY_TALK", } wiki_ns_re_qu = [ ("", "_rimanakuy", "NS_PROJECT_TALK"), ] wiki_ns_frp = { "Mèdia": "NS_MEDIA", "Spèciâl": "NS_SPECIAL", "Discutar": "NS_TALK", "Utilisator": "NS_USER", "Discussion_Utilisator": "NS_USER_TALK", "Émâge": "NS_IMAGE", "Discussion_Émâge": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK", "Modèlo": "NS_TEMPLATE", "Discussion_Modèlo": "NS_TEMPLATE_TALK", "Éde": "NS_HELP", "Discussion_Éde": "NS_HELP_TALK", "Catègorie": "NS_CATEGORY", "Discussion_Catègorie": "NS_CATEGORY_TALK", } wiki_ns_re_frp = [ ("Discussion_", "", "NS_PROJECT_TALK"), ] wiki_ns_kab = { "Media": "NS_MEDIA", "Uslig": "NS_SPECIAL", "Mmeslay": "NS_TALK", "Amseqdac": "NS_USER", "Amyannan_umsqedac": "NS_USER_TALK", "Tugna": "NS_IMAGE", "Amyannan_n_tugna": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Amyannan_n_MediaWiki": "NS_MEDIAWIKI_TALK", "TalÉ£a": "NS_TEMPLATE", "Amyannan_n_talÉ£a": "NS_TEMPLATE_TALK", "Tallat": "NS_HELP", "Amyannan_n_tallat": "NS_HELP_TALK", "Taggayt": "NS_CATEGORY", "Amyannan_n_taggayt": "NS_CATEGORY_TALK", } wiki_ns_re_kab = [ ("Amyannan_n_", "", "NS_PROJECT_TALK"), ] wiki_ns_fo = { "Miðil": "NS_MEDIA", "Serstakur": "NS_SPECIAL", "Kjak": "NS_TALK", "Brúkari": "NS_USER", "Brúkari_kjak": "NS_USER_TALK", "Mynd": "NS_IMAGE", "Mynd_kjak": "NS_IMAGE_TALK", "MidiaWiki": "NS_MEDIAWIKI", "MidiaWiki_kjak": "NS_MEDIAWIKI_TALK", "Fyrimynd": "NS_TEMPLATE", "Fyrimynd_kjak": "NS_TEMPLATE_TALK", "Hjálp": "NS_HELP", "Hjálp kjak": "NS_HELP_TALK", "Bólkur": "NS_CATEGORY", "Bólkur_kjak": "NS_CATEGORY_TALK", } wiki_ns_re_fo = [ ("", "_kjak", "NS_PROJECT_TALK"), ] wiki_ns_pt_br = { "Media": "NS_MEDIA", "Especial": "NS_SPECIAL", "Discussão": "NS_TALK", "Usuário": "NS_USER", "Usuário_Discussão": "NS_USER_TALK", "Imagem": "NS_IMAGE", "Imagem_Discussão": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Discussão": "NS_MEDIAWIKI_TALK", "Predefinição": "NS_TEMPLATE", "Predefinição_Discussão": "NS_TEMPLATE_TALK", "Ajuda": "NS_HELP", "Ajuda_Discussão": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Categoria_Discussão": "NS_CATEGORY_TALK", } wiki_ns_re_pt_br = [ ("", "_Discussão", "NS_PROJECT_TALK"), ] wiki_ns_dsb = { "Medija": "NS_MEDIA", "Specialne": "NS_SPECIAL", "Diskusija": "NS_TALK", "WužywaÅ•": "NS_USER", "Diskusija_wužywarja": "NS_USER_TALK", "Wobraz": "NS_IMAGE", "Diskusija_wó_wobrazu": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_diskusija": "NS_MEDIAWIKI_TALK", "PÅ›edÅ‚oga": "NS_TEMPLATE", "Diskusija_wó_pÅ›edÅ‚oze": "NS_TEMPLATE_TALK", "Pomoc": "NS_HELP", "Diskusija_wó_pomocy": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Diskusija_wó_kategoriji": "NS_CATEGORY_TALK", } wiki_ns_re_dsb = [ ("", "_diskusija", "NS_PROJECT_TALK"), ] wiki_ns_jv = { "Media": "NS_MEDIA", "Astamiwa": "NS_SPECIAL", "Dhiskusi": "NS_TALK", "Panganggo": "NS_USER", "Dhiskusi_Panganggo": "NS_USER_TALK", "Gambar": "NS_IMAGE", "Dhiskusi_Gambar": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Dhiskusi_MediaWiki": "NS_MEDIAWIKI_TALK", "Cithakan": "NS_TEMPLATE", "Dhiskusi_Cithakan": "NS_TEMPLATE_TALK", "Pitulung": "NS_HELP", "Dhiskusi_Pitulung": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Dhiskusi_Kategori": "NS_CATEGORY_TALK", } wiki_ns_re_jv = [ ("Dhiskusi_", "", "NS_PROJECT_TALK"), ] wiki_ns_vo = { "Nünamakanäd": "NS_MEDIA", "Patikos": "NS_SPECIAL", "Bespik": "NS_TALK", "Geban": "NS_USER", "Gebanibespik": "NS_USER_TALK", "Magod": "NS_IMAGE", "Magodibespik": "NS_IMAGE_TALK", "Sitanuns": "NS_MEDIAWIKI", "Bespik_dö_sitanuns": "NS_MEDIAWIKI_TALK", "Samafomot": "NS_TEMPLATE", "Samafomotibespik": "NS_TEMPLATE_TALK", "Yuf": "NS_HELP", "Yufibespik": "NS_HELP_TALK", "Klad": "NS_CATEGORY", "Kladibespik": "NS_CATEGORY_TALK", } wiki_ns_re_vo = [ ("Bespik_dö_", "", "NS_PROJECT_TALK"), ] wiki_ns_ka = { "მედიáƒ": "NS_MEDIA", "სპეციáƒáƒšáƒ£áƒ áƒ˜": "NS_SPECIAL", "გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_TALK", "მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი": "NS_USER", "მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_USER_TALK", "სურáƒáƒ—ი": "NS_IMAGE", "სურáƒáƒ—ი_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_IMAGE_TALK", "მედიáƒáƒ•იკი": "NS_MEDIAWIKI", "მედიáƒáƒ•იკი_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_MEDIAWIKI_TALK", "თáƒáƒ áƒ’ი": "NS_TEMPLATE", "თáƒáƒ áƒ’ი_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_TEMPLATE_TALK", "დáƒáƒ®áƒ›áƒáƒ áƒ”ბáƒ": "NS_HELP", "დáƒáƒ®áƒ›áƒáƒ áƒ”ბáƒ_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_HELP_TALK", "კáƒáƒ¢áƒ”გáƒáƒ áƒ˜áƒ": "NS_CATEGORY", "კáƒáƒ¢áƒ”გáƒáƒ áƒ˜áƒ_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ": "NS_CATEGORY_TALK", } wiki_ns_re_ka = [ ("", "_გáƒáƒœáƒ®áƒ˜áƒšáƒ•áƒ", "NS_PROJECT_TALK"), ] wiki_ns_gn = { "Mba'echÄ©chÄ©": "NS_SPECIAL", "Myangekõi": "NS_TALK", "Puruhára": "NS_USER", "Puruhára_myangekõi": "NS_USER_TALK", "Ta'ãnga": "NS_IMAGE", "Ta'ãnga_myangekõi": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_myangekõi": "NS_MEDIAWIKI_TALK", "Tembiecharã": "NS_TEMPLATE", "Tembiecharã_myangekõi": "NS_TEMPLATE_TALK", "Pytyvõ": "NS_HELP", "Pytyvõ_myangekõi": "NS_HELP_TALK", "Ñemohenda": "NS_CATEGORY", "Ñemohenda_myangekõi": "NS_CATEGORY_TALK", } wiki_ns_re_gn = [ ("", "_myangekõi", "NS_PROJECT_TALK"), ] wiki_ns_sr_el = { "Medija": "NS_MEDIA", "Posebno": "NS_SPECIAL", "Razgovor": "NS_TALK", "Korisnik": "NS_USER", "Razgovor_sa_korisnikom": "NS_USER_TALK", "Slika": "NS_IMAGE", "Razgovor_o_slici": "NS_IMAGE_TALK", "MedijaViki": "NS_MEDIAWIKI", "Razgovor_o_MedijaVikiju": "NS_MEDIAWIKI_TALK", "Å ablon": "NS_TEMPLATE", "Razgovor_o_Å¡ablonu": "NS_TEMPLATE_TALK", "Pomoć": "NS_HELP", "Razgovor_o_pomoći": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Razgovor_o_kategoriji": "NS_CATEGORY_TALK", } wiki_ns_re_sr_el = [ ("Razgovor_o_", "", "NS_PROJECT_TALK"), ] wiki_ns_cs = { "Média": "NS_MEDIA", "Speciální": "NS_SPECIAL", "Diskuse": "NS_TALK", "Uživatel": "NS_USER", "Uživatel_diskuse": "NS_USER_TALK", "Soubor": "NS_IMAGE", "Soubor_diskuse": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_diskuse": "NS_MEDIAWIKI_TALK", "Å ablona": "NS_TEMPLATE", "Å ablona_diskuse": "NS_TEMPLATE_TALK", "NápovÄ›da": "NS_HELP", "NápovÄ›da_diskuse": "NS_HELP_TALK", "Kategorie": "NS_CATEGORY", "Kategorie_diskuse": "NS_CATEGORY_TALK", } wiki_ns_re_cs = [ ("", "_diskuse", "NS_PROJECT_TALK"), ] wiki_ns_sc = { "Speciale": "NS_SPECIAL", "Contièndha": "NS_TALK", "Utente": "NS_USER", "Utente_discussioni": "NS_USER_TALK", "Immàgini": "NS_IMAGE", "Immàgini_contièndha": "NS_IMAGE_TALK", } wiki_ns_re_sc = [ ("", "_discussioni", "NS_PROJECT_TALK"), ] wiki_ns_km = { "មáŸážŒáž¶": "NS_MEDIA", "ពិសáŸážŸ": "NS_SPECIAL", "ការពិភាក្សា": "NS_TALK", "អ្នកប្រើប្រាស់": "NS_USER", "ការពិភាក្សារបស់អ្នកប្រើប្រាស់": "NS_USER_TALK", "រូបភាព": "NS_IMAGE", "ការពិភាក្សាអំពីរូបភាព": "NS_IMAGE_TALK", "មáŸážŒáž¶ážœáž·áž‚ី": "NS_MEDIAWIKI", "ការពិភាក្សាអំពីមáŸážŒáž¶ážœáž·áž‚ី": "NS_MEDIAWIKI_TALK", "ទំពáŸážšáž‚ំរូ": "NS_TEMPLATE", "ការពិភាក្សាអំពីទំពáŸážšáž‚ំរូ": "NS_TEMPLATE_TALK", "ជំនួយ": "NS_HELP", "ការពិភាក្សាអំពីជំនួយ": "NS_HELP_TALK", "ចំណាážáŸ‹ážáŸ’នាក់ក្រុម": "NS_CATEGORY", "ការពិភាក្សាអំពីចំណាážáŸ‹ážáŸ’នាក់ក្រុម": "NS_CATEGORY_TALK", } wiki_ns_re_km = [ ("ការពិភាក្សាអំពី", "", "NS_PROJECT_TALK"), ] wiki_ns_sk = { "Médiá": "NS_MEDIA", "Å peciálne": "NS_SPECIAL", "Diskusia": "NS_TALK", "Redaktor": "NS_USER", "Diskusia_s_redaktorom": "NS_USER_TALK", "Obrázok": "NS_IMAGE", "Diskusia_k_obrázku": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Diskusia_k_MediaWiki": "NS_MEDIAWIKI_TALK", "Å ablóna": "NS_TEMPLATE", "Diskusia_k_Å¡ablóne": "NS_TEMPLATE_TALK", "Pomoc": "NS_HELP", "Diskusia_k_pomoci": "NS_HELP_TALK", "Kategória": "NS_CATEGORY", "Diskusia_ku_kategórii": "NS_CATEGORY_TALK", } wiki_ns_re_sk = [ ("Diskusia_k_{{grammar:datív|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_bpy = { "মিডিয়া": "NS_MEDIA", "বিশেষ": "NS_SPECIAL", "য়à§à¦¯à¦¾à¦°à§€": "NS_TALK", "আতাকà§à¦°à¦¾": "NS_USER", "আতাকà§à¦°à¦¾à¦°_য়à§à¦¯à¦¾à¦°à§€": "NS_USER_TALK", "ছবি": "NS_IMAGE", "ছবি_য়à§à¦¯à¦¾à¦°à§€": "NS_IMAGE_TALK", "মিডিয়াউইকি": "NS_MEDIAWIKI", "মিডিয়াউইকির_য়à§à¦¯à¦¾à¦°à§€": "NS_MEDIAWIKI_TALK", "মডেল": "NS_TEMPLATE", "মডেলর_য়à§à¦¯à¦¾à¦°à§€": "NS_TEMPLATE_TALK", "পাংলাক": "NS_HELP", "পাংলাকর_য়à§à¦¯à¦¾à¦°à§€": "NS_HELP_TALK", "থাক": "NS_CATEGORY", "থাকর_য়à§à¦¯à¦¾à¦°à§€": "NS_CATEGORY_TALK", } wiki_ns_re_bpy = [ ("", "_য়à§à¦¯à¦¾à¦°à§€", "NS_PROJECT_TALK"), ] wiki_ns_he = { "מדיה": "NS_MEDIA", "מיוחד": "NS_SPECIAL", "שיחה": "NS_TALK", "משתמש": "NS_USER", "שיחת_משתמש": "NS_USER_TALK", "תמונה": "NS_IMAGE", "שיחת_תמונה": "NS_IMAGE_TALK", "מדיה_ויקי": "NS_MEDIAWIKI", "שיחת_מדיה_ויקי": "NS_MEDIAWIKI_TALK", "תבנית": "NS_TEMPLATE", "שיחת_תבנית": "NS_TEMPLATE_TALK", "עזרה": "NS_HELP", "שיחת_עזרה": "NS_HELP_TALK", "קטגוריה": "NS_CATEGORY", "שיחת_קטגוריה": "NS_CATEGORY_TALK", } wiki_ns_re_he = [ ("שיחת_", "", "NS_PROJECT_TALK"), ] wiki_ns_hi = { "Media": "NS_MEDIA", "विशेष": "NS_SPECIAL", "वारà¥à¤¤à¤¾": "NS_TALK", "सदसà¥à¤¯": "NS_USER", "सदसà¥à¤¯_वारà¥à¤¤à¤¾": "NS_USER_TALK", "चितà¥à¤°": "NS_IMAGE", "चितà¥à¤°_वारà¥à¤¤à¤¾": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "साà¤à¤šà¤¾": "NS_TEMPLATE", "साà¤à¤šà¤¾_वारà¥à¤¤à¤¾": "NS_TEMPLATE_TALK", "शà¥à¤°à¥‡à¤£à¥€": "NS_CATEGORY", "शà¥à¤°à¥‡à¤£à¥€_वारà¥à¤¤à¤¾": "NS_CATEGORY_TALK", } wiki_ns_re_hi = [ ("", "_वारà¥à¤¤à¤¾", "NS_PROJECT_TALK"), ] wiki_ns_hu = { "Média": "NS_MEDIA", "Speciális": "NS_SPECIAL", "Vita": "NS_TALK", "SzerkesztÅ‘": "NS_USER", "SzerkesztÅ‘vita": "NS_USER_TALK", "Kép": "NS_IMAGE", "Képvita": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki-vita": "NS_MEDIAWIKI_TALK", "Sablon": "NS_TEMPLATE", "Sablonvita": "NS_TEMPLATE_TALK", "Segítség": "NS_HELP", "Segítségvita": "NS_HELP_TALK", "Kategória": "NS_CATEGORY", "Kategóriavita": "NS_CATEGORY_TALK", } wiki_ns_re_hu = [ ("", "-vita", "NS_PROJECT_TALK"), ] wiki_ns_lt = { "Medija": "NS_MEDIA", "Specialus": "NS_SPECIAL", "Aptarimas": "NS_TALK", "Naudotojas": "NS_USER", "Naudotojo_aptarimas": "NS_USER_TALK", "Vaizdas": "NS_IMAGE", "Vaizdo_aptarimas": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_aptarimas": "NS_MEDIAWIKI_TALK", "Å ablonas": "NS_TEMPLATE", "Å ablono_aptarimas": "NS_TEMPLATE_TALK", "Pagalba": "NS_HELP", "Pagalbos_aptarimas": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Kategorijos_aptarimas": "NS_CATEGORY_TALK", } wiki_ns_re_lt = [ ("", "_aptarimas", "NS_PROJECT_TALK"), ] wiki_ns_hy = { "Õ„Õ¥Õ¤Õ«Õ¡": "NS_MEDIA", "ÕÕºÕ¡Õ½Õ¡Ö€Õ¯Õ¸Õ²": "NS_SPECIAL", "Õ”Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_TALK", "Õ„Õ¡Õ½Õ¶Õ¡Õ¯Õ«Ö": "NS_USER", "Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ«_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_USER_TALK", "ÕŠÕ¡Õ¿Õ¯Õ¥Ö€": "NS_IMAGE", "ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ«_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_MEDIAWIKI_TALK", "Ô¿Õ¡Õ²Õ¡ÕºÕ¡Ö€": "NS_TEMPLATE", "Ô¿Õ¡Õ²Õ¡ÕºÕ¡Ö€Õ«_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_TEMPLATE_TALK", "Õ•Õ£Õ¶Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶": "NS_HELP", "Õ•Õ£Õ¶Õ¸Ö‚Õ©ÕµÕ¡Õ¶_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_HELP_TALK", "Ô¿Õ¡Õ¿Õ¥Õ£Õ¸Ö€Õ«Õ¡": "NS_CATEGORY", "Ô¿Õ¡Õ¿Õ¥Õ£Õ¸Ö€Õ«Õ¡ÕµÕ«_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´": "NS_CATEGORY_TALK", } wiki_ns_re_hy = [ ("{{GRAMMAR:genitive|", "}}_Ö„Õ¶Õ¶Õ¡Ö€Õ¯Õ¸Ö‚Õ´", "NS_PROJECT_TALK"), ] wiki_ns_ps = { "رسنÛ": "NS_MEDIA", "ÚØ§Ù†Ú«Ú“ÛŒ": "NS_SPECIAL", "خبرÛ_اترÛ": "NS_TALK", "کارونکی": "NS_USER", "د_کارونکي_خبرÛ_اترÛ": "NS_USER_TALK", "انÚور": "NS_IMAGE", "د_انÚور_خبرÛ_اترÛ": "NS_IMAGE_TALK", "ميډياويکي": "NS_MEDIAWIKI", "د_ميډياويکي_خبرÛ_اترÛ": "NS_MEDIAWIKI_TALK", "کينډÛ": "NS_TEMPLATE", "د_کينډÛ_خبرÛ_اترÛ": "NS_TEMPLATE_TALK", "لارښود": "NS_HELP", "د_لارښود_خبرÛ_اترÛ": "NS_HELP_TALK", "ÙˆÛØ´Ù†ÙŠØ²Ù‡": "NS_CATEGORY", "د_ÙˆÛØ´Ù†ÙŠØ²Û_خبرÛ_اترÛ": "NS_CATEGORY_TALK", } wiki_ns_re_ps = [ ("د_", "_خبرÛ_اترÛ", "NS_PROJECT_TALK"), ] wiki_ns_ksh = { "Medie": "NS_MEDIA", "Spezial": "NS_SPECIAL", "Klaaf": "NS_TALK", "Metmaacher": "NS_USER", "Metmaacher_Klaaf": "NS_USER_TALK", "Beld": "NS_IMAGE", "Belder_Klaaf": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Klaaf": "NS_MEDIAWIKI_TALK", "Schablon": "NS_TEMPLATE", "Schablone_Klaaf": "NS_TEMPLATE_TALK", "Hölp": "NS_HELP", "Hölp_Klaaf": "NS_HELP_TALK", "Saachjrupp": "NS_CATEGORY", "Saachjrupp_Klaaf": "NS_CATEGORY_TALK", } wiki_ns_re_ksh = [ ("", "_Klaaf", "NS_PROJECT_TALK"), ] wiki_ns_tr = { "Media": "NS_MEDIA", "Özel": "NS_SPECIAL", "Tartışma": "NS_TALK", "Kullanıcı": "NS_USER", "Kullanıcı_mesaj": "NS_USER_TALK", "Resim": "NS_IMAGE", "Resim_tartışma": "NS_IMAGE_TALK", "MedyaViki": "NS_MEDIAWIKI", "MedyaViki_tartışma": "NS_MEDIAWIKI_TALK", "Åžablon": "NS_TEMPLATE", "Åžablon_tartışma": "NS_TEMPLATE_TALK", "Yardım": "NS_HELP", "Yardım_tartışma": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Kategori_tartışma": "NS_CATEGORY_TALK", } wiki_ns_re_tr = [ ("", "_tartışma", "NS_PROJECT_TALK"), ] wiki_ns_af = { "Media": "NS_MEDIA", "Spesiaal": "NS_SPECIAL", "Bespreking": "NS_TALK", "Gebruiker": "NS_USER", "Gebruikerbespreking": "NS_USER_TALK", "Beeld": "NS_IMAGE", "Beeldbespreking": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWikibespreking": "NS_MEDIAWIKI_TALK", "Sjabloon": "NS_TEMPLATE", "Sjabloonbespreking": "NS_TEMPLATE_TALK", "Hulp": "NS_HELP", "Hulpbespreking": "NS_HELP_TALK", "Kategorie": "NS_CATEGORY", "Kategoriebespreking": "NS_CATEGORY_TALK", } wiki_ns_re_af = [ ("", "bespreking", "NS_PROJECT_TALK"), ] wiki_ns_zh_hans = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Talk": "NS_TALK", "User": "NS_USER", "User_talk": "NS_USER_TALK", "Image": "NS_IMAGE", "Image_talk": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Template_talk": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Help_talk": "NS_HELP_TALK", "Category": "NS_CATEGORY", "Category_talk": "NS_CATEGORY_TALK", } wiki_ns_re_zh_hans = [ ("", "_talk", "NS_PROJECT_TALK"), ] wiki_ns_id = { "Media": "NS_MEDIA", "Istimewa": "NS_SPECIAL", "Pembicaraan": "NS_TALK", "Pengguna": "NS_USER", "Pembicaraan_Pengguna": "NS_USER_TALK", "Berkas": "NS_IMAGE", "Pembicaraan_Berkas": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Pembicaraan_MediaWiki": "NS_MEDIAWIKI_TALK", "Templat": "NS_TEMPLATE", "Pembicaraan_Templat": "NS_TEMPLATE_TALK", "Bantuan": "NS_HELP", "Pembicaraan_Bantuan": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Pembicaraan_Kategori": "NS_CATEGORY_TALK", } wiki_ns_re_id = [ ("Pembicaraan_", "", "NS_PROJECT_TALK"), ] wiki_ns_tet = { "Media": "NS_MEDIA", "Espesiál": "NS_SPECIAL", "Diskusaun": "NS_TALK", "Uza-na'in": "NS_USER", "Diskusaun_Uza-na'in": "NS_USER_TALK", "Imajen": "NS_IMAGE", "Diskusaun_Imajen": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Diskusaun_MediaWiki": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Diskusaun_Template": "NS_TEMPLATE_TALK", "Ajuda": "NS_HELP", "Diskusaun_Ajuda": "NS_HELP_TALK", "Kategoria": "NS_CATEGORY", "Diskusaun_Kategoria": "NS_CATEGORY_TALK", } wiki_ns_re_tet = [ ("Diskusaun_", "", "NS_PROJECT_TALK"), ] wiki_ns_an = { "Media": "NS_MEDIA", "Espezial": "NS_SPECIAL", "Descusión": "NS_TALK", "Usuario": "NS_USER", "Descusión_usuario": "NS_USER_TALK", "Imachen": "NS_IMAGE", "Descusión_imachen": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Descusión_MediaWiki": "NS_MEDIAWIKI_TALK", "Plantilla": "NS_TEMPLATE", "Descusión_plantilla": "NS_TEMPLATE_TALK", "Aduya": "NS_HELP", "Descusión_aduya": "NS_HELP_TALK", "Categoría": "NS_CATEGORY", "Descusión_categoría": "NS_CATEGORY_TALK", } wiki_ns_re_an = [ ("Descusión_", "", "NS_PROJECT_TALK"), ] wiki_ns_ar = { "ميديا": "NS_MEDIA", "خاص": "NS_SPECIAL", "نقاش": "NS_TALK", "مستخدم": "NS_USER", "نقاش_المستخدم": "NS_USER_TALK", "صورة": "NS_IMAGE", "نقاش_الصورة": "NS_IMAGE_TALK", "ميدياويكي": "NS_MEDIAWIKI", "نقاش_ميدياويكي": "NS_MEDIAWIKI_TALK", "قالب": "NS_TEMPLATE", "نقاش_القالب": "NS_TEMPLATE_TALK", "مساعدة": "NS_HELP", "نقاش_المساعدة": "NS_HELP_TALK", "تصنيÙ": "NS_CATEGORY", "نقاش_التصنيÙ": "NS_CATEGORY_TALK", } wiki_ns_re_ar = [ ("نقاش_", "", "NS_PROJECT_TALK"), ] wiki_ns_tg_cyrl = { "Медиа": "NS_MEDIA", "Вижа": "NS_SPECIAL", "БаҳÑ": "NS_TALK", "Корбар": "NS_USER", "БаҳÑи_корбар": "NS_USER_TALK", "ÐкÑ": "NS_IMAGE", "БаҳÑи_акÑ": "NS_IMAGE_TALK", "Медиавики": "NS_MEDIAWIKI", "БаҳÑи_медиавики": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "БаҳÑи_шаблон": "NS_TEMPLATE_TALK", "Роҳнамо": "NS_HELP", "БаҳÑи_роҳнамо": "NS_HELP_TALK", "Гурӯҳ": "NS_CATEGORY", "БаҳÑи_гурӯҳ": "NS_CATEGORY_TALK", } wiki_ns_re_tg_cyrl = [ ("БаҳÑи_", "", "NS_PROJECT_TALK"), ] wiki_ns_rmy = { "Mediya": "NS_MEDIA", "Uzalutno": "NS_SPECIAL", "Vakyarimata": "NS_TALK", "Jeno": "NS_USER", "Jeno_vakyarimata": "NS_USER_TALK", "Chitro": "NS_IMAGE", "Chitro_vakyarimata": "NS_IMAGE_TALK", "MediyaViki": "NS_MEDIAWIKI", "MediyaViki_vakyarimata": "NS_MEDIAWIKI_TALK", "Sikavno": "NS_TEMPLATE", "Sikavno_vakyarimata": "NS_TEMPLATE_TALK", "Zhutipen": "NS_HELP", "Zhutipen_vakyarimata": "NS_HELP_TALK", "Shopni": "NS_CATEGORY", "Shopni_vakyarimata": "NS_CATEGORY_TALK", } wiki_ns_re_rmy = [ ("{{grammar:genitive-pl|", "}}_vakyarimata", "NS_PROJECT_TALK"), ] wiki_ns_mk = { "Медија": "NS_MEDIA", "Специјални": "NS_SPECIAL", "Разговор": "NS_TALK", "КориÑник": "NS_USER", "Разговор_Ñо_кориÑник": "NS_USER_TALK", "Слика": "NS_IMAGE", "Разговор_за_Ñлика": "NS_IMAGE_TALK", "МедијаВики": "NS_MEDIAWIKI", "Разговор_за_МедијаВики": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Разговор_за_шаблон": "NS_TEMPLATE_TALK", "Помош": "NS_HELP", "Разговор_за_помош": "NS_HELP_TALK", "Категорија": "NS_CATEGORY", "Разговор_за_категорија": "NS_CATEGORY_TALK", } wiki_ns_re_mk = [ ("Разговор_за_", "", "NS_PROJECT_TALK"), ] wiki_ns_eu = { "Media": "NS_MEDIA", "Aparteko": "NS_SPECIAL", "Eztabaida": "NS_TALK", "Lankide": "NS_USER", "Lankide_eztabaida": "NS_USER_TALK", "Irudi": "NS_IMAGE", "Irudi_eztabaida": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_eztabaida": "NS_MEDIAWIKI_TALK", "Txantiloi": "NS_TEMPLATE", "Txantiloi_eztabaida": "NS_TEMPLATE_TALK", "Laguntza": "NS_HELP", "Laguntza_eztabaida": "NS_HELP_TALK", "Kategoria": "NS_CATEGORY", "Kategoria_eztabaida": "NS_CATEGORY_TALK", } wiki_ns_re_eu = [ ("", "_eztabaida", "NS_PROJECT_TALK"), ] wiki_ns_az = { "Mediya": "NS_MEDIA", "Xüsusi": "NS_SPECIAL", "MüzakirÉ™": "NS_TALK", "İstifadəçi": "NS_USER", "İstifadəçi_müzakirÉ™si": "NS_USER_TALK", "Şəkil": "NS_IMAGE", "Şəkil_müzakirÉ™si": "NS_IMAGE_TALK", "MediyaViki": "NS_MEDIAWIKI", "MediyaViki_müzakirÉ™si": "NS_MEDIAWIKI_TALK", "Åžablon": "NS_TEMPLATE", "Åžablon_müzakirÉ™si": "NS_TEMPLATE_TALK", "KömÉ™k": "NS_HELP", "KömÉ™k_müzakirÉ™si": "NS_HELP_TALK", "Kateqoriya": "NS_CATEGORY", "Kateqoriya_müzakirÉ™si": "NS_CATEGORY_TALK", } wiki_ns_re_az = [ ("", "_müzakirÉ™si", "NS_PROJECT_TALK"), ] wiki_ns_bat_smg = { "SpecÄ“los": "NS_SPECIAL", "AptarÄ—ms": "NS_TALK", "Nauduotuos": "NS_USER", "NauduotuojÄ—_aptarÄ—ms": "NS_USER_TALK", "Abruozdielis": "NS_IMAGE", "AbruozdielÄ—_aptarÄ—ms": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_aptarÄ—ms": "NS_MEDIAWIKI_TALK", "Å abluons": "NS_TEMPLATE", "Å abluona_aptarÄ—ms": "NS_TEMPLATE_TALK", "Pagelba": "NS_HELP", "Pagelbas_aptarÄ—ms": "NS_HELP_TALK", "KateguorÄ—jÄ—": "NS_CATEGORY", "KateguorÄ—jÄ—s_aptarÄ—ms": "NS_CATEGORY_TALK", } wiki_ns_re_bat_smg = [ ("", "_aptarÄ—ms", "NS_PROJECT_TALK"), ] wiki_ns_it = { "Media": "NS_MEDIA", "Speciale": "NS_SPECIAL", "Discussione": "NS_TALK", "Utente": "NS_USER", "Discussioni_utente": "NS_USER_TALK", "Immagine": "NS_IMAGE", "Discussioni_immagine": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussioni_MediaWiki": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Discussioni_template": "NS_TEMPLATE_TALK", "Aiuto": "NS_HELP", "Discussioni_aiuto": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Discussioni_categoria": "NS_CATEGORY_TALK", } wiki_ns_re_it = [ ("Discussioni_", "", "NS_PROJECT_TALK"), ] wiki_ns_ms = { "Media": "NS_MEDIA", "Khas": "NS_SPECIAL", "Perbincangan": "NS_TALK", "Pengguna": "NS_USER", "Perbincangan_Pengguna": "NS_USER_TALK", "Imej": "NS_IMAGE", "Perbincangan_Imej": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Perbincangan_MediaWiki": "NS_MEDIAWIKI_TALK", "Templat": "NS_TEMPLATE", "Perbincangan_Templat": "NS_TEMPLATE_TALK", "Bantuan": "NS_HELP", "Perbincangan_Bantuan": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Perbincangan_Kategori": "NS_CATEGORY_TALK", } wiki_ns_re_ms = [ ("Perbincangan_", "", "NS_PROJECT_TALK"), ] wiki_ns_ba = { "Медиа": "NS_MEDIA", "ЯрҙамÑÑ‹": "NS_SPECIAL", "Фекер_алышыу": "NS_TALK", "ҠатнашыуÑÑ‹": "NS_USER", "ҠатнашыуÑÑ‹_м-н_фекер_алышыу": "NS_USER_TALK", "РәÑем": "NS_IMAGE", "РәÑем_б-Ñа_фекер_алышыу": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_б-Ñа_фекер_алышыу": "NS_MEDIAWIKI_TALK", "Ҡалып": "NS_TEMPLATE", "Ҡалып_б-Ñа_фекер_алышыу": "NS_TEMPLATE_TALK", "Белешмә": "NS_HELP", "Белешмә_б-Ñа_фекер_алышыу": "NS_HELP_TALK", "КатегориÑ": "NS_CATEGORY", "КатегориÑ_б-Ñа_фекер_алышыу": "NS_CATEGORY_TALK", } wiki_ns_re_ba = [ ("", "_б-Ñа_фекер_алышыу", "NS_PROJECT_TALK"), ] wiki_ns_be = { "МультымедыÑ": "NS_MEDIA", "ÐдмыÑловае": "NS_SPECIAL", "Размовы": "NS_TALK", "Удзельнік": "NS_USER", "Размовы_з_удзельнікам": "NS_USER_TALK", "Ð’Ñ‹Ñва": "NS_IMAGE", "Размовы_пра_выÑву": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Размовы_пра_MediaWiki": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Размовы_пра_шаблон": "NS_TEMPLATE_TALK", "Даведка": "NS_HELP", "Размовы_пра_даведку": "NS_HELP_TALK", "КатÑгорыÑ": "NS_CATEGORY", "Размовы_пра_катÑгорыю": "NS_CATEGORY_TALK", } wiki_ns_re_be = [ ("", "_размовы", "NS_PROJECT_TALK"), ] wiki_ns_crh_cyrl = { "Медиа": "NS_MEDIA", "МахÑуÑ": "NS_SPECIAL", "Музакере": "NS_TALK", "Къулланыджы": "NS_USER", "Къулланыджы_музакереÑи": "NS_USER_TALK", "РеÑим": "NS_IMAGE", "РеÑим_музакереÑи": "NS_IMAGE_TALK", "МедиаВики": "NS_MEDIAWIKI", "МедиаВики_музакереÑи": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Шаблон_музакереÑи": "NS_TEMPLATE_TALK", "Ярдым": "NS_HELP", "Ярдым_музакереÑи": "NS_HELP_TALK", "КатегориÑ": "NS_CATEGORY", "КатегориÑ_музакереÑи": "NS_CATEGORY_TALK", } wiki_ns_re_crh_cyrl = [ ("", "_музакереÑи", "NS_PROJECT_TALK"), ] wiki_ns_nn = { "Filpeikar": "NS_MEDIA", "Spesial": "NS_SPECIAL", "Diskusjon": "NS_TALK", "Brukar": "NS_USER", "Brukardiskusjon": "NS_USER_TALK", "Fil": "NS_IMAGE", "Fildiskusjon": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki-diskusjon": "NS_MEDIAWIKI_TALK", "Mal": "NS_TEMPLATE", "Maldiskusjon": "NS_TEMPLATE_TALK", "Hjelp": "NS_HELP", "Hjelpdiskusjon": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Kategoridiskusjon": "NS_CATEGORY_TALK", } wiki_ns_re_nn = [ ("", "-diskusjon", "NS_PROJECT_TALK"), ] wiki_ns_nv = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Naaltsoos_baa_yinísht'įÌ": "NS_TALK", "Choinish'įįhí": "NS_USER", "Choinish'įįhí_baa_yinísht'įÌ": "NS_USER_TALK", "E'elyaaígíí": "NS_IMAGE", "E'elyaaígíí_baa_yinísht'įÌ": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_baa_yinísht'įÌ": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Template_talk": "NS_TEMPLATE_TALK", "Aná'álwo'": "NS_HELP", "Aná'álwo'_baa_yinísht'įÌ": "NS_HELP_TALK", "T'ááłáhági_át'éego": "NS_CATEGORY", "T'ááłáhági_át'éego_baa_yinísht'įÌ": "NS_CATEGORY_TALK", } wiki_ns_re_nv = [ ("", "_baa_yinísht'įÌ", "NS_PROJECT_TALK"), ] wiki_ns_ru = { "Медиа": "NS_MEDIA", "СлужебнаÑ": "NS_SPECIAL", "ОбÑуждение": "NS_TALK", "УчаÑтник": "NS_USER", "ОбÑуждение_учаÑтника": "NS_USER_TALK", "Изображение": "NS_IMAGE", "ОбÑуждение_изображениÑ": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "ОбÑуждение_MediaWiki": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "ОбÑуждение_шаблона": "NS_TEMPLATE_TALK", "Справка": "NS_HELP", "ОбÑуждение_Ñправки": "NS_HELP_TALK", "КатегориÑ": "NS_CATEGORY", "ОбÑуждение_категории": "NS_CATEGORY_TALK", } wiki_ns_re_ru = [ ("ОбÑуждение_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_crh_latn = { "Media": "NS_MEDIA", "Mahsus": "NS_SPECIAL", "Muzakere": "NS_TALK", "Qullanıcı": "NS_USER", "Qullanıcı_muzakeresi": "NS_USER_TALK", "Resim": "NS_IMAGE", "Resim_muzakeresi": "NS_IMAGE_TALK", "MediaViki": "NS_MEDIAWIKI", "MediaViki_muzakeresi": "NS_MEDIAWIKI_TALK", "Åžablon": "NS_TEMPLATE", "Åžablon_muzakeresi": "NS_TEMPLATE_TALK", "Yardım": "NS_HELP", "Yardım_muzakeresi": "NS_HELP_TALK", "Kategoriya": "NS_CATEGORY", "Kategoriya_muzakeresi": "NS_CATEGORY_TALK", } wiki_ns_re_crh_latn = [ ("", "_muzakeresi", "NS_PROJECT_TALK"), ] wiki_ns_be_tarask = { "МÑдыÑ": "NS_MEDIA", "СпÑцыÑльныÑ": "NS_SPECIAL", "Ðбмеркаваньне": "NS_TALK", "Удзельнік": "NS_USER", "Гутаркі_ўдзельніка": "NS_USER_TALK", "Ð’Ñ‹Ñва": "NS_IMAGE", "Ðбмеркаваньне_выÑвы": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Ðбмеркаваньне_MediaWiki": "NS_MEDIAWIKI_TALK", "Шаблён": "NS_TEMPLATE", "Ðбмеркаваньне_шаблёну": "NS_TEMPLATE_TALK", "Дапамога": "NS_HELP", "Ðбмеркаваньне_дапамогі": "NS_HELP_TALK", "КатÑгорыÑ": "NS_CATEGORY", "Ðбмеркаваньне_катÑгорыі": "NS_CATEGORY_TALK", } wiki_ns_re_be_tarask = [ ("Ðбмеркаваньне_", "", "NS_PROJECT_TALK"), ] wiki_ns_yue = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Talk": "NS_TALK", "User": "NS_USER", "User_talk": "NS_USER_TALK", "Image": "NS_IMAGE", "Image_talk": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Template_talk": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Help_talk": "NS_HELP_TALK", "Category": "NS_CATEGORY", "Category_talk": "NS_CATEGORY_TALK", } wiki_ns_re_yue = [ ("", "_talk", "NS_PROJECT_TALK"), ] wiki_ns_kn = { "ಮೀಡಿಯ": "NS_MEDIA", "ವಿಶೇಷ": "NS_SPECIAL", "ಚರà³à²šà³†à²ªà³à²Ÿ": "NS_TALK", "ಸದಸà³à²¯": "NS_USER", "ಸದಸà³à²¯à²°_ಚರà³à²šà³†à²ªà³à²Ÿ": "NS_USER_TALK", "ಚಿತà³à²°": "NS_IMAGE", "ಚಿತà³à²°_ಚರà³à²šà³†à²ªà³à²Ÿ": "NS_IMAGE_TALK", "ಮೀಡಿಯವಿಕಿ": "NS_MEDIAWIKI", "ಮೀಡೀಯವಿಕಿ_ಚರà³à²šà³†": "NS_MEDIAWIKI_TALK", "ಟೆಂಪà³à²²à³‡à²Ÿà³": "NS_TEMPLATE", "ಟೆಂಪà³à²²à³‡à²Ÿà³_ಚರà³à²šà³†": "NS_TEMPLATE_TALK", "ಸಹಾಯ": "NS_HELP", "ಸಹಾಯ_ಚರà³à²šà³†": "NS_HELP_TALK", "ವರà³à²—": "NS_CATEGORY", "ವರà³à²—_ಚರà³à²šà³†": "NS_CATEGORY_TALK", } wiki_ns_re_kn = [ ("", "_ಚರà³à²šà³†", "NS_PROJECT_TALK"), ] wiki_ns_sl = { "Media": "NS_MEDIA", "Posebno": "NS_SPECIAL", "Pogovor": "NS_TALK", "Uporabnik": "NS_USER", "UporabniÅ¡ki_pogovor": "NS_USER_TALK", "Slika": "NS_IMAGE", "Pogovor_o_sliki": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Pogovor_o_MediaWiki": "NS_MEDIAWIKI_TALK", "Predloga": "NS_TEMPLATE", "Pogovor_o_predlogi": "NS_TEMPLATE_TALK", "PomoÄ": "NS_HELP", "Pogovor_o_pomoÄi": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Pogovor_o_kategoriji": "NS_CATEGORY_TALK", } wiki_ns_re_sl = [ ("Pogovor_{{grammar:mestnik|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_nds = { "Media": "NS_MEDIA", "Spezial": "NS_SPECIAL", "Diskuschoon": "NS_TALK", "Bruker": "NS_USER", "Bruker_Diskuschoon": "NS_USER_TALK", "Bild": "NS_IMAGE", "Bild_Diskuschoon": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Diskuschoon": "NS_MEDIAWIKI_TALK", "Vörlaag": "NS_TEMPLATE", "Vörlaag_Diskuschoon": "NS_TEMPLATE_TALK", "Hülp": "NS_HELP", "Hülp_Diskuschoon": "NS_HELP_TALK", "Kategorie": "NS_CATEGORY", "Kategorie_Diskuschoon": "NS_CATEGORY_TALK", } wiki_ns_re_nds = [ ("", "_Diskuschoon", "NS_PROJECT_TALK"), ] wiki_ns_tlh = { "Doch": "NS_MEDIA", "le'": "NS_SPECIAL", "ja'chuq": "NS_TALK", "lo'wI'": "NS_USER", "lo'wI'_ja'chuq": "NS_USER_TALK", "nagh_beQ": "NS_IMAGE", "nagh_beQ_ja'chuq": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_ja'chuq": "NS_MEDIAWIKI_TALK", "chen'ay'": "NS_TEMPLATE", "chen'ay'_ja'chuq": "NS_TEMPLATE_TALK", "QaH": "NS_HELP", "QaH_ja'chuq": "NS_HELP_TALK", "Segh": "NS_CATEGORY", "Segh_ja'chuq": "NS_CATEGORY_TALK", } wiki_ns_re_tlh = [ ("", "_ja'chuq", "NS_PROJECT_TALK"), ] wiki_ns_la = { "Specialis": "NS_SPECIAL", "Disputatio": "NS_TALK", "Usor": "NS_USER", "Disputatio_Usoris": "NS_USER_TALK", "Imago": "NS_IMAGE", "Disputatio_Imaginis": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Disputatio_MediaWiki": "NS_MEDIAWIKI_TALK", "Formula": "NS_TEMPLATE", "Disputatio_Formulae": "NS_TEMPLATE_TALK", "Auxilium": "NS_HELP", "Disputatio_Auxilii": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Disputatio_Categoriae": "NS_CATEGORY_TALK", } wiki_ns_re_la = [ ("Disputatio_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_li = { "Media": "NS_MEDIA", "Speciaal": "NS_SPECIAL", "Euverlèk": "NS_TALK", "Gebroeker": "NS_USER", "Euverlèk_gebroeker": "NS_USER_TALK", "Plaetje": "NS_IMAGE", "Euverlèk_plaetje": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Euverlèk_MediaWiki": "NS_MEDIAWIKI_TALK", "Sjabloon": "NS_TEMPLATE", "Euverlèk_sjabloon": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Euverlèk_help": "NS_HELP_TALK", "Categorie": "NS_CATEGORY", "Euverlèk_categorie": "NS_CATEGORY_TALK", } wiki_ns_re_li = [ ("Euverlèk_", "", "NS_PROJECT_TALK"), ] wiki_ns_hr = { "Mediji": "NS_MEDIA", "Posebno": "NS_SPECIAL", "Razgovor": "NS_TALK", "Suradnik": "NS_USER", "Razgovor_sa_suradnikom": "NS_USER_TALK", "Slika": "NS_IMAGE", "Razgovor_o_slici": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_razgovor": "NS_MEDIAWIKI_TALK", "Predložak": "NS_TEMPLATE", "Razgovor_o_predloÅ¡ku": "NS_TEMPLATE_TALK", "Pomoć": "NS_HELP", "Razgovor_o_pomoći": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Razgovor_o_kategoriji": "NS_CATEGORY_TALK", } wiki_ns_re_hr = [ ("Razgovor_", "", "NS_PROJECT_TALK"), ] wiki_ns_pl = { "Media": "NS_MEDIA", "Specjalna": "NS_SPECIAL", "Dyskusja": "NS_TALK", "Użytkownik": "NS_USER", "Dyskusja_użytkownika": "NS_USER_TALK", "Grafika": "NS_IMAGE", "Dyskusja_grafiki": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Dyskusja_MediaWiki": "NS_MEDIAWIKI_TALK", "Szablon": "NS_TEMPLATE", "Dyskusja_szablonu": "NS_TEMPLATE_TALK", "Pomoc": "NS_HELP", "Dyskusja_pomocy": "NS_HELP_TALK", "Kategoria": "NS_CATEGORY", "Dyskusja_kategorii": "NS_CATEGORY_TALK", } wiki_ns_re_pl = [ ("Dyskusja_", "", "NS_PROJECT_TALK"), ] wiki_ns_nds_nl = { "Media": "NS_MEDIA", "Speciaal": "NS_SPECIAL", "Overleg": "NS_TALK", "Gebruker": "NS_USER", "Overleg_gebruker": "NS_USER_TALK", "Ofbeelding": "NS_IMAGE", "Overleg_ofbeelding": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Overleg_MediaWiki": "NS_MEDIAWIKI_TALK", "Sjabloon": "NS_TEMPLATE", "Overleg_sjabloon": "NS_TEMPLATE_TALK", "Hulpe": "NS_HELP", "Overleg_hulpe": "NS_HELP_TALK", "Kattegerie": "NS_CATEGORY", "Overleg_kattegerie": "NS_CATEGORY_TALK", } wiki_ns_re_nds_nl = [ ("Overleg_", "", "NS_PROJECT_TALK"), ] wiki_ns_pt = { "Media": "NS_MEDIA", "Especial": "NS_SPECIAL", "Discussão": "NS_TALK", "Usuário": "NS_USER", "Usuário_Discussão": "NS_USER_TALK", "Imagem": "NS_IMAGE", "Imagem_Discussão": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Discussão": "NS_MEDIAWIKI_TALK", "Predefinição": "NS_TEMPLATE", "Predefinição_Discussão": "NS_TEMPLATE_TALK", "Ajuda": "NS_HELP", "Ajuda_Discussão": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Categoria_Discussão": "NS_CATEGORY_TALK", } wiki_ns_re_pt = [ ("", "_Discussão", "NS_PROJECT_TALK"), ] wiki_ns_xal = { "Ðһар": "NS_MEDIA", "Көдлхнə": "NS_SPECIAL", "Ухалвр": "NS_TALK", "Орлцач": "NS_USER", "Орлцачна_туÑкар_ухалвр": "NS_USER_TALK", "Зург": "NS_IMAGE", "Зургин_туÑкар_ухалвр": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_туÑкар_ухалвр": "NS_MEDIAWIKI_TALK", "Зура": "NS_TEMPLATE", "Зуран_туÑкар_ухалвр": "NS_TEMPLATE_TALK", "Цəəлһлһн": "NS_HELP", "Цəəлһлһин_туÑкар_ухалвр": "NS_HELP_TALK", "Янз": "NS_CATEGORY", "Янзин_туÑкар_ухалвр": "NS_CATEGORY_TALK", } wiki_ns_re_xal = [ ("", "_туÑкар_ухалвр", "NS_PROJECT_TALK"), ] wiki_ns_ast = { "Media": "NS_MEDIA", "Especial": "NS_SPECIAL", "Alderique": "NS_TALK", "Usuariu": "NS_USER", "Usuariu_alderique": "NS_USER_TALK", "Imaxe": "NS_IMAGE", "Imaxe_alderique": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_alderique": "NS_MEDIAWIKI_TALK", "Plantía": "NS_TEMPLATE", "Plantía_alderique": "NS_TEMPLATE_TALK", "Aida": "NS_HELP", "Aida_alderique": "NS_HELP_TALK", "Categoría": "NS_CATEGORY", "Categoría_alderique": "NS_CATEGORY_TALK", } wiki_ns_re_ast = [ ("", "_alderique", "NS_PROJECT_TALK"), ] wiki_ns_ia = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Discussion": "NS_TALK", "Usator": "NS_USER", "Discussion_Usator": "NS_USER_TALK", "Imagine": "NS_IMAGE", "Discussion_Imagine": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK", "Patrono": "NS_TEMPLATE", "Discussion_Patrono": "NS_TEMPLATE_TALK", "Adjuta": "NS_HELP", "Discussion_Adjuta": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Discussion_Categoria": "NS_CATEGORY_TALK", } wiki_ns_re_ia = [ ("Discussion_", "", "NS_PROJECT_TALK"), ] wiki_ns_kk_arab = { "تاسپا": "NS_MEDIA", "ارنايى": "NS_SPECIAL", "تالقىلاۋ": "NS_TALK", "قاتىسۋشى": "NS_USER", "قاتىسۋشى_تالقىلاۋى": "NS_USER_TALK", "سۋرەت": "NS_IMAGE", "سۋرەت_تالقىلاۋى": "NS_IMAGE_TALK", "مەدىياۋىيكىي": "NS_MEDIAWIKI", "مەدىياۋىيكىي_تالقىلاۋى": "NS_MEDIAWIKI_TALK", "Û‡Ù„Ú¯Ù‰": "NS_TEMPLATE", "Û‡Ù„Ú¯Ù‰_تالقىلاۋى": "NS_TEMPLATE_TALK", "انىقتاما": "NS_HELP", "انىقتاما_تالقىلاۋى": "NS_HELP_TALK", "سانات": "NS_CATEGORY", "سانات_تالقىلاۋى": "NS_CATEGORY_TALK", } wiki_ns_re_kk_arab = [ ("", "_تالقىلاۋى", "NS_PROJECT_TALK"), ] wiki_ns_zh_hant = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Talk": "NS_TALK", "User": "NS_USER", "User_talk": "NS_USER_TALK", "Image": "NS_IMAGE", "Image_talk": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Template_talk": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Help_talk": "NS_HELP_TALK", "Category": "NS_CATEGORY", "Category_talk": "NS_CATEGORY_TALK", } wiki_ns_re_zh_hant = [ ("", "_talk", "NS_PROJECT_TALK"), ] wiki_ns_fur = { "Media": "NS_MEDIA", "Speciâl": "NS_SPECIAL", "Discussion": "NS_TALK", "Utent": "NS_USER", "Discussion_utent": "NS_USER_TALK", "Figure": "NS_IMAGE", "Discussion_figure": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK", "Model": "NS_TEMPLATE", "Discussion_model": "NS_TEMPLATE_TALK", "Jutori": "NS_HELP", "Discussion_jutori": "NS_HELP_TALK", "Categorie": "NS_CATEGORY", "Discussion_categorie": "NS_CATEGORY_TALK", } wiki_ns_re_fur = [ ("Discussion_", "", "NS_PROJECT_TALK"), ] wiki_ns_en = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Talk": "NS_TALK", "User": "NS_USER", "User_talk": "NS_USER_TALK", "Image": "NS_IMAGE", "Image_talk": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Template_talk": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Help_talk": "NS_HELP_TALK", "Category": "NS_CATEGORY", "Category_talk": "NS_CATEGORY_TALK", } wiki_ns_re_en = [ ("", "_talk", "NS_PROJECT_TALK"), ] wiki_ns_lbe = { "Медиа": "NS_MEDIA", "Къуллугъирал_лажин": "NS_SPECIAL", "Ихтилат": "NS_TALK", "Гьуртту_хьума": "NS_USER", "Гьуртту_хьуминнал_ихтилат": "NS_USER_TALK", "Сурат": "NS_IMAGE", "СуратраÑÑÑа_ихтилат": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWikiлиÑÑÑа_ихтилат": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "ШаблондалиÑÑÑа_ихтилат": "NS_TEMPLATE_TALK", "Кумаг": "NS_HELP", "КумаграÑÑÑа_ихтилат": "NS_HELP_TALK", "КатегориÑ": "NS_CATEGORY", "КатегориÑлиÑÑÑа_ихтилат": "NS_CATEGORY_TALK", } wiki_ns_re_lbe = [ ("", "лиÑÑÑа_ихтилат", "NS_PROJECT_TALK"), ] wiki_ns_ml = { "മീഡിയ": "NS_MEDIA", "à´ªàµà´°à´¤àµà´¯àµ‡à´•à´‚": "NS_SPECIAL", "സംവാദം": "NS_TALK", "ഉപയോകàµà´¤à´¾à´µàµ": "NS_USER", "ഉപയോകàµà´¤à´¾à´µà´¿à´¨àµà´±àµ†_സംവാദം": "NS_USER_TALK", "à´šà´¿à´¤àµà´°à´‚": "NS_IMAGE", "à´šà´¿à´¤àµà´°à´¤àµà´¤à´¿à´¨àµà´±àµ†_സംവാദം": "NS_IMAGE_TALK", "മീഡിയവികàµà´•à´¿": "NS_MEDIAWIKI", "മീഡിയവികàµà´•à´¿_സംവാദം": "NS_MEDIAWIKI_TALK", "ഫലകം": "NS_TEMPLATE", "ഫലകതàµà´¤à´¿à´¨àµà´±àµ†_സംവാദം": "NS_TEMPLATE_TALK", "വിഭാഗം": "NS_CATEGORY", "വിഭാഗതàµà´¤à´¿à´¨àµà´±àµ†_സംവാദം": "NS_CATEGORY_TALK", "സഹായം": "NS_HELP", "സഹായതàµà´¤à´¿à´¨àµà´±àµ†_സംവാദം": "NS_HELP_TALK", } wiki_ns_re_ml = [ ("", "_സംവാദം", "NS_PROJECT_TALK"), ] wiki_ns_fiu_vro = { "Meediä": "NS_MEDIA", "Tallituslehekülg": "NS_SPECIAL", "Arotus": "NS_TALK", "Pruukja": "NS_USER", "Pruukja_arotus": "NS_USER_TALK", "Pilt": "NS_IMAGE", "Pildi_arotus": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_arotus": "NS_MEDIAWIKI_TALK", "Näüdüs": "NS_TEMPLATE", "Näüdüse_arotus": "NS_TEMPLATE_TALK", "Oppus": "NS_HELP", "Oppusõ_arotus": "NS_HELP_TALK", "Katõgooria": "NS_CATEGORY", "Katõgooria_arotus": "NS_CATEGORY_TALK", } wiki_ns_re_fiu_vro = [ ("", "_arotus", "NS_PROJECT_TALK"), ] wiki_ns_yi = { "מעדיע": "NS_MEDIA", "ב×ַזונדער": "NS_SPECIAL", "רעדן": "NS_TALK", "ב×ַניצער": "NS_USER", "ב×ַניצער_רעדן": "NS_USER_TALK", "בילד": "NS_IMAGE", "בילד_רעדן": "NS_IMAGE_TALK", "מעדיעװיקי": "NS_MEDIAWIKI", "מעדיעװיקי_רעדן": "NS_MEDIAWIKI_TALK", "מוסטער": "NS_TEMPLATE", "מוסטער_רעדן": "NS_TEMPLATE_TALK", "הילף": "NS_HELP", "הילף_רעדן": "NS_HELP_TALK", "×§×ַטעג×ָריע": "NS_CATEGORY", "×§×ַטעג×ָריע_רעדן": "NS_CATEGORY_TALK", } wiki_ns_re_yi = [ ("", "_רעדן", "NS_PROJECT_TALK"), ] wiki_ns_udm = { "Медиа": "NS_MEDIA", "Панель": "NS_SPECIAL", "ВераÑькон": "NS_TALK", "Викиавтор": "NS_USER", "Викиавтор_ÑÑрыÑÑŒ_вераÑькон": "NS_USER_TALK", "Суред": "NS_IMAGE", "Суред_ÑÑрыÑÑŒ_вераÑькон": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_ÑÑрыÑÑŒ_вераÑькон": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Шаблон_ÑÑрыÑÑŒ_вераÑькон": "NS_TEMPLATE_TALK", "ВалÑктон": "NS_HELP", "ВалÑктон_ÑÑрыÑÑŒ_вераÑькон": "NS_HELP_TALK", "КатегориÑ": "NS_CATEGORY", "КатегориÑ_ÑÑрыÑÑŒ_вераÑькон": "NS_CATEGORY_TALK", } wiki_ns_re_udm = [ ("", "_ÑÑрыÑÑŒ_вераÑькон", "NS_PROJECT_TALK"), ] wiki_ns_ur = { "زریعÛ": "NS_MEDIA", "خاص": "NS_SPECIAL", "تبادلۂ_خیال": "NS_TALK", "صارÙ": "NS_USER", "تبادلۂ_خیال_صارÙ": "NS_USER_TALK", "تصویر": "NS_IMAGE", "تبادلۂ_خیال_تصویر": "NS_IMAGE_TALK", "میڈیاوکی": "NS_MEDIAWIKI", "تبادلۂ_خیال_میڈیاوکی": "NS_MEDIAWIKI_TALK", "سانچÛ": "NS_TEMPLATE", "تبادلۂ_خیال_سانچÛ": "NS_TEMPLATE_TALK", "معاونت": "NS_HELP", "تبادلۂ_خیال_معاونت": "NS_HELP_TALK", "زمرÛ": "NS_CATEGORY", "تبادلۂ_خیال_زمرÛ": "NS_CATEGORY_TALK", } wiki_ns_re_ur = [ ("تبادلۂ_خیال_", "", "NS_PROJECT_TALK"), ] wiki_ns_fa = { "مدیا": "NS_MEDIA", "ویژه": "NS_SPECIAL", "بحث": "NS_TALK", "کاربر": "NS_USER", "بحث_کاربر": "NS_USER_TALK", "تصویر": "NS_IMAGE", "بحث_تصویر": "NS_IMAGE_TALK", "مدیاویکی": "NS_MEDIAWIKI", "بحث_مدیاویکی": "NS_MEDIAWIKI_TALK", "الگو": "NS_TEMPLATE", "بحث_الگو": "NS_TEMPLATE_TALK", "راهنما": "NS_HELP", "بحث_راهنما": "NS_HELP_TALK", "رده": "NS_CATEGORY", "بحث_رده": "NS_CATEGORY_TALK", } wiki_ns_re_fa = [ ("بحث_", "", "NS_PROJECT_TALK"), ] wiki_ns_ku_latn = { "Medya": "NS_MEDIA", "Taybet": "NS_SPECIAL", "NîqaÅŸ": "NS_TALK", "Bikarhêner": "NS_USER", "Bikarhêner_nîqaÅŸ": "NS_USER_TALK", "Wêne": "NS_IMAGE", "Wêne_nîqaÅŸ": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_nîqaÅŸ": "NS_MEDIAWIKI_TALK", "Åžablon": "NS_TEMPLATE", "Åžablon_nîqaÅŸ": "NS_TEMPLATE_TALK", "Alîkarî": "NS_HELP", "Alîkarî_nîqaÅŸ": "NS_HELP_TALK", "Kategorî": "NS_CATEGORY", "Kategorî_nîqaÅŸ": "NS_CATEGORY_TALK", } wiki_ns_re_ku_latn = [ ("", "_nîqaÅŸ", "NS_PROJECT_TALK"), ] wiki_ns_uz = { "Media": "NS_MEDIA", "Maxsus": "NS_SPECIAL", "Munozara": "NS_TALK", "Foydalanuvchi": "NS_USER", "Foydalanuvchi_munozarasi": "NS_USER_TALK", "Tasvir": "NS_IMAGE", "Tasvir_munozarasi": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_munozarasi": "NS_MEDIAWIKI_TALK", "Andoza": "NS_TEMPLATE", "Andoza_munozarasi": "NS_TEMPLATE_TALK", "Yordam": "NS_HELP", "Yordam_munozarasi": "NS_HELP_TALK", "Turkum": "NS_CATEGORY", "Turkum_munozarasi": "NS_CATEGORY_TALK", } wiki_ns_re_uz = [ ("", "_munozarasi", "NS_PROJECT_TALK"), ] wiki_ns_fi = { "Media": "NS_MEDIA", "Toiminnot": "NS_SPECIAL", "Keskustelu": "NS_TALK", "Käyttäjä": "NS_USER", "Keskustelu_käyttäjästä": "NS_USER_TALK", "Kuva": "NS_IMAGE", "Keskustelu_kuvasta": "NS_IMAGE_TALK", "Järjestelmäviesti": "NS_MEDIAWIKI", "Keskustelu_järjestelmäviestistä": "NS_MEDIAWIKI_TALK", "Malline": "NS_TEMPLATE", "Keskustelu_mallineesta": "NS_TEMPLATE_TALK", "Ohje": "NS_HELP", "Keskustelu_ohjeesta": "NS_HELP_TALK", "Luokka": "NS_CATEGORY", "Keskustelu_luokasta": "NS_CATEGORY_TALK", } wiki_ns_re_fi = [ ("Keskustelu_{{grammar:elative|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_bn = { "বিশেষ": "NS_SPECIAL", "আলাপ": "NS_TALK", "বà§à¦¯à¦¬à¦¹à¦¾à¦°à¦•ারী": "NS_USER", "বà§à¦¯à¦¬à¦¹à¦¾à¦°à¦•ারী_আলাপ": "NS_USER_TALK", "চিতà§à¦°": "NS_IMAGE", "চিতà§à¦°_আলাপ": "NS_IMAGE_TALK", "MediaWiki_আলাপ": "NS_MEDIAWIKI_TALK", } wiki_ns_re_bn = [ ("", "_আলাপ", "NS_PROJECT_TALK"), ] wiki_ns_pnt = { "Μέσον": "NS_MEDIA", "Ειδικόν": "NS_SPECIAL", "Καλάτσεμαν": "NS_TALK", "ΧÏήστες": "NS_USER", "Καλάτσεμαν_χÏήστε": "NS_USER_TALK", "Εικόναν": "NS_IMAGE", "Καλάτσεμαν_εικόνας": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "ΠÏότυπον": "NS_TEMPLATE", "Καλάτσεμαν_Ï€Ïότυπι": "NS_TEMPLATE_TALK", "Βοήθειαν": "NS_HELP", "Καλάτσεμαν_βοήθειας": "NS_HELP_TALK", "ΚατηγοÏίαν": "NS_CATEGORY", "Καλάτσεμαν_κατηγοÏίας": "NS_CATEGORY_TALK", } wiki_ns_re_pnt = [ ("", "_καλάτσεμαν", "NS_PROJECT_TALK"), ] wiki_ns_br = { "Media": "NS_MEDIA", "Dibar": "NS_SPECIAL", "Kaozeal": "NS_TALK", "Implijer": "NS_USER", "Kaozeadenn_Implijer": "NS_USER_TALK", "Skeudenn": "NS_IMAGE", "Kaozeadenn_Skeudenn": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Kaozeadenn_MediaWiki": "NS_MEDIAWIKI_TALK", "Patrom": "NS_TEMPLATE", "Kaozeadenn_Patrom": "NS_TEMPLATE_TALK", "Skoazell": "NS_HELP", "Kaozeadenn_Skoazell": "NS_HELP_TALK", "Rummad": "NS_CATEGORY", "Kaozeadenn_Rummad": "NS_CATEGORY_TALK", } wiki_ns_re_br = [ ("Kaozeadenn_", "", "NS_PROJECT_TALK"), ] wiki_ns_hsb = { "Media": "NS_MEDIA", "Specialnje": "NS_SPECIAL", "Diskusija": "NS_TALK", "Wužiwar": "NS_USER", "Diskusija_z_wužiwarjom": "NS_USER_TALK", "Wobraz": "NS_IMAGE", "Diskusija_k_wobrazej": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_diskusija": "NS_MEDIAWIKI_TALK", "PÅ™edÅ‚oha": "NS_TEMPLATE", "Diskusija_k_pÅ™edÅ‚oze": "NS_TEMPLATE_TALK", "Pomoc": "NS_HELP", "Pomoc_diskusija": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Diskusija_ke_kategoriji": "NS_CATEGORY_TALK", } wiki_ns_re_hsb = [ ("", "_diskusija", "NS_PROJECT_TALK"), ] wiki_ns_no = { "Medium": "NS_MEDIA", "Spesial": "NS_SPECIAL", "Diskusjon": "NS_TALK", "Bruker": "NS_USER", "Brukerdiskusjon": "NS_USER_TALK", "Bilde": "NS_IMAGE", "Bildediskusjon": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki-diskusjon": "NS_MEDIAWIKI_TALK", "Mal": "NS_TEMPLATE", "Maldiskusjon": "NS_TEMPLATE_TALK", "Hjelp": "NS_HELP", "Hjelpdiskusjon": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Kategoridiskusjon": "NS_CATEGORY_TALK", } wiki_ns_re_no = [ ("", "-diskusjon", "NS_PROJECT_TALK"), ] wiki_ns_vi = { "Phương_tiện": "NS_MEDIA", "Äặc_biệt": "NS_SPECIAL", "Thảo_luận": "NS_TALK", "Thành_viên": "NS_USER", "Thảo_luận_Thành_viên": "NS_USER_TALK", "Hình": "NS_IMAGE", "Thảo_luận_Hình": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Thảo_luận_MediaWiki": "NS_MEDIAWIKI_TALK", "Tiêu_bản": "NS_TEMPLATE", "Thảo_luận_Tiêu_bản": "NS_TEMPLATE_TALK", "Trợ_giúp": "NS_HELP", "Thảo_luận_Trợ_giúp": "NS_HELP_TALK", "Thể_loại": "NS_CATEGORY", "Thảo_luận_Thể_loại": "NS_CATEGORY_TALK", } wiki_ns_re_vi = [ ("Thảo_luận_", "", "NS_PROJECT_TALK"), ] wiki_ns_fy = { "Media": "NS_MEDIA", "Wiki": "NS_SPECIAL", "Oerlis": "NS_TALK", "Meidogger": "NS_USER", "Meidogger_oerlis": "NS_USER_TALK", "Ofbyld": "NS_IMAGE", "Ofbyld_oerlis": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_oerlis": "NS_MEDIAWIKI_TALK", "Berjocht": "NS_TEMPLATE", "Berjocht_oerlis": "NS_TEMPLATE_TALK", "Hulp": "NS_HELP", "Hulp_oerlis": "NS_HELP_TALK", "Kategory": "NS_CATEGORY", "Kategory_oerlis": "NS_CATEGORY_TALK", } wiki_ns_re_fy = [ ("", "_oerlis", "NS_PROJECT_TALK"), ] wiki_ns_ca = { "Media": "NS_MEDIA", "Especial": "NS_SPECIAL", "Discussió": "NS_TALK", "Usuari": "NS_USER", "Usuari_Discussió": "NS_USER_TALK", "Imatge": "NS_IMAGE", "Imatge_Discussió": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Discussió": "NS_MEDIAWIKI_TALK", "Plantilla": "NS_TEMPLATE", "Plantilla_Discussió": "NS_TEMPLATE_TALK", "Ajuda": "NS_HELP", "Ajuda_Discussió": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Categoria_Discussió": "NS_CATEGORY_TALK", } wiki_ns_re_ca = [ ("", "_Discussió", "NS_PROJECT_TALK"), ] wiki_ns_ce = { "Медйа": "NS_MEDIA", "Башхо": "NS_SPECIAL", "Дийца": "NS_TALK", "Юзер": "NS_USER", "Юзери_дийца": "NS_USER_TALK", "Сурт": "NS_IMAGE", "Сурти_дийца": "NS_IMAGE_TALK", "МедйаВики": "NS_MEDIAWIKI", "МедйаВики_дийца": "NS_MEDIAWIKI_TALK", "Дакъа": "NS_TEMPLATE", "Дакъан_дийца": "NS_TEMPLATE_TALK", "ГІо": "NS_HELP", "ГІодан_дийца": "NS_HELP_TALK", "Тоба": "NS_CATEGORY", "Тобан_дийца": "NS_CATEGORY_TALK", } wiki_ns_re_ce = [ ("", "_Дийца", "NS_PROJECT_TALK"), ] wiki_ns_gl = { "Media": "NS_MEDIA", "Especial": "NS_SPECIAL", "Conversa": "NS_TALK", "Usuario": "NS_USER", "Conversa_Usuario": "NS_USER_TALK", "Imaxe": "NS_IMAGE", "Conversa_Imaxe": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Conversa_MediaWiki": "NS_MEDIAWIKI_TALK", "Modelo": "NS_TEMPLATE", "Conversa_Modelo": "NS_TEMPLATE_TALK", "Axuda": "NS_HELP", "Conversa_Axuda": "NS_HELP_TALK", "Categoría": "NS_CATEGORY", "Conversa_Categoría": "NS_CATEGORY_TALK", } wiki_ns_re_gl = [ ("Conversa_", "", "NS_PROJECT_TALK"), ] wiki_ns_sa = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "संभाषणं": "NS_TALK", "योजकः": "NS_USER", "योजकसंभाषणं": "NS_USER_TALK", "चितà¥à¤°à¤‚": "NS_IMAGE", "चितà¥à¤°à¤¸à¤‚भाषणं": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Template_talk": "NS_TEMPLATE_TALK", "उपकारः": "NS_HELP", "उपकारसंभाषणं": "NS_HELP_TALK", "वरà¥à¤—ः": "NS_CATEGORY", "वरà¥à¤—संभाषणं": "NS_CATEGORY_TALK", } wiki_ns_re_sa = [ ("", "संभाषणं", "NS_PROJECT_TALK"), ] wiki_ns_tt_latn = { "Media": "NS_MEDIA", "Maxsus": "NS_SPECIAL", "Bäxäs": "NS_TALK", "Äğzä": "NS_USER", "Äğzä_bäxäse": "NS_USER_TALK", "Räsem": "NS_IMAGE", "Räsem_bäxäse": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_bäxäse": "NS_MEDIAWIKI_TALK", "Ürnäk": "NS_TEMPLATE", "Ürnäk_bäxäse": "NS_TEMPLATE_TALK", "Yärdäm": "NS_HELP", "Yärdäm_bäxäse": "NS_HELP_TALK", "Törkem": "NS_CATEGORY", "Törkem_bäxäse": "NS_CATEGORY_TALK", } wiki_ns_re_tt_latn = [ ("", "_bäxäse", "NS_PROJECT_TALK"), ] wiki_ns_cu = { "СрѣÌдьÑтва": "NS_MEDIA", "ÐароÌчьна": "NS_SPECIAL", "БєÑÑ£Ìда": "NS_TALK", "ПоÌльꙃєватєл҄ь": "NS_USER", "ПоÌльꙃєватєлꙗ_бєÑÑ£Ìда": "NS_USER_TALK", "ВиÌдъ": "NS_IMAGE", "ВиÌда_бєÑÑ£Ìда": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_бєÑÑ£Ìда": "NS_MEDIAWIKI_TALK", "Обраê™ÑŒÌць": "NS_TEMPLATE", "Обраê™ÑŒÑ†Ð°Ì_бєÑÑ£Ìда": "NS_TEMPLATE_TALK", "ПоÌмощь": "NS_HELP", "ПоÌмощи_бєÑÑ£Ìда": "NS_HELP_TALK", "КатигоріÌê™—": "NS_CATEGORY", "КатигоріÌÑ©_бєÑÑ£Ìда": "NS_CATEGORY_TALK", } wiki_ns_re_cu = [ ("{{grammar:genitive|", "}}_бєÑÑ£Ìда", "NS_PROJECT_TALK"), ] wiki_ns_ko = { "Media": "NS_MEDIA", "특수기능": "NS_SPECIAL", "토론": "NS_TALK", "사용ìž": "NS_USER", "사용ìží† ë¡ ": "NS_USER_TALK", "그림": "NS_IMAGE", "그림토론": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki토론": "NS_MEDIAWIKI_TALK", "í‹€": "NS_TEMPLATE", "틀토론": "NS_TEMPLATE_TALK", "ë„움ë§": "NS_HELP", "ë„움ë§í† ë¡ ": "NS_HELP_TALK", "분류": "NS_CATEGORY", "분류토론": "NS_CATEGORY_TALK", } wiki_ns_re_ko = [ ("", "토론", "NS_PROJECT_TALK"), ] wiki_ns_cy = { "Media": "NS_MEDIA", "Arbennig": "NS_SPECIAL", "Sgwrs": "NS_TALK", "Defnyddiwr": "NS_USER", "Sgwrs_Defnyddiwr": "NS_USER_TALK", "Delwedd": "NS_IMAGE", "Sgwrs_Delwedd": "NS_IMAGE_TALK", "MediaWici": "NS_MEDIAWIKI", "Sgwrs_MediaWici": "NS_MEDIAWIKI_TALK", "Nodyn": "NS_TEMPLATE", "Sgwrs_Nodyn": "NS_TEMPLATE_TALK", "Categori": "NS_CATEGORY", "Sgwrs_Categori": "NS_CATEGORY_TALK", "Cymorth": "NS_HELP", "Sgwrs Cymorth": "NS_HELP_TALK", } wiki_ns_re_cy = [ ("Sgwrs_", "", "NS_PROJECT_TALK"), ] wiki_ns_si = { "මà·à¶°à·Šâ€à¶ºà¶º": "NS_MEDIA", "විà·à·šà·‚": "NS_SPECIAL", "à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_TALK", "පරිà·à·“ලක": "NS_USER", "පරිà·à·“ලක_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_USER_TALK", "රූපය": "NS_IMAGE", "රූපය_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_IMAGE_TALK", "විකිමà·à¶°à·Šâ€à¶º": "NS_MEDIAWIKI", "විකිමà·à¶°à·Šâ€à¶º_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_MEDIAWIKI_TALK", "à·ƒà·à¶šà·’ල්ල": "NS_TEMPLATE", "à·ƒà·à¶šà·’à¶½_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_TEMPLATE_TALK", "උදවු": "NS_HELP", "උදව_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_HELP_TALK", "à¶´à·Šâ€à¶»à·€à¶»à·Šà¶œà¶º": "NS_CATEGORY", "à¶´à·Šâ€à¶»à·€à¶»à·Šà¶œ_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€": "NS_CATEGORY_TALK", } wiki_ns_re_si = [ ("", "_à·ƒà·à¶šà¶ à·Šà¶¡à·à·€", "NS_PROJECT_TALK"), ] wiki_ns_sq = { "Media": "NS_MEDIA", "Speciale": "NS_SPECIAL", "Diskutim": "NS_TALK", "Përdoruesi": "NS_USER", "Përdoruesi_diskutim": "NS_USER_TALK", "Figura": "NS_IMAGE", "Figura_diskutim": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_diskutim": "NS_MEDIAWIKI_TALK", "Stampa": "NS_TEMPLATE", "Stampa_diskutim": "NS_TEMPLATE_TALK", "Ndihmë": "NS_HELP", "Ndihmë_diskutim": "NS_HELP_TALK", } wiki_ns_re_sq = [ ("", "_diskutim", "NS_PROJECT_TALK"), ] wiki_ns_su = { "Média": "NS_MEDIA", "Husus": "NS_SPECIAL", "Obrolan": "NS_TALK", "Pamaké": "NS_USER", "Obrolan_pamaké": "NS_USER_TALK", "Gambar": "NS_IMAGE", "Obrolan_gambar": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Obrolan_MediaWiki": "NS_MEDIAWIKI_TALK", "Citakan": "NS_TEMPLATE", "Obrolan_citakan": "NS_TEMPLATE_TALK", "Pitulung": "NS_HELP", "Obrolan_pitulung": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Obrolan_kategori": "NS_CATEGORY_TALK", } wiki_ns_re_su = [ ("Obrolan_", "", "NS_PROJECT_TALK"), ] wiki_ns_arz = { "ميديا": "NS_MEDIA", "خاص": "NS_SPECIAL", "نقاش": "NS_TALK", "مستخدم": "NS_USER", "نقاش_المستخدم": "NS_USER_TALK", "صورة": "NS_IMAGE", "نقاش_الصورة": "NS_IMAGE_TALK", "ميدياويكى": "NS_MEDIAWIKI", "نقاش_ميدياويكى": "NS_MEDIAWIKI_TALK", "قالب": "NS_TEMPLATE", "نقاش_القالب": "NS_TEMPLATE_TALK", "مساعدة": "NS_HELP", "نقاش_المساعدة": "NS_HELP_TALK", "تصنيÙ": "NS_CATEGORY", "نقاش_التصنيÙ": "NS_CATEGORY_TALK", } wiki_ns_re_arz = [ ("نقاش_", "", "NS_PROJECT_TALK"), ] wiki_ns_lb = { "Media": "NS_MEDIA", "Spezial": "NS_SPECIAL", "Diskussioun": "NS_TALK", "Benotzer": "NS_USER", "Benotzer_Diskussioun": "NS_USER_TALK", "Bild": "NS_IMAGE", "Bild_Diskussioun": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Diskussioun": "NS_MEDIAWIKI_TALK", "Schabloun": "NS_TEMPLATE", "Schabloun_Diskussioun": "NS_TEMPLATE_TALK", "Hëllef": "NS_HELP", "Hëllef_Diskussioun": "NS_HELP_TALK", "Kategorie": "NS_CATEGORY", "Kategorie_Diskussioun": "NS_CATEGORY_TALK", } wiki_ns_re_lb = [ ("", "_Diskussioun", "NS_PROJECT_TALK"), ] wiki_ns_pa = { "ਮੀਡੀਆ": "NS_MEDIA", "ਖਾਸ": "NS_SPECIAL", "ਚਰਚਾ": "NS_TALK", "ਮੈਂਬਰ": "NS_USER", "ਮੈਂਬਰ_ਚਰਚਾ": "NS_USER_TALK", "ਤਸਵੀਰ": "NS_IMAGE", "ਤਸਵੀਰ_ਚਰਚਾ": "NS_IMAGE_TALK", "ਮੀਡੀਆਵਿਕਿ": "NS_MEDIAWIKI", "ਮੀਡੀਆਵਿਕਿ_ਚਰਚਾ": "NS_MEDIAWIKI_TALK", "ਨਮੂਨਾ": "NS_TEMPLATE", "ਨਮੂਨਾ_ਚਰਚਾ": "NS_TEMPLATE_TALK", "ਮਦਦ": "NS_HELP", "ਮਦਦ_ਚਰਚਾ": "NS_HELP_TALK", "ਸ਼à©à¨°à©‡à¨£à©€": "NS_CATEGORY", "ਸ਼à©à¨°à©‡à¨£à©€_ਚਰਚਾ": "NS_CATEGORY_TALK", } wiki_ns_re_pa = [ ("", "_ਚਰਚਾ", "NS_PROJECT_TALK"), ] wiki_ns_csb = { "Media": "NS_MEDIA", "Specjalnô": "NS_SPECIAL", "Diskùsëjô": "NS_TALK", "Brëkòwnik": "NS_USER", "Diskùsëjô_brëkòwnika": "NS_USER_TALK", "Ã’brôzk": "NS_IMAGE", "Diskùsëjô_òbrôzków": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Diskùsëjô_MediaWiki": "NS_MEDIAWIKI_TALK", "Szablóna": "NS_TEMPLATE", "Diskùsëjô_Szablónë": "NS_TEMPLATE_TALK", "Pòmòc": "NS_HELP", "Diskùsëjô_Pòmòcë": "NS_HELP_TALK", "Kategòrëjô": "NS_CATEGORY", "Diskùsëjô_Kategòrëji": "NS_CATEGORY_TALK", } wiki_ns_re_csb = [ ("Diskùsëjô_", "", "NS_PROJECT_TALK"), ] wiki_ns_th = { "สื่อ": "NS_MEDIA", "พิเศษ": "NS_SPECIAL", "พูดคุย": "NS_TALK", "ผู้ใช้": "NS_USER", "คุยà¸à¸±à¸šà¸œà¸¹à¹‰à¹ƒà¸Šà¹‰": "NS_USER_TALK", "ภาพ": "NS_IMAGE", "คุยเรื่องภาพ": "NS_IMAGE_TALK", "มีเดียวิà¸à¸´": "NS_MEDIAWIKI", "คุยเรื่องมีเดียวิà¸à¸´": "NS_MEDIAWIKI_TALK", "à¹à¸¡à¹ˆà¹à¸šà¸š": "NS_TEMPLATE", "คุยเรื่องà¹à¸¡à¹ˆà¹à¸šà¸š": "NS_TEMPLATE_TALK", "วิธีใช้": "NS_HELP", "คุยเรื่องวิธีใช้": "NS_HELP_TALK", "หมวดหมู่": "NS_CATEGORY", "คุยเรื่องหมวดหมู่": "NS_CATEGORY_TALK", } wiki_ns_re_th = [ ("คุยเรื่อง", "", "NS_PROJECT_TALK"), ] wiki_ns_vec = { "Media": "NS_MEDIA", "Speciale": "NS_SPECIAL", "Discussion": "NS_TALK", "Utente": "NS_USER", "Discussion_utente": "NS_USER_TALK", "Imagine": "NS_IMAGE", "Discussion_imagine": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Discussion_template": "NS_TEMPLATE_TALK", "Aiuto": "NS_HELP", "Discussion_aiuto": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Discussion_categoria": "NS_CATEGORY_TALK", } wiki_ns_re_vec = [ ("Discussion_", "", "NS_PROJECT_TALK"), ] wiki_ns_zea = { "Media": "NS_MEDIA", "Speciaol": "NS_SPECIAL", "Overleg": "NS_TALK", "Gebruker": "NS_USER", "Overleg_gebruker": "NS_USER_TALK", "Plaetje": "NS_IMAGE", "Overleg_plaetje": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Overleg_MediaWiki": "NS_MEDIAWIKI_TALK", "Sjabloon": "NS_TEMPLATE", "Overleg_sjabloon": "NS_TEMPLATE_TALK", "Ulpe": "NS_HELP", "Overleg_ulpe": "NS_HELP_TALK", "Categorie": "NS_CATEGORY", "Overleg_categorie": "NS_CATEGORY_TALK", } wiki_ns_re_zea = [ ("Overleg_", "", "NS_PROJECT_TALK"), ] wiki_ns_lv = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Diskusija": "NS_TALK", "LietotÄjs": "NS_USER", "LietotÄja_diskusija": "NS_USER_TALK", "AttÄ“ls": "NS_IMAGE", "AttÄ“la_diskusija": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_diskusija": "NS_MEDIAWIKI_TALK", "Veidne": "NS_TEMPLATE", "Veidnes_diskusija": "NS_TEMPLATE_TALK", "PalÄ«dzÄ«ba": "NS_HELP", "PalÄ«dzÄ«bas_diskusija": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Kategorijas_diskusija": "NS_CATEGORY_TALK", } wiki_ns_re_lv = [ ("{{grammar:Ä£enitÄ«vs|", "}}_diskusija", "NS_PROJECT_TALK"), ] wiki_ns_scn = { "Mèdia": "NS_MEDIA", "Spiciali": "NS_SPECIAL", "Discussioni": "NS_TALK", "Utenti": "NS_USER", "Discussioni_utenti": "NS_USER_TALK", "Mmàggini": "NS_IMAGE", "Discussioni_mmàggini": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussioni_MediaWiki": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Discussioni_template": "NS_TEMPLATE_TALK", "Aiutu": "NS_HELP", "Discussioni_aiutu": "NS_HELP_TALK", "Catigurìa": "NS_CATEGORY", "Discussioni_catigurìa": "NS_CATEGORY_TALK", } wiki_ns_re_scn = [ ("Discussioni_", "", "NS_PROJECT_TALK"), ] wiki_ns_new = { "माधà¥à¤¯à¤®": "NS_MEDIA", "विशेष": "NS_SPECIAL", "खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾": "NS_TALK", "छà¥à¤¯à¥‡à¤²à¥‡à¤®à¤¿": "NS_USER", "छà¥à¤¯à¥‡à¤²à¥‡à¤®à¤¿_खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾": "NS_USER_TALK", "किपा": "NS_IMAGE", "किपा_खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾": "NS_IMAGE_TALK", "मिडियाविकि": "NS_MEDIAWIKI", "मिडियाविकि_खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾": "NS_MEDIAWIKI_TALK", "गà¥à¤µà¤¾à¤¹à¤¾à¤²à¤¿": "NS_HELP", "गà¥à¤µà¤¾à¤¹à¤¾à¤²à¤¿_खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾": "NS_HELP_TALK", "पà¥à¤šà¤ƒ": "NS_CATEGORY", "पà¥à¤šà¤ƒ_खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾": "NS_CATEGORY_TALK", } wiki_ns_re_new = [ ("", "_खà¤à¤²à¤¾à¤¬à¤à¤²à¤¾", "NS_PROJECT_TALK"), ] wiki_ns_zh_tw = { "媒體": "NS_MEDIA", "特殊": "NS_SPECIAL", "討論": "NS_TALK", "使用者": "NS_USER", "使用者討論": "NS_USER_TALK", "圖片": "NS_IMAGE", "圖片討論": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "模æ¿": "NS_TEMPLATE", "模æ¿è¨Žè«–": "NS_TEMPLATE_TALK", "使用說明": "NS_HELP", "使用說明討論": "NS_HELP_TALK", "分類": "NS_CATEGORY", "分類討論": "NS_CATEGORY_TALK", } wiki_ns_re_zh_tw = [ ("", "å°è©±", "NS_PROJECT_TALK"), ] wiki_ns_eo = { "Media": "NS_MEDIA", "Speciala": "NS_SPECIAL", "Diskuto": "NS_TALK", "Vikipediisto": "NS_USER", "Vikipediista_diskuto": "NS_USER_TALK", "Dosiero": "NS_IMAGE", "Dosiera_diskuto": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_diskuto": "NS_MEDIAWIKI_TALK", "Åœablono": "NS_TEMPLATE", "Åœablona_diskuto": "NS_TEMPLATE_TALK", "Helpo": "NS_HELP", "Helpa_diskuto": "NS_HELP_TALK", "Kategorio": "NS_CATEGORY", "Kategoria_diskuto": "NS_CATEGORY_TALK", } wiki_ns_re_eo = [ ("", "_diskuto", "NS_PROJECT_TALK"), ] wiki_ns_es = { "Media": "NS_MEDIA", "Especial": "NS_SPECIAL", "Discusión": "NS_TALK", "Usuario": "NS_USER", "Usuario_Discusión": "NS_USER_TALK", "Imagen": "NS_IMAGE", "Imagen_Discusión": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Discusión": "NS_MEDIAWIKI_TALK", "Plantilla": "NS_TEMPLATE", "Plantilla_Discusión": "NS_TEMPLATE_TALK", "Ayuda": "NS_HELP", "Ayuda_Discusión": "NS_HELP_TALK", "Categoría": "NS_CATEGORY", "Categoría_Discusión": "NS_CATEGORY_TALK", } wiki_ns_re_es = [ ("", "_Discusión", "NS_PROJECT_TALK"), ] wiki_ns_uk = { "Медіа": "NS_MEDIA", "Спеціальна": "NS_SPECIAL", "ОбговореннÑ": "NS_TALK", "КориÑтувач": "NS_USER", "ОбговореннÑ_кориÑтувача": "NS_USER_TALK", "ЗображеннÑ": "NS_IMAGE", "ОбговореннÑ_зображеннÑ": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "ОбговореннÑ_MediaWiki": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "ОбговореннÑ_шаблону": "NS_TEMPLATE_TALK", "Довідка": "NS_HELP", "ОбговореннÑ_довідки": "NS_HELP_TALK", "КатегоріÑ": "NS_CATEGORY", "ОбговореннÑ_категорії": "NS_CATEGORY_TALK", } wiki_ns_re_uk = [ ("ОбговореннÑ_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_bg = { "МедиÑ": "NS_MEDIA", "Специални": "NS_SPECIAL", "БеÑеда": "NS_TALK", "Потребител": "NS_USER", "Потребител_беÑеда": "NS_USER_TALK", "Картинка": "NS_IMAGE", "Картинка_беÑеда": "NS_IMAGE_TALK", "МедиÑУики": "NS_MEDIAWIKI", "МедиÑУики_беÑеда": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Шаблон_беÑеда": "NS_TEMPLATE_TALK", "Помощ": "NS_HELP", "Помощ_беÑеда": "NS_HELP_TALK", "КатегориÑ": "NS_CATEGORY", "КатегориÑ_беÑеда": "NS_CATEGORY_TALK", } wiki_ns_re_bg = [ ("", "_беÑеда", "NS_PROJECT_TALK"), ] wiki_ns_ja = { "Media": "NS_MEDIA", "特別": "NS_SPECIAL", "ノート": "NS_TALK", "利用者": "NS_USER", "利用者â€ä¼šè©±": "NS_USER_TALK", "ç”»åƒ": "NS_IMAGE", "ç”»åƒâ€ãƒŽãƒ¼ãƒˆ": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWikiâ€ãƒŽãƒ¼ãƒˆ": "NS_MEDIAWIKI_TALK", "Template": "NS_TEMPLATE", "Templateâ€ãƒŽãƒ¼ãƒˆ": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Helpâ€ãƒŽãƒ¼ãƒˆ": "NS_HELP_TALK", "Category": "NS_CATEGORY", "Categoryâ€ãƒŽãƒ¼ãƒˆ": "NS_CATEGORY_TALK", } wiki_ns_re_ja = [ ("", "â€ãƒŽãƒ¼ãƒˆ", "NS_PROJECT_TALK"), ] wiki_ns_kaa = { "Media": "NS_MEDIA", "Arnawlı": "NS_SPECIAL", "Sa'wbet": "NS_TALK", "Paydalanıwshı": "NS_USER", "Paydalanıwshı_sa'wbeti": "NS_USER_TALK", "Su'wret": "NS_IMAGE", "Su'wret_sa'wbeti": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_sa'wbeti": "NS_MEDIAWIKI_TALK", "Shablon": "NS_TEMPLATE", "Shablon_sa'wbeti": "NS_TEMPLATE_TALK", "Anıqlama": "NS_HELP", "Anıqlama_sa'wbeti": "NS_HELP_TALK", "Kategoriya": "NS_CATEGORY", "Kategoriya_sa'wbeti": "NS_CATEGORY_TALK", } wiki_ns_re_kaa = [ ("", "_sa'wbeti", "NS_PROJECT_TALK"), ] wiki_ns_bcl = { "Medio": "NS_MEDIA", "Espesyal": "NS_SPECIAL", "Olay": "NS_TALK", "Paragamit": "NS_USER", "Olay_kan_paragamit": "NS_USER_TALK", "Ladawan": "NS_IMAGE", "Olay_sa_ladawan": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Olay_sa_MediaWiki": "NS_MEDIAWIKI_TALK", "Plantilya": "NS_TEMPLATE", "Olay_sa_plantilya": "NS_TEMPLATE_TALK", "Tabang": "NS_HELP", "Olay_sa_tabang": "NS_HELP_TALK", "Kategorya": "NS_CATEGORY", "Olay_sa_kategorya": "NS_CATEGORY_TALK", } wiki_ns_re_bcl = [ ("Olay_sa_", "", "NS_PROJECT_TALK"), ] wiki_ns_bs = { "Medija": "NS_MEDIA", "Posebno": "NS_SPECIAL", "Razgovor": "NS_TALK", "Korisnik": "NS_USER", "Razgovor_sa_korisnikom": "NS_USER_TALK", "Slika": "NS_IMAGE", "Razgovor_o_slici": "NS_IMAGE_TALK", "MedijaViki": "NS_MEDIAWIKI", "Razgovor_o_MedijaVikiju": "NS_MEDIAWIKI_TALK", "Å ablon": "NS_TEMPLATE", "Razgovor_o_Å¡ablonu": "NS_TEMPLATE_TALK", "Pomoć": "NS_HELP", "Razgovor_o_pomoći": "NS_HELP_TALK", "Kategorija": "NS_CATEGORY", "Razgovor_o_kategoriji": "NS_CATEGORY_TALK", } wiki_ns_re_bs = [ ("Razgovor_{{grammar:instrumental|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_stq = { "Media": "NS_MEDIA", "Spezial": "NS_SPECIAL", "Diskussion": "NS_TALK", "Benutser": "NS_USER", "Benutser_Diskussion": "NS_USER_TALK", "Bielde": "NS_IMAGE", "Bielde_Diskussion": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Diskussion": "NS_MEDIAWIKI_TALK", "Foarloage": "NS_TEMPLATE", "Foarloage_Diskussion": "NS_TEMPLATE_TALK", "Hälpe": "NS_HELP", "Hälpe_Diskussion": "NS_HELP_TALK", "Kategorie": "NS_CATEGORY", "Kategorie_Diskussion": "NS_CATEGORY_TALK", } wiki_ns_re_stq = [ ("", "_Diskussion", "NS_PROJECT_TALK"), ] wiki_ns_fr = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Discuter": "NS_TALK", "Utilisateur": "NS_USER", "Discussion_Utilisateur": "NS_USER_TALK", "Image": "NS_IMAGE", "Discussion_Image": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK", "Modèle": "NS_TEMPLATE", "Discussion_Modèle": "NS_TEMPLATE_TALK", "Aide": "NS_HELP", "Discussion_Aide": "NS_HELP_TALK", "Catégorie": "NS_CATEGORY", "Discussion_Catégorie": "NS_CATEGORY_TALK", } wiki_ns_re_fr = [ ("", "", "NS_PROJECT"), ("Discussion_", "", "NS_PROJECT_TALK"), ] wiki_ns_nl = { "Media": "NS_MEDIA", "Speciaal": "NS_SPECIAL", "Overleg": "NS_TALK", "Gebruiker": "NS_USER", "Overleg_gebruiker": "NS_USER_TALK", "Afbeelding": "NS_IMAGE", "Overleg_afbeelding": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Overleg_MediaWiki": "NS_MEDIAWIKI_TALK", "Sjabloon": "NS_TEMPLATE", "Overleg_sjabloon": "NS_TEMPLATE_TALK", "Help": "NS_HELP", "Overleg_help": "NS_HELP_TALK", "Categorie": "NS_CATEGORY", "Overleg_categorie": "NS_CATEGORY_TALK", } wiki_ns_re_nl = [ ("Overleg_", "", "NS_PROJECT_TALK"), ] wiki_ns_ro = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "DiscuÅ£ie": "NS_TALK", "Utilizator": "NS_USER", "DiscuÅ£ie_Utilizator": "NS_USER_TALK", "Imagine": "NS_IMAGE", "DiscuÅ£ie_Imagine": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "DiscuÅ£ie_MediaWiki": "NS_MEDIAWIKI_TALK", "Format": "NS_TEMPLATE", "DiscuÅ£ie_Format": "NS_TEMPLATE_TALK", "Ajutor": "NS_HELP", "DiscuÅ£ie_Ajutor": "NS_HELP_TALK", "Categorie": "NS_CATEGORY", "DiscuÅ£ie_Categorie": "NS_CATEGORY_TALK", } wiki_ns_re_ro = [ ("DiscuÅ£ie_", "", "NS_PROJECT_TALK"), ] wiki_ns_ga = { "Meán": "NS_MEDIA", "Speisialta": "NS_SPECIAL", "Plé": "NS_TALK", "Úsáideoir": "NS_USER", "Plé_úsáideora": "NS_USER_TALK", "Ãomhá": "NS_IMAGE", "Plé_íomhá": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Plé_MediaWiki": "NS_MEDIAWIKI_TALK", "Teimpléad": "NS_TEMPLATE", "Plé_teimpléid": "NS_TEMPLATE_TALK", "Cabhair": "NS_HELP", "Plé_cabhrach": "NS_HELP_TALK", "Catagóir": "NS_CATEGORY", "Plé_catagóire": "NS_CATEGORY_TALK", } wiki_ns_re_ga = [ ("Plé_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"), ] wiki_ns_sr_ec = { "Медија": "NS_MEDIA", "ПоÑебно": "NS_SPECIAL", "Разговор": "NS_TALK", "КориÑник": "NS_USER", "Разговор_Ñа_кориÑником": "NS_USER_TALK", "Слика": "NS_IMAGE", "Разговор_о_Ñлици": "NS_IMAGE_TALK", "МедијаВики": "NS_MEDIAWIKI", "Разговор_о_МедијаВикију": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Разговор_о_шаблону": "NS_TEMPLATE_TALK", "Помоћ": "NS_HELP", "Разговор_о_помоћи": "NS_HELP_TALK", "Категорија": "NS_CATEGORY", "Разговор_о_категорији": "NS_CATEGORY_TALK", } wiki_ns_re_sr_ec = [ ("Разговор_о_", "", "NS_PROJECT_TALK"), ] wiki_ns_kk_cyrl = { "ТаÑпа": "NS_MEDIA", "Ðрнайы": "NS_SPECIAL", "Талқылау": "NS_TALK", "ҚатыÑушы": "NS_USER", "ҚатыÑушы_талқылауы": "NS_USER_TALK", "Сурет": "NS_IMAGE", "Сурет_талқылауы": "NS_IMAGE_TALK", "МедиаУики": "NS_MEDIAWIKI", "МедиаУики_талқылауы": "NS_MEDIAWIKI_TALK", "Үлгі": "NS_TEMPLATE", "Үлгі_талқылауы": "NS_TEMPLATE_TALK", "Ðнықтама": "NS_HELP", "Ðнықтама_талқылауы": "NS_HELP_TALK", "Санат": "NS_CATEGORY", "Санат_талқылауы": "NS_CATEGORY_TALK", } wiki_ns_re_kk_cyrl = [ ("", "_талқылауы", "NS_PROJECT_TALK"), ] wiki_ns_oc = { "Mèdia": "NS_MEDIA", "Especial": "NS_SPECIAL", "Discutir": "NS_TALK", "Utilizaire": "NS_USER", "Discussion_Utilizaire": "NS_USER_TALK", "Imatge": "NS_IMAGE", "Discussion_Imatge": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK", "Modèl": "NS_TEMPLATE", "Discussion_Modèl": "NS_TEMPLATE_TALK", "Ajuda": "NS_HELP", "Discussion_Ajuda": "NS_HELP_TALK", "Categoria": "NS_CATEGORY", "Discussion_Categoria": "NS_CATEGORY_TALK", } wiki_ns_re_oc = [ ("Discussion_", "", "NS_PROJECT_TALK"), ] wiki_ns_wa = { "Media": "NS_MEDIA", "SipeciÃ¥s": "NS_SPECIAL", "Copene": "NS_TALK", "Uzeu": "NS_USER", "Uzeu_copene": "NS_USER_TALK", "ImÃ¥dje": "NS_IMAGE", "ImÃ¥dje_copene": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_copene": "NS_MEDIAWIKI_TALK", "Modele": "NS_TEMPLATE", "Modele_copene": "NS_TEMPLATE_TALK", "Aidance": "NS_HELP", "Aidance_copene": "NS_HELP_TALK", "Categoreye": "NS_CATEGORY", "Categoreye_copene": "NS_CATEGORY_TALK", } wiki_ns_re_wa = [ ("", "_copene", "NS_PROJECT_TALK"), ] wiki_ns_cv = { "Медиа": "NS_MEDIA", "Ятарлă": "NS_SPECIAL", "СӳтÑе ÑваÑÑи": "NS_TALK", "Хутшăнакан": "NS_USER", "Хутшăнаканăн_канашлу_Ñтраници": "NS_USER_TALK", "Ӳкерчĕк": "NS_IMAGE", "Ӳкерчĕке_ÑӳтÑе_Ñвмалли": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_ÑӳтÑе_Ñвмалли": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Шаблона_ÑӳтÑе_Ñвмалли": "NS_TEMPLATE_TALK", "Пулăшу": "NS_HELP", "Пулăшăва_ÑӳтÑе_Ñвмалли": "NS_HELP_TALK", "Категори": "NS_CATEGORY", "Категорине_ÑӳтÑе_Ñвмалли": "NS_CATEGORY_TALK", } wiki_ns_re_cv = [ ("", "_ÑӳтÑе_Ñвмалли", "NS_PROJECT_TALK"), ] wiki_ns_os = { "Media": "NS_MEDIA", "Сæрмагонд": "NS_SPECIAL", "ДиÑкуÑÑи": "NS_TALK", "Ðрхайæг": "NS_USER", "Ðрхайæджы_диÑкуÑÑи": "NS_USER_TALK", "Ðыв": "NS_IMAGE", "Ðывы_тыххæй_диÑкуÑÑи": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "ДиÑкуÑÑи_MediaWiki": "NS_MEDIAWIKI_TALK", "Шаблон": "NS_TEMPLATE", "Шаблоны_тыххæй_диÑкуÑÑи": "NS_TEMPLATE_TALK", "ÆххуыÑ": "NS_HELP", "ÆххуыÑÑ‹_тыххæй_диÑкуÑÑи": "NS_HELP_TALK", "Категори": "NS_CATEGORY", "Категорийы_тыххæй_диÑкуÑÑи": "NS_CATEGORY_TALK", } wiki_ns_re_os = [ ("ДиÑкуÑÑи_", "", "NS_PROJECT_TALK"), ] wiki_ns_kk_latn = { "Taspa": "NS_MEDIA", "Arnaýı": "NS_SPECIAL", "Talqılaw": "NS_TALK", "Qatıswşı": "NS_USER", "Qatıswşı_talqılawı": "NS_USER_TALK", "Swret": "NS_IMAGE", "Swret_talqılawı": "NS_IMAGE_TALK", "MedïaWïkï": "NS_MEDIAWIKI", "MedïaWïkï_talqılawı": "NS_MEDIAWIKI_TALK", "Ülgi": "NS_TEMPLATE", "Ülgi_talqılawı": "NS_TEMPLATE_TALK", "Anıqtama": "NS_HELP", "Anıqtama_talqılawı": "NS_HELP_TALK", "Sanat": "NS_CATEGORY", "Sanat_talqılawı": "NS_CATEGORY_TALK", } wiki_ns_re_kk_latn = [ ("", "_talqılawı", "NS_PROJECT_TALK"), ] wiki_ns_da = { "Media": "NS_MEDIA", "Speciel": "NS_SPECIAL", "Diskussion": "NS_TALK", "Bruger": "NS_USER", "Brugerdiskussion": "NS_USER_TALK", "Billede": "NS_IMAGE", "Billeddiskussion": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki-diskussion": "NS_MEDIAWIKI_TALK", "Skabelon": "NS_TEMPLATE", "Skabelondiskussion": "NS_TEMPLATE_TALK", "Hjælp": "NS_HELP", "Hjælp-diskussion": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Kategoridiskussion": "NS_CATEGORY_TALK", } wiki_ns_re_da = [ ("", "-diskussion", "NS_PROJECT_TALK"), ] wiki_ns_sv = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Diskussion": "NS_TALK", "Användare": "NS_USER", "Användardiskussion": "NS_USER_TALK", "Bild": "NS_IMAGE", "Bilddiskussion": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki-diskussion": "NS_MEDIAWIKI_TALK", "Mall": "NS_TEMPLATE", "Malldiskussion": "NS_TEMPLATE_TALK", "Hjälp": "NS_HELP", "Hjälpdiskussion": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Kategoridiskussion": "NS_CATEGORY_TALK", } wiki_ns_re_sv = [ ("", "diskussion", "NS_PROJECT_TALK"), ] wiki_ns_de = { "Media": "NS_MEDIA", "Spezial": "NS_SPECIAL", "Diskussion": "NS_TALK", "Benutzer": "NS_USER", "Benutzer_Diskussion": "NS_USER_TALK", "Bild": "NS_IMAGE", "Bild_Diskussion": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_Diskussion": "NS_MEDIAWIKI_TALK", "Vorlage": "NS_TEMPLATE", "Vorlage_Diskussion": "NS_TEMPLATE_TALK", "Hilfe": "NS_HELP", "Hilfe_Diskussion": "NS_HELP_TALK", "Kategorie": "NS_CATEGORY", "Kategorie_Diskussion": "NS_CATEGORY_TALK", } wiki_ns_re_de = [ ("", "_Diskussion", "NS_PROJECT_TALK"), ] wiki_ns_ta = { "ஊடகமà¯": "NS_MEDIA", "சிறபà¯à®ªà¯": "NS_SPECIAL", "பேசà¯à®šà¯": "NS_TALK", "பயனரà¯": "NS_USER", "பயனரà¯_பேசà¯à®šà¯": "NS_USER_TALK", "படிமமà¯": "NS_IMAGE", "படிமபà¯_பேசà¯à®šà¯": "NS_IMAGE_TALK", "மீடியாவிகà¯à®•ி": "NS_MEDIAWIKI", "மீடியாவிகà¯à®•ி_பேசà¯à®šà¯": "NS_MEDIAWIKI_TALK", "வாரà¯à®ªà¯à®ªà¯à®°à¯": "NS_TEMPLATE", "வாரà¯à®ªà¯à®ªà¯à®°à¯_பேசà¯à®šà¯": "NS_TEMPLATE_TALK", "உதவி": "NS_HELP", "உதவி_பேசà¯à®šà¯": "NS_HELP_TALK", "பகà¯à®ªà¯à®ªà¯": "NS_CATEGORY", "பகà¯à®ªà¯à®ªà¯_பேசà¯à®šà¯": "NS_CATEGORY_TALK", } wiki_ns_re_ta = [ ("", "_பேசà¯à®šà¯", "NS_PROJECT_TALK"), ] wiki_ns_vls = { "Media": "NS_MEDIA", "Specioal": "NS_SPECIAL", "Discuusje": "NS_TALK", "Gebruker": "NS_USER", "Discuusje_gebruker": "NS_USER_TALK", "Ofbeeldienge": "NS_IMAGE", "Discuusje_ofbeeldienge": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discuusje_MediaWiki": "NS_MEDIAWIKI_TALK", "Patrôon": "NS_TEMPLATE", "Discuusje_patrôon": "NS_TEMPLATE_TALK", "Ulpe": "NS_HELP", "Discuusje_ulpe": "NS_HELP_TALK", "Categorie": "NS_CATEGORY", "Discuusje_categorie": "NS_CATEGORY_TALK", } wiki_ns_re_vls = [ ("Discuusje_", "", "NS_PROJECT_TALK"), ] wiki_ns_te = { "మీడియా": "NS_MEDIA", "à°ªà±à°°à°¤à±à°¯à±‡à°•": "NS_SPECIAL", "à°šà°°à±à°š": "NS_TALK", "సభà±à°¯à±à°²à±": "NS_USER", "సభà±à°¯à±à°²à°ªà±ˆ_à°šà°°à±à°š": "NS_USER_TALK", "బొమà±à°®": "NS_IMAGE", "బొమà±à°®à°ªà±ˆ_à°šà°°à±à°š": "NS_IMAGE_TALK", "మీడియావికీ": "NS_MEDIAWIKI", "మీడియావికీ_à°šà°°à±à°š": "NS_MEDIAWIKI_TALK", "మూస": "NS_TEMPLATE", "మూస_à°šà°°à±à°š": "NS_TEMPLATE_TALK", "సహాయమà±": "NS_HELP", "సహాయమà±_à°šà°°à±à°š": "NS_HELP_TALK", "వరà±à°—à°‚": "NS_CATEGORY", "వరà±à°—à°‚_à°šà°°à±à°š": "NS_CATEGORY_TALK", } wiki_ns_re_te = [ ("", "_à°šà°°à±à°š", "NS_PROJECT_TALK"), ] wiki_ns_lo = { "ສື່ອ": "NS_MEDIA", "ພິເສດ": "NS_SPECIAL", "ສົນທະນາ": "NS_TALK", "ຜູ້ໃຊ້": "NS_USER", "ສົນທະນາຂອງຜູ້ໃຊ້": "NS_USER_TALK", "ຮູບ": "NS_IMAGE", "ສົນທະນາàºà»ˆàº½àº§àºàº±àºšàº®àº¹àºš": "NS_IMAGE_TALK", "ມີເດàºàº§àº´àºàº´": "NS_MEDIAWIKI", "ສົນທະນາàºà»ˆàº½àº§àºàº±àºšàº¡àºµà»€àº”àºàº§àº´àºàº´": "NS_MEDIAWIKI_TALK", "à»àº¡à»ˆà»àºšàºš": "NS_TEMPLATE", "ສົນທະນາàºà»ˆàº½àº§àºàº±àºšà»àº¡à»ˆà»àºšàºš": "NS_TEMPLATE_TALK", "ຊ່ວàºà»€àº«àº¼àº·àº­": "NS_HELP", "ສົນທະນາàºà»ˆàº½àº§àºàº±àºšàºŠà»ˆàº§àºà»€àº«àº¼àº·àº­": "NS_HELP_TALK", "à»àº§àº”": "NS_CATEGORY", "ສົນທະນາàºà»ˆàº½àº§àºàº±àºšà»àº§àº”": "NS_CATEGORY_TALK", } wiki_ns_re_lo = [ ("ສົນທະນາàºà»ˆàº½àº§àºàº±àºš", "", "NS_PROJECT_TALK"), ] wiki_ns_ht = { "Medya": "NS_MEDIA", "Espesyal": "NS_SPECIAL", "Diskite": "NS_TALK", "Itilizatè": "NS_USER", "Diskisyon_Itilizatè": "NS_USER_TALK", "Imaj": "NS_IMAGE", "Diskisyon_Imaj": "NS_IMAGE_TALK", "MedyaWiki": "NS_MEDIAWIKI", "Diskisyon_MedyaWiki": "NS_MEDIAWIKI_TALK", "Modèl": "NS_TEMPLATE", "Diskisyon_Modèl": "NS_TEMPLATE_TALK", "Èd": "NS_HELP", "Diskisyon_Èd": "NS_HELP_TALK", "Kategori": "NS_CATEGORY", "Diskisyon_Kategori": "NS_CATEGORY_TALK", } wiki_ns_re_ht = [ ("Diskisyon_", "", "NS_PROJECT_TALK"), ] wiki_ns_am = { "á‹á‹­áˆ": "NS_MEDIA", "áˆá‹©": "NS_SPECIAL", "á‹á‹­á‹­á‰µ": "NS_TALK", "አባáˆ": "NS_USER", "አባáˆ_á‹á‹­á‹­á‰µ": "NS_USER_TALK", "ስዕáˆ": "NS_IMAGE", "ስዕáˆ_á‹á‹­á‹­á‰µ": "NS_IMAGE_TALK", "መáˆá‹•ክት": "NS_MEDIAWIKI", "መáˆá‹•ክት_á‹á‹­á‹­á‰µ": "NS_MEDIAWIKI_TALK", "መáˆáŒ áŠá‹«": "NS_TEMPLATE", "መáˆáŒ áŠá‹«_á‹á‹­á‹­á‰µ": "NS_TEMPLATE_TALK", "እርዳታ": "NS_HELP", "እርዳታ_á‹á‹­á‹­á‰µ": "NS_HELP_TALK", "መደብ": "NS_CATEGORY", "መደብ_á‹á‹­á‹­á‰µ": "NS_CATEGORY_TALK", } wiki_ns_re_am = [ ("", "_á‹á‹­á‹­á‰µ", "NS_PROJECT_TALK"), ] wiki_ns_pms = { "Media": "NS_MEDIA", "Special": "NS_SPECIAL", "Discussion": "NS_TALK", "Utent": "NS_USER", "Ciaciarade": "NS_USER_TALK", "Figura": "NS_IMAGE", "Discussion_dla_figura": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "Discussion_dla_MediaWiki": "NS_MEDIAWIKI_TALK", "Stamp": "NS_TEMPLATE", "Discussion_dlë_stamp": "NS_TEMPLATE_TALK", "Agiut": "NS_HELP", "Discussion_ant_sl'agiut": "NS_HELP_TALK", "Categorìa": "NS_CATEGORY", "Discussion_ant_sla_categorìa": "NS_CATEGORY_TALK", } wiki_ns_re_pms = [ ("Discussion_ant_sla_", "", "NS_PROJECT_TALK"), ] wiki_ns_el = { "Μέσον": "NS_MEDIA", "Ειδικό": "NS_SPECIAL", "Συζήτηση": "NS_TALK", "ΧÏήστης": "NS_USER", "Συζήτηση_χÏήστη": "NS_USER_TALK", "Εικόνα": "NS_IMAGE", "Συζήτηση_εικόνας": "NS_IMAGE_TALK", "MediaWiki": "NS_MEDIAWIKI", "MediaWiki_talk": "NS_MEDIAWIKI_TALK", "ΠÏότυπο": "NS_TEMPLATE", "Συζήτηση_Ï€ÏοτÏπου": "NS_TEMPLATE_TALK", "Βοήθεια": "NS_HELP", "Συζήτηση_βοήθειας": "NS_HELP_TALK", "ΚατηγοÏία": "NS_CATEGORY", "Συζήτηση_κατηγοÏίας": "NS_CATEGORY_TALK", } wiki_ns_re_el = [ ("", "_συζήτηση", "NS_PROJECT_TALK"), ] wiki_ns = { "io": wiki_ns_io, "et": wiki_ns_et, "is": wiki_ns_is, "mr": wiki_ns_mr, "tyv": wiki_ns_tyv, "qu": wiki_ns_qu, "frp": wiki_ns_frp, "kab": wiki_ns_kab, "fo": wiki_ns_fo, "pt_br": wiki_ns_pt_br, "dsb": wiki_ns_dsb, "jv": wiki_ns_jv, "vo": wiki_ns_vo, "ka": wiki_ns_ka, "gn": wiki_ns_gn, "sr_el": wiki_ns_sr_el, "cs": wiki_ns_cs, "sc": wiki_ns_sc, "km": wiki_ns_km, "sk": wiki_ns_sk, "bpy": wiki_ns_bpy, "he": wiki_ns_he, "hi": wiki_ns_hi, "hu": wiki_ns_hu, "lt": wiki_ns_lt, "hy": wiki_ns_hy, "ps": wiki_ns_ps, "ksh": wiki_ns_ksh, "tr": wiki_ns_tr, "af": wiki_ns_af, "zh_hans": wiki_ns_zh_hans, "id": wiki_ns_id, "tet": wiki_ns_tet, "an": wiki_ns_an, "ar": wiki_ns_ar, "tg_cyrl": wiki_ns_tg_cyrl, "rmy": wiki_ns_rmy, "mk": wiki_ns_mk, "eu": wiki_ns_eu, "az": wiki_ns_az, "bat_smg": wiki_ns_bat_smg, "it": wiki_ns_it, "ms": wiki_ns_ms, "ba": wiki_ns_ba, "be": wiki_ns_be, "crh_cyrl": wiki_ns_crh_cyrl, "nn": wiki_ns_nn, "nv": wiki_ns_nv, "ru": wiki_ns_ru, "crh_latn": wiki_ns_crh_latn, "be_tarask": wiki_ns_be_tarask, "yue": wiki_ns_yue, "kn": wiki_ns_kn, "sl": wiki_ns_sl, "nds": wiki_ns_nds, "tlh": wiki_ns_tlh, "la": wiki_ns_la, "li": wiki_ns_li, "hr": wiki_ns_hr, "pl": wiki_ns_pl, "nds_nl": wiki_ns_nds_nl, "pt": wiki_ns_pt, "xal": wiki_ns_xal, "ast": wiki_ns_ast, "ia": wiki_ns_ia, "kk_arab": wiki_ns_kk_arab, "zh_hant": wiki_ns_zh_hant, "fur": wiki_ns_fur, "en": wiki_ns_en, "lbe": wiki_ns_lbe, "ml": wiki_ns_ml, "fiu_vro": wiki_ns_fiu_vro, "yi": wiki_ns_yi, "udm": wiki_ns_udm, "ur": wiki_ns_ur, "fa": wiki_ns_fa, "ku_latn": wiki_ns_ku_latn, "uz": wiki_ns_uz, "fi": wiki_ns_fi, "bn": wiki_ns_bn, "pnt": wiki_ns_pnt, "br": wiki_ns_br, "hsb": wiki_ns_hsb, "no": wiki_ns_no, "vi": wiki_ns_vi, "fy": wiki_ns_fy, "ca": wiki_ns_ca, "ce": wiki_ns_ce, "gl": wiki_ns_gl, "sa": wiki_ns_sa, "tt_latn": wiki_ns_tt_latn, "cu": wiki_ns_cu, "ko": wiki_ns_ko, "cy": wiki_ns_cy, "si": wiki_ns_si, "sq": wiki_ns_sq, "su": wiki_ns_su, "arz": wiki_ns_arz, "lb": wiki_ns_lb, "pa": wiki_ns_pa, "csb": wiki_ns_csb, "th": wiki_ns_th, "vec": wiki_ns_vec, "zea": wiki_ns_zea, "lv": wiki_ns_lv, "scn": wiki_ns_scn, "new": wiki_ns_new, "zh_tw": wiki_ns_zh_tw, "eo": wiki_ns_eo, "es": wiki_ns_es, "uk": wiki_ns_uk, "bg": wiki_ns_bg, "ja": wiki_ns_ja, "kaa": wiki_ns_kaa, "bcl": wiki_ns_bcl, "bs": wiki_ns_bs, "stq": wiki_ns_stq, "fr": wiki_ns_fr, "nl": wiki_ns_nl, "ro": wiki_ns_ro, "ga": wiki_ns_ga, "sr_ec": wiki_ns_sr_ec, "kk_cyrl": wiki_ns_kk_cyrl, "oc": wiki_ns_oc, "wa": wiki_ns_wa, "cv": wiki_ns_cv, "os": wiki_ns_os, "kk_latn": wiki_ns_kk_latn, "da": wiki_ns_da, "sv": wiki_ns_sv, "de": wiki_ns_de, "ta": wiki_ns_ta, "vls": wiki_ns_vls, "te": wiki_ns_te, "lo": wiki_ns_lo, "ht": wiki_ns_ht, "am": wiki_ns_am, "pms": wiki_ns_pms, "el": wiki_ns_el, } wiki_ns_re = { "io": wiki_ns_re_io, "et": wiki_ns_re_et, "is": wiki_ns_re_is, "mr": wiki_ns_re_mr, "tyv": wiki_ns_re_tyv, "qu": wiki_ns_re_qu, "frp": wiki_ns_re_frp, "kab": wiki_ns_re_kab, "fo": wiki_ns_re_fo, "pt_br": wiki_ns_re_pt_br, "dsb": wiki_ns_re_dsb, "jv": wiki_ns_re_jv, "vo": wiki_ns_re_vo, "ka": wiki_ns_re_ka, "gn": wiki_ns_re_gn, "sr_el": wiki_ns_re_sr_el, "cs": wiki_ns_re_cs, "sc": wiki_ns_re_sc, "km": wiki_ns_re_km, "sk": wiki_ns_re_sk, "bpy": wiki_ns_re_bpy, "he": wiki_ns_re_he, "hi": wiki_ns_re_hi, "hu": wiki_ns_re_hu, "lt": wiki_ns_re_lt, "hy": wiki_ns_re_hy, "ps": wiki_ns_re_ps, "ksh": wiki_ns_re_ksh, "tr": wiki_ns_re_tr, "af": wiki_ns_re_af, "zh_hans": wiki_ns_re_zh_hans, "id": wiki_ns_re_id, "tet": wiki_ns_re_tet, "an": wiki_ns_re_an, "ar": wiki_ns_re_ar, "tg_cyrl": wiki_ns_re_tg_cyrl, "rmy": wiki_ns_re_rmy, "mk": wiki_ns_re_mk, "eu": wiki_ns_re_eu, "az": wiki_ns_re_az, "bat_smg": wiki_ns_re_bat_smg, "it": wiki_ns_re_it, "ms": wiki_ns_re_ms, "ba": wiki_ns_re_ba, "be": wiki_ns_re_be, "crh_cyrl": wiki_ns_re_crh_cyrl, "nn": wiki_ns_re_nn, "nv": wiki_ns_re_nv, "ru": wiki_ns_re_ru, "crh_latn": wiki_ns_re_crh_latn, "be_tarask": wiki_ns_re_be_tarask, "yue": wiki_ns_re_yue, "kn": wiki_ns_re_kn, "sl": wiki_ns_re_sl, "nds": wiki_ns_re_nds, "tlh": wiki_ns_re_tlh, "la": wiki_ns_re_la, "li": wiki_ns_re_li, "hr": wiki_ns_re_hr, "pl": wiki_ns_re_pl, "nds_nl": wiki_ns_re_nds_nl, "pt": wiki_ns_re_pt, "xal": wiki_ns_re_xal, "ast": wiki_ns_re_ast, "ia": wiki_ns_re_ia, "kk_arab": wiki_ns_re_kk_arab, "zh_hant": wiki_ns_re_zh_hant, "fur": wiki_ns_re_fur, "en": wiki_ns_re_en, "lbe": wiki_ns_re_lbe, "ml": wiki_ns_re_ml, "fiu_vro": wiki_ns_re_fiu_vro, "yi": wiki_ns_re_yi, "udm": wiki_ns_re_udm, "ur": wiki_ns_re_ur, "fa": wiki_ns_re_fa, "ku_latn": wiki_ns_re_ku_latn, "uz": wiki_ns_re_uz, "fi": wiki_ns_re_fi, "bn": wiki_ns_re_bn, "pnt": wiki_ns_re_pnt, "br": wiki_ns_re_br, "hsb": wiki_ns_re_hsb, "no": wiki_ns_re_no, "vi": wiki_ns_re_vi, "fy": wiki_ns_re_fy, "ca": wiki_ns_re_ca, "ce": wiki_ns_re_ce, "gl": wiki_ns_re_gl, "sa": wiki_ns_re_sa, "tt_latn": wiki_ns_re_tt_latn, "cu": wiki_ns_re_cu, "ko": wiki_ns_re_ko, "cy": wiki_ns_re_cy, "si": wiki_ns_re_si, "sq": wiki_ns_re_sq, "su": wiki_ns_re_su, "arz": wiki_ns_re_arz, "lb": wiki_ns_re_lb, "pa": wiki_ns_re_pa, "csb": wiki_ns_re_csb, "th": wiki_ns_re_th, "vec": wiki_ns_re_vec, "zea": wiki_ns_re_zea, "lv": wiki_ns_re_lv, "scn": wiki_ns_re_scn, "new": wiki_ns_re_new, "zh_tw": wiki_ns_re_zh_tw, "eo": wiki_ns_re_eo, "es": wiki_ns_re_es, "uk": wiki_ns_re_uk, "bg": wiki_ns_re_bg, "ja": wiki_ns_re_ja, "kaa": wiki_ns_re_kaa, "bcl": wiki_ns_re_bcl, "bs": wiki_ns_re_bs, "stq": wiki_ns_re_stq, "fr": wiki_ns_re_fr, "nl": wiki_ns_re_nl, "ro": wiki_ns_re_ro, "ga": wiki_ns_re_ga, "sr_ec": wiki_ns_re_sr_ec, "kk_cyrl": wiki_ns_re_kk_cyrl, "oc": wiki_ns_re_oc, "wa": wiki_ns_re_wa, "cv": wiki_ns_re_cv, "os": wiki_ns_re_os, "kk_latn": wiki_ns_re_kk_latn, "da": wiki_ns_re_da, "sv": wiki_ns_re_sv, "de": wiki_ns_re_de, "ta": wiki_ns_re_ta, "vls": wiki_ns_re_vls, "te": wiki_ns_re_te, "lo": wiki_ns_re_lo, "ht": wiki_ns_re_ht, "am": wiki_ns_re_am, "pms": wiki_ns_re_pms, "el": wiki_ns_re_el, } dico-2.2/build-aux/000077500000000000000000000000001172612674100141745ustar00rootroot00000000000000dico-2.2/build-aux/arg-nonnull.h000066400000000000000000000024321172612674100166020ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009-2011 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 3 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, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif dico-2.2/build-aux/c++defs.h000066400000000000000000000271051172612674100155640ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* C++ compatible function declaration macros. Copyright (C) 2010-2011 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 3 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, see . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H /* The three most frequent use cases of these macros are: * For providing a substitute for a function that is missing on some platforms, but is declared and works fine on the platforms on which it exists: #if @GNULIB_FOO@ # if !@HAVE_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on all platforms, but is broken/insufficient and needs to be replaced on some platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on some platforms but is broken/insufficient and needs to be replaced on some of them and is additionally either missing or undeclared on some other platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif */ /* _GL_EXTERN_C declaration; performs the declaration with C linkage. */ #if defined __cplusplus # define _GL_EXTERN_C extern "C" #else # define _GL_EXTERN_C extern #endif /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function, named rpl_func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype rpl_func parameters_and_attributes /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function, named func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype func parameters_and_attributes /* _GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to rpl_func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); */ #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = ::rpl_func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = \ reinterpret_cast(::rpl_func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* If we were to write rettype (*const func) parameters = ::func; like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls better (remove an indirection through a 'static' pointer variable), but then the _GL_CXXALIASWARN macro below would cause a warning not only for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = ::func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast(::func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function is picked among a set of overloaded functions, namely the one with rettype2 and parameters2. Two consecutive casts are used to silence the "cannot find a match" and "invalid conversion" errors that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* The outer cast must be a reinterpret_cast. The inner cast: When the function is defined as a set of overloaded functions, it works as a static_cast<>, choosing the designated variant. When the function is defined as a single variant, it works as a reinterpret_cast<>. The parenthesized cast syntax works both ways. */ # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast( \ (rettype2(*)parameters2)(::func)); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMESPACE::func is used. func must be defined without overloaded variants. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN(func) \ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN_2(func,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN(func) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the given overloaded variant of ::func is used but not when GNULIB_NAMESPACE::func is used. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif #endif /* _GL_CXXDEFS_H */ dico-2.2/build-aux/config.guess000077500000000000000000001264671172612674100165340ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-02-02' # 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # 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. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) 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 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # 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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; 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 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; 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 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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 ;; 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 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /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 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # 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 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ 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 -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; 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 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi 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 ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${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=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include 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 -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include 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 -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; 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 i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-tilera-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # 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. echo i386-sequent-sysv4 exit ;; 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 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; 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 ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; 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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*: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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *: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 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #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 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\n"); 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) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # 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 -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # 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 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dico-2.2/build-aux/config.rpath000077500000000000000000000436471172612674100165220ustar00rootroot00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2007 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # 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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II 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 cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # 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=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix4* | aix5*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. Submit a context # diff and a properly formatted GNU ChangeLog entry. # # 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. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; 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 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) 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 | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # 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*86 | x86_64) 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. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # 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 ;; abacus) basic_machine=abacus-unknown ;; 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 ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; 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 | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; 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 ;; go32) basic_machine=i386-pc os=-go32 ;; 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*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*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 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; 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 ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; 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 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; 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 ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-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/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-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 ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; 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 ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-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 ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 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 ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) 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. -auroraux) os=-auroraux ;; -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* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -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 ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -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[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -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 score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; 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 ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-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 ;; f30[01]-fujitsu | f700-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 ;; -cnk*|-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 ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dico-2.2/build-aux/depcomp000077500000000000000000000470411172612674100155570ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2010-10-07.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010 # 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dico-2.2/build-aux/install-sh000077500000000000000000000332561172612674100162110ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # 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 $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dico-2.2/build-aux/ltmain.sh000077500000000000000000007474131172612674100160370ustar00rootroot00000000000000# Generated from ltmain.m4sh. # libtool (GNU libtool 1.3121 2009-09-18) 2.2.7a # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [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 # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # 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. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool 1.3121 2009-09-18) 2.2.7a # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=libtool PACKAGE=libtool VERSION=2.2.7a TIMESTAMP=" 1.3121 2009-09-18" package_revision=1.3121 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. # 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). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} : ${ECHO=$as_echo} : ${EGREP="/usr/bin/grep -E"} : ${FGREP="/usr/bin/grep -F"} : ${GREP="/usr/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/usr/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. pathcar="s,^/\([^/]*\).*$,\1," pathcdr="s,^/[^/]*,," removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/," collapseslashes="s@/\{1,\}@/@g" finalslash="s,/*$,/," # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # 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' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/(C)/!b go :more /\./!{ N s/\n# // b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/^# *-h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. # $mode is unset nonopt= execute_dlfiles= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 opt_dry_run=false opt_duplicate_deps=false opt_silent=false opt_debug=: # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_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 $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: opt_verbose=false ;; --no-quiet|--no-silent) preserve_args="$preserve_args $opt" opt_silent=false ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false opt_verbose=: ;; --no-verbose) preserve_args="$preserve_args $opt" opt_verbose=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # 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 "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= 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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # 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 if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build 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, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" 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 $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug 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. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS 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 the \`-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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # 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 || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi install_shared_prog="$install_shared_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; 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 *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # 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 func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_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 func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # 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" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) echo >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac echo >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext 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 "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $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 "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ 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 "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 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\ " } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1"; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_result=`cygpath -w "$1" | $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result= fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1"; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_pathlist_tmp1=$func_stripname_result case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. func_to_host_pathlist_result=` ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_append func_to_host_pathlist_result ";$func_to_host_path_result" fi fi fi done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result"; then func_error "Could not determine the host path(s) corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_append func_to_host_pathlist_result ";" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined LT_DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # 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 invocation. # 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 ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append 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= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; 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 ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $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" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done continue fi # $pass = conv # 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 func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. 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 fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. 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 fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # 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_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." 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." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." 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 build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac 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 func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" 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 "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # 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 behavior. 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. $opt_dry_run || $RM conftest.c cat > conftest.c </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 "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $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" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $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" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) 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 ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac 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." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." 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 fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # 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 if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $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\" dep_rpath="$dep_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" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done echo ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_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 ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_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 and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" 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 "$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 case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac 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" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status 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 "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS 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" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED '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 "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; 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 $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 dico-2.2/build-aux/mdate-sh000077500000000000000000000137171172612674100156350ustar00rootroot00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2010-08-21.06; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010 # Free Software Foundation, Inc. # written by Ulrich Drepper , 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST fi case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification day of FILE, in the format: 1 January 1970 Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac error () { echo "$0: $1" >&2 exit 1 } # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do test $# -gt 0 || error "failed parsing \`$ls_command /' output" shift # Add another shift to the command. command="$command 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 test -n "$month" || error "failed parsing \`$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 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 case $3 in ???*) day=$1;; *) day=$3; shift;; esac # 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 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dico-2.2/build-aux/missing000077500000000000000000000262331172612674100156010ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -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 --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one 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 help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. 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 $msg. You should only need it if you modified \`${configure_ac}'. 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 $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. 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_ac}` 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 $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. 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 ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. 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 prerequisites 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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dico-2.2/build-aux/texinfo.tex000066400000000000000000011234501172612674100164000ustar00rootroot00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2011-02-24.09} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011 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 3 of the % License, 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 program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs 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. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [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]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros 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\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % 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 % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % 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\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\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\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % 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 } % 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. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % 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\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % 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). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \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. % \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. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \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 \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \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 \indexdummies \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\relax \unvbox#1\relax \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{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % 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. % \gdef\sepspaces{\obeyspaces\let =\tie} % 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 \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % 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} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @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. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % 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 } % % The \vtop 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. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % 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 % Old definition--didn't work. %\parseargdef\need{\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\nobreak %\prevdepth=-1000pt %}} \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\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 \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @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. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @| 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). This command % is not documented, not supported, and doesn't work. % \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 }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\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{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @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{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's what we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\realbackslash(}{#1}% \HyPsdSubst{)}{\realbackslash)}{#1}% } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .png, .jpg, .pdf (among % others). Let's try in that order. \let\pdfimgext=\empty \begingroup \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % 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} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % 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, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \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} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % 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 except % in the main text, 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 because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \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 \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \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 \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #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 \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \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 \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \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 \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % 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 } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ptexslash \fi\fi\fi} % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \let\i=\smartitalic \let\slanted=\smartslanted \def\var#1{\smartslanted{#1}} \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % 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 = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \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}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\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 \plainfrenchspacing #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 \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. % (This \urefnobreak definition isn't used now, leaving it for a while % for comparison.) \def\urefnobreak#1{\dourefnobreak #1,,,\finish} \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % This \urefbreak definition is the active one. \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode\ampChar=\active \catcode\dotChar=\active \catcode\hashChar=\active \catcode\questChar=\active \catcode\slashChar=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretch{\urefprebreak \hskip0pt plus.13em } \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @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). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct \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\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % 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} % @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} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } \message{glyphs,} % and logos. % @@ prints an @. \def\@{\char64 } % Used to generate quoted braces. Unless we're in typewriter, use % \ecfont because the CM text fonts do not have braces, and we don't % want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\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 \reducedsf error\kern-1.5pt} % \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} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \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 % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{% \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % 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 \let\page = \oldpage \page \null }% } \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 % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on 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\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\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 -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @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{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % 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 % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(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, @ftable, 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\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % 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\relax \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. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \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. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \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'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % 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 . % \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 \doitemize, 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 \doitemize{#1.}\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} % @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. % 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 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 % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \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 \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% 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 % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % 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. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % 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 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \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\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi %% 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. \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{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @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. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), 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'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \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\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @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. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % 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}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should define @lbrace and @rbrace commands a la @comma. \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\indicateurl \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% \def\}{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax \else \indexlquoteignore \fi % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us % ignore left quotes in the sort term. {\catcode`\`=\active \gdef\indexlquoteignore{\let`=\empty}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % 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 most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % 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 or \pdfdest 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. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % 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). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % 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. \putwordIndexNonexistent \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 \putwordIndexIsEmpty \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{\backslashcurfont}% \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. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \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 % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % 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. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \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. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\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 \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \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 = {% % % 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 just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % 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 } % The double-column output routine for all double-column pages except % the last. % \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@ = \vsize \divide\dimen@ by 2 \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 } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \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@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page \chapoddpage \endgroup } % \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \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} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@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 % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % 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 to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. % \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % 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. \let\section = \numberedsec \let\subsection = \numberedsubsec \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{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % 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} %%% 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} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \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 % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \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 {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \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 \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % 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, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % 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\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % 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} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @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 @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % \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\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (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} % 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{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \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 \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \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 = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#1#2{% \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count. % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a minor refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \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 = ) % 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. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{\begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % % ... and for \example: \spaceisspace % % The \empty here causes a following catcode 5 newline to be eaten % as part of reading whitespace after a control sequence. It does % not eat a catcode 13 newline. There's no good way to handle the % two cases. See the Macro Details node in the manual for the % workaround we currently have to recommend for macros and % line-oriented commands. \scantokens{#1\empty}% \endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" % that would be written @\ @{ @} in a Texinfo document. % % We already have @{ and @}. For @\, we define it here, and only for % this purpose, to produce a typewriter backslash (so, the @\ that we % define for @math can't be used with @macro calls): % \def\\{\normalbackslash}% % % We would like to do this for \, too, since that is what makeinfo does. % But it is not possible, because Texinfo already has a command @, for a % cedilla accent. Documents must use @comma{} instead. % % \anythingelse will almost certainly be an error of some kind. % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. % {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\margbackslash#1{\char`\#1 } \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0 \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax \let\xeatspaces\relax \parsemargdefxxx#1,;,% } \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) % \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. % \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \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 the next control sequence % as an argument (by \parsebrace or \parsearg). % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Make them active and then expand them all to nothing. % \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \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{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\fi } % @xref, @pxref, and @ref generate cross-references. 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 \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \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\printedrefname{\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\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % 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{} ``\printedrefname'' \putwordin{} \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. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\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{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \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. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \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 % It was suggested to set the catcode of ^ to 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 % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \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 % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including 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 {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \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}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % 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) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \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. \hsize=\pagewidth \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 % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\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 } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @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 % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \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://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisiundefined \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 (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \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 \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{~} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \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 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, 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. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), 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\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\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\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \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`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % 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} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active @def@normalbackslash{{@tt@backslashcurfont}} % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % 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 turn back 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 } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore dico-2.2/build-aux/warn-on-use.h000066400000000000000000000121501172612674100165170ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A C macro for emitting warnings if a function is used. Copyright (C) 2010-2011 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 3 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, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system : #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static inline char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") is like _GL_WARN_ON_USE (function, "string"), except that the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_EXTERN_C declaration; performs the declaration with C linkage. */ #ifndef _GL_WARN_EXTERN_C # if defined __cplusplus # define _GL_WARN_EXTERN_C extern "C" # else # define _GL_WARN_EXTERN_C extern # endif #endif dico-2.2/build-aux/ylwrap000077500000000000000000000140431172612674100154420ustar00rootroot00000000000000#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, # 2007, 2009 Free Software Foundation, Inc. # # Written by Tom Tromey . # # 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case "$1" in '') echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input="$1" shift case "$input" in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input="`pwd`/$input" ;; esac pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog="`pwd`/$prog" ;; esac # 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 case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then set X $pairlist shift first=yes # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot="no" if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot="yes" fi # The directory holding the input. input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` # Quote $INPUT_DIR so we can use it in a regexp. # FIXME: really we should care about more than `.' and `\'. input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` while test "$#" -ne 0; do from="$1" # Handle y_tab.c and y_tab.h output by DOS if test $y_tab_nodot = "yes"; then if test $from = "y.tab.c"; then from="y_tab.c" else if test $from = "y.tab.h"; then from="y_tab.h" fi fi fi if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in [\\/]* | ?:[\\/]*) target="$2";; *) target="../$2";; esac # We do not want to overwrite a header file if it hasn't # changed. This avoid useless recompilations. However the # parser itself (the first file) should always be updated, # because it is the destination of the .y.c rule in the # Makefile. Divert the output of all other files to a temporary # file so we can compare them to existing versions. if test $first = no; then realtarget="$target" target="tmp-`echo $target | sed s/.*[\\/]//g`" fi # Edit out `#line' or `#' directives. # # We don't want the resulting debug information to point at # an absolute srcdir; it is better for it to just mention the # .y file with no path. # # We want to use the real output file name, not yy.lex.c for # instance. # # We want the include guards to be adjusted too. FROM=`echo "$from" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` TARGET=`echo "$2" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? # Check whether header files must be updated. if test $first = no; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$2" is unchanged rm -f "$target" else echo updating "$2" mv -f "$target" "$realtarget" fi fi 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 ret=1 fi fi shift shift first=no done else ret=$? fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: dico-2.2/config.h.in000066400000000000000000001375241172612674100143410ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T /* Define to the number of bits in type 'sig_atomic_t'. */ #undef BITSIZEOF_SIG_ATOMIC_T /* Define to the number of bits in type 'size_t'. */ #undef BITSIZEOF_SIZE_T /* Define to the number of bits in type 'wchar_t'. */ #undef BITSIZEOF_WCHAR_T /* Define to the number of bits in type 'wint_t'. */ #undef BITSIZEOF_WINT_T /* 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 to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to the name of a netrc-style autologin file */ #undef DEFAULT_AUTOLOGIN_FILE /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ #undef FUNC_NL_LANGINFO_YESEXPR_WORKS /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Define this to 'void' or 'struct timezone' to match the system's declaration of the second argument to gettimeofday. */ #undef GETTIMEOFDAY_TIMEZONE /* Define to make the limit macros in visible. */ #undef GL_TRIGGER_STDC_LIMIT_MACROS /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module malloc-gnu shall be considered present. */ #undef GNULIB_MALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module realloc-gnu shall be considered present. */ #undef GNULIB_REALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module snprintf shall be considered present. */ #undef GNULIB_SNPRINTF /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC /* Define to 1 when the gnulib module fseeko should be tested. */ #undef GNULIB_TEST_FSEEKO /* Define to 1 when the gnulib module getdelim should be tested. */ #undef GNULIB_TEST_GETDELIM /* Define to 1 when the gnulib module getdomainname should be tested. */ #undef GNULIB_TEST_GETDOMAINNAME /* Define to 1 when the gnulib module gethostname should be tested. */ #undef GNULIB_TEST_GETHOSTNAME /* Define to 1 when the gnulib module getline should be tested. */ #undef GNULIB_TEST_GETLINE /* Define to 1 when the gnulib module getopt-gnu should be tested. */ #undef GNULIB_TEST_GETOPT_GNU /* Define to 1 when the gnulib module gettimeofday should be tested. */ #undef GNULIB_TEST_GETTIMEOFDAY /* Define to 1 when the gnulib module lseek should be tested. */ #undef GNULIB_TEST_LSEEK /* Define to 1 when the gnulib module malloc-posix should be tested. */ #undef GNULIB_TEST_MALLOC_POSIX /* Define to 1 when the gnulib module mbrtowc should be tested. */ #undef GNULIB_TEST_MBRTOWC /* Define to 1 when the gnulib module mbsinit should be tested. */ #undef GNULIB_TEST_MBSINIT /* Define to 1 when the gnulib module mbtowc should be tested. */ #undef GNULIB_TEST_MBTOWC /* Define to 1 when the gnulib module memchr should be tested. */ #undef GNULIB_TEST_MEMCHR /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #undef GNULIB_TEST_NL_LANGINFO /* Define to 1 when the gnulib module realloc-posix should be tested. */ #undef GNULIB_TEST_REALLOC_POSIX /* Define to 1 when the gnulib module snprintf should be tested. */ #undef GNULIB_TEST_SNPRINTF /* Define to 1 when the gnulib module strerror should be tested. */ #undef GNULIB_TEST_STRERROR /* Define to 1 when the gnulib module strtoll should be tested. */ #undef GNULIB_TEST_STRTOLL /* Define to 1 when the gnulib module strtoull should be tested. */ #undef GNULIB_TEST_STRTOULL /* Define to 1 when the gnulib module time_r should be tested. */ #undef GNULIB_TEST_TIME_R /* Define to 1 when the gnulib module vasprintf should be tested. */ #undef GNULIB_TEST_VASPRINTF /* Define to 1 when the gnulib module wcrtomb should be tested. */ #undef GNULIB_TEST_WCRTOMB /* Define to 1 if SCM_DEVAL_P, SCM_BACKTRACE_P, SCM_RECORD_POSITIONS_P and SCM_RESET_DEBUG_MODE are defined */ #undef GUILE_DEBUG_MACROS /* Guile version number */ #undef GUILE_VERSION /* Guile version number: MAX*10 + MIN */ #undef GUILE_VERSION_NUMBER /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `argz_add' function. */ #undef HAVE_ARGZ_ADD /* Define to 1 if you have the `argz_append' function. */ #undef HAVE_ARGZ_APPEND /* Define to 1 if you have the `argz_count' function. */ #undef HAVE_ARGZ_COUNT /* Define to 1 if you have the `argz_create_sep' function. */ #undef HAVE_ARGZ_CREATE_SEP /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H /* Define to 1 if you have the `argz_insert' function. */ #undef HAVE_ARGZ_INSERT /* Define to 1 if you have the `argz_next' function. */ #undef HAVE_ARGZ_NEXT /* Define to 1 if you have the `argz_stringify' function. */ #undef HAVE_ARGZ_STRINGIFY /* Define to 1 if you have the header file. */ #undef HAVE_BP_SYM_H /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR /* Define to 1 if you have the header file. */ #undef HAVE_CRYPT_H /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the declaration of `crypt', and to 0 if you don't. */ #undef HAVE_DECL_CRYPT /* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if you don't. */ #undef HAVE_DECL_CYGWIN_CONV_PATH /* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FFLUSH_UNLOCKED /* Define to 1 if you have the declaration of `flockfile', and to 0 if you don't. */ #undef HAVE_DECL_FLOCKFILE /* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_FPUTS_UNLOCKED /* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. */ #undef HAVE_DECL_FSEEKO /* Define to 1 if you have the declaration of `funlockfile', and to 0 if you don't. */ #undef HAVE_DECL_FUNLOCKFILE /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_GETC_UNLOCKED /* Define to 1 if you have the declaration of `getdelim', and to 0 if you don't. */ #undef HAVE_DECL_GETDELIM /* Define to 1 if you have the declaration of `getdomainname', and to 0 if you don't. */ #undef HAVE_DECL_GETDOMAINNAME /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ #undef HAVE_DECL_GETENV /* Define to 1 if you have the declaration of `getline', and to 0 if you don't. */ #undef HAVE_DECL_GETLINE /* Define to 1 if you have the declaration of `getpass', and to 0 if you don't. */ #undef HAVE_DECL_GETPASS /* Define to 1 if you have the declaration of `imaxabs', and to 0 if you don't. */ #undef HAVE_DECL_IMAXABS /* Define to 1 if you have the declaration of `imaxdiv', and to 0 if you don't. */ #undef HAVE_DECL_IMAXDIV /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #undef HAVE_DECL_ISBLANK /* Define to 1 if you have the declaration of `localtime_r', and to 0 if you don't. */ #undef HAVE_DECL_LOCALTIME_R /* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you don't. */ #undef HAVE_DECL_PUTC_UNLOCKED /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #undef HAVE_DECL_SNPRINTF /* Define to 1 if you have the declaration of `strerror', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR /* Define to 1 if you have the declaration of `strtoimax', and to 0 if you don't. */ #undef HAVE_DECL_STRTOIMAX /* Define to 1 if you have the declaration of `strtoll', and to 0 if you don't. */ #undef HAVE_DECL_STRTOLL /* Define to 1 if you have the declaration of `strtoull', and to 0 if you don't. */ #undef HAVE_DECL_STRTOULL /* Define to 1 if you have the declaration of `strtoumax', and to 0 if you don't. */ #undef HAVE_DECL_STRTOUMAX /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ #undef HAVE_DECL_TZNAME /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF /* Define to 1 if you have the declaration of `__fsetlocking', and to 0 if you don't. */ #undef HAVE_DECL___FSETLOCKING /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define if you have the GNU dld library. */ #undef HAVE_DLD /* Define to 1 if you have the header file. */ #undef HAVE_DLD_H /* Define to 1 if you have the `dlerror' function. */ #undef HAVE_DLERROR /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_DL_H /* Define if you have the _dyld_func_lookup function. */ #undef HAVE_DYLD /* Define to 1 if the system has the type `error_t'. */ #undef HAVE_ERROR_T /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H /* Define to 1 if you have the `flockfile' function. */ #undef HAVE_FLOCKFILE /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `funlockfile' function. */ #undef HAVE_FUNLOCKFILE /* Define to 1 if you have the `getdelim' function. */ #undef HAVE_GETDELIM /* Define if the getdomainname() function is present and can be used. */ #undef HAVE_GETDOMAINNAME /* Define to 1 if you have the `getdtablesize' function. */ #undef HAVE_GETDTABLESIZE /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such. */ #undef HAVE_INLINE /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define to 1 if you have the `isblank' function. */ #undef HAVE_ISBLANK /* Define to 1 if you have the `iswcntrl' function. */ #undef HAVE_ISWCNTRL /* Define to 1 if you have the `iswctype' function. */ #undef HAVE_ISWCTYPE /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have the `crypt' library (-lcrypt). */ #undef HAVE_LIBCRYPT /* Define if you have the libdl library or equivalent. */ #undef HAVE_LIBDL /* Define if libdlloader will be built on this platform */ #undef HAVE_LIBDLLOADER /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `pcre' library (-lpcre). */ #undef HAVE_LIBPCRE /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if the system has the type `long long int'. */ #undef HAVE_LONG_LONG_INT /* Define this if a modern libltdl is already installed */ #undef HAVE_LTDL /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H /* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC_GNU /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and . */ #undef HAVE_MAP_ANONYMOUS /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the `mbsinit' function. */ #undef HAVE_MBSINIT /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mprotect' function. */ #undef HAVE_MPROTECT /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if libc includes obstacks. */ #undef HAVE_OBSTACK /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR /* Define if libtool can extract symbol lists from object files. */ #undef HAVE_PRELOADED_SYMBOLS /* Define to 1 if accept is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACCEPT /* Define to 1 if accept4 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACCEPT4 /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL /* Define to 1 if bind is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BIND /* Define to 1 if btowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BTOWC /* Define to 1 if canonicalize_file_name is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN /* Define to 1 if connect is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CONNECT /* Define to 1 if dprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DPRINTF /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 /* Define to 1 if dup3 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP3 /* Define to 1 if endusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENDUSERSHELL /* Define to 1 if environ is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENVIRON /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT /* Define to 1 if fchdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHDIR /* Define to 1 if fchownat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHOWNAT /* Define to 1 if fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE /* Define to 1 if freeaddrinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREEADDRINFO /* Define to 1 if fseeko is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSEEKO /* Define to 1 if fsync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSYNC /* Define to 1 if ftello is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTELLO /* Define to 1 if ftruncate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTRUNCATE /* Define to 1 if gai_strerror is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GAI_STRERROR /* Define to 1 if getaddrinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETADDRINFO /* Define to 1 if getcwd is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETCWD /* Define to 1 if getdelim is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDELIM /* Define to 1 if getdomainname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDOMAINNAME /* Define to 1 if getdtablesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDTABLESIZE /* Define to 1 if getgroups is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETGROUPS /* Define to 1 if gethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETHOSTNAME /* Define to 1 if getline is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLINE /* Define to 1 if getloadavg is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOADAVG /* Define to 1 if getlogin is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN /* Define to 1 if getlogin_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN_R /* Define to 1 if getnameinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETNAMEINFO /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE /* Define to 1 if getpeername is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPEERNAME /* Define to 1 if getsockname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSOCKNAME /* Define to 1 if getsockopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSOCKOPT /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT /* Define to 1 if gettimeofday is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETTIMEOFDAY /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT /* Define to 1 if imaxabs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXABS /* Define to 1 if imaxdiv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXDIV /* Define to 1 if initstat_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INITSTAT_R /* Define to 1 if iswctype is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ISWCTYPE /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN /* Define to 1 if link is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINK /* Define to 1 if linkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINKAT /* Define to 1 if listen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LISTEN /* Define to 1 if lseek is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSEEK /* Define to 1 if mbrlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRLEN /* Define to 1 if mbrtowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBRTOWC /* Define to 1 if mbsinit is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSINIT /* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSNRTOWCS /* Define to 1 if mbsrtowcs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MBSRTOWCS /* Define to 1 if memmem is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMMEM /* Define to 1 if mempcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMPCPY /* Define to 1 if memrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMRCHR /* Define to 1 if mkdtemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDTEMP /* Define to 1 if mkostemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMP /* Define to 1 if mkostemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMPS /* Define to 1 if mkstemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMP /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS /* Define to 1 if nl_langinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_NL_LANGINFO /* Define to 1 if pipe is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE /* Define to 1 if pipe2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE2 /* Define to 1 if popen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POPEN /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* Define to 1 if ptsname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME /* Define to 1 if pwrite is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PWRITE /* Define to 1 if random_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM_R /* Define to 1 if rawmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RAWMEMCHR /* Define to 1 if readlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINK /* Define to 1 if readlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINKAT /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH /* Define to 1 if recv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RECV /* Define to 1 if recvfrom is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RECVFROM /* Define to 1 if renameat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RENAMEAT /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR /* Define to 1 if rpmatch is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RPMATCH /* Define to 1 if send is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SEND /* Define to 1 if sendto is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SENDTO /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV /* Define to 1 if setsockopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSOCKOPT /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R /* Define to 1 if setusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETUSERSHELL /* Define to 1 if shutdown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SHUTDOWN /* Define to 1 if sleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SLEEP /* Define to 1 if snprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SNPRINTF /* Define to 1 if socket is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SOCKET /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R /* Define to 1 if stpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPCPY /* Define to 1 if stpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPNCPY /* Define to 1 if strcasestr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASESTR /* Define to 1 if strchrnul is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCHRNUL /* Define to 1 if strdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRDUP /* Define to 1 if strerror_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRERROR_R /* Define to 1 if strncat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNCAT /* Define to 1 if strndup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNDUP /* Define to 1 if strnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNLEN /* Define to 1 if strpbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRPBRK /* Define to 1 if strsep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSEP /* Define to 1 if strsignal is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSIGNAL /* Define to 1 if strtod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOD /* Define to 1 if strtoimax is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOIMAX /* Define to 1 if strtok_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOK_R /* Define to 1 if strtoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOLL /* Define to 1 if strtoull is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOULL /* Define to 1 if strtoumax is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOUMAX /* Define to 1 if strverscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRVERSCMP /* Define to 1 if symlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINK /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT /* Define to 1 if tmpfile is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TMPFILE /* Define to 1 if towctrans is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TOWCTRANS /* Define to 1 if ttyname_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TTYNAME_R /* Define to 1 if unlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINK /* Define to 1 if unlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINKAT /* Define to 1 if unlockpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLOCKPT /* Define to 1 if unsetenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNSETENV /* Define to 1 if usleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_USLEEP /* Define to 1 if vdprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VDPRINTF /* Define to 1 if vsnprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_VSNPRINTF /* Define to 1 if wcpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCPCPY /* Define to 1 if wcpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCPNCPY /* Define to 1 if wcrtomb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCRTOMB /* Define to 1 if wcscasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCASECMP /* Define to 1 if wcscat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCAT /* Define to 1 if wcschr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCHR /* Define to 1 if wcscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCMP /* Define to 1 if wcscoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCOLL /* Define to 1 if wcscpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCPY /* Define to 1 if wcscspn is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSCSPN /* Define to 1 if wcsdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSDUP /* Define to 1 if wcslen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSLEN /* Define to 1 if wcsncasecmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCASECMP /* Define to 1 if wcsncat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCAT /* Define to 1 if wcsncmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCMP /* Define to 1 if wcsncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNCPY /* Define to 1 if wcsnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNLEN /* Define to 1 if wcsnrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSNRTOMBS /* Define to 1 if wcspbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSPBRK /* Define to 1 if wcsrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRCHR /* Define to 1 if wcsrtombs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSRTOMBS /* Define to 1 if wcsspn is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSSPN /* Define to 1 if wcsstr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSSTR /* Define to 1 if wcstok is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSTOK /* Define to 1 if wcswidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSWIDTH /* Define to 1 if wcsxfrm is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCSXFRM /* Define to 1 if wctob is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTOB /* Define to 1 if wctrans is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTRANS /* Define to 1 if wctype is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCTYPE /* Define to 1 if wcwidth is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WCWIDTH /* Define to 1 if wmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMCHR /* Define to 1 if wmemcmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMCMP /* Define to 1 if wmemcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMCPY /* Define to 1 if wmemmove is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMMOVE /* Define to 1 if wmemset is declared even after undefining macros. */ #undef HAVE_RAW_DECL_WMEMSET /* Define to 1 if _Exit is declared even after undefining macros. */ #undef HAVE_RAW_DECL__EXIT /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define to 1 if your system has a GNU libc compatible 'realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC_GNU /* Define if the 'realloc' function is POSIX compliant. */ #undef HAVE_REALLOC_POSIX /* Define to 1 if you have the `rl_completion_matches' function. */ #undef HAVE_RL_COMPLETION_MATCHES /* Define to 1 if the system has the type `sa_family_t'. */ #undef HAVE_SA_FAMILY_T /* Define to 1 if the system has the type `scm_t_off'. */ #undef HAVE_SCM_T_OFF /* Define to 1 if you have the header file. */ #undef HAVE_SECURITY_PAM_APPL_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setegid' function. */ #undef HAVE_SETEGID /* Define to 1 if you have the `seteuid' function. */ #undef HAVE_SETEUID /* Define to 1 if you have the `setregid' function. */ #undef HAVE_SETREGID /* Define to 1 if you have the `setresgid' function. */ #undef HAVE_SETRESGID /* Define to 1 if you have the `setreuid' function. */ #undef HAVE_SETREUID /* Define if you have the shl_load function. */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the `shutdown' function. */ #undef HAVE_SHUTDOWN /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T /* Define to 1 if 'wchar_t' is a signed integer type. */ #undef HAVE_SIGNED_WCHAR_T /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define if the return value of the snprintf function is the number of of bytes (excluding the terminating NUL) that would have been produced if the buffer had been large enough. */ #undef HAVE_SNPRINTF_RETVAL_C99 /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the header file. */ #undef HAVE_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_EXT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strnlen' function. */ #undef HAVE_STRNLEN /* Define to 1 if you have the `strtoimax' function. */ #undef HAVE_STRTOIMAX /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoll' function. */ #undef HAVE_STRTOLL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL /* Define to 1 if you have the `strtoumax' function. */ #undef HAVE_STRTOUMAX /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE /* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY /* Define to 1 if `tm_zone' is member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if you have the `sysconf' function. */ #undef HAVE_SYSCONF /* Define to 1 if you have the header file. */ #undef HAVE_SYSEXITS_H /* Define to 1 if you have the `sysinfo' function. */ #undef HAVE_SYSINFO /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSTEMINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tcgetattr' function. */ #undef HAVE_TCGETATTR /* Define to 1 if you have the `tcsetattr' function. */ #undef HAVE_TCSETATTR /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define if struct tm has the tm_gmtoff member. */ #undef HAVE_TM_GMTOFF /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ #undef HAVE_TZNAME /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the `wcrtomb' function. */ #undef HAVE_WCRTOMB /* Define to 1 if you have the `wcscoll' function. */ #undef HAVE_WCSCOLL /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsnlen' function. */ #undef HAVE_WCSNLEN /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T /* This value is set to 1 to indicate that the system argz facility works */ #undef HAVE_WORKING_ARGZ /* Define to 1 if O_NOATIME works. */ #undef HAVE_WORKING_O_NOATIME /* Define to 1 if O_NOFOLLOW works. */ #undef HAVE_WORKING_O_NOFOLLOW /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME /* Define to 1 if you have the `__fsetlocking' function. */ #undef HAVE___FSETLOCKING /* Define HOST_NAME_MAX when does not define it. */ #undef HOST_NAME_MAX /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Default syslog facility. */ #undef LOG_FACILITY /* Define to 1 if lseek does not detect pipes. */ #undef LSEEK_PIPE_BROKEN /* Define if the OS needs help to load dependent libraries for dlopen(). */ #undef LTDL_DLOPEN_DEPLIBS /* Define to the system default library search path. */ #undef LT_DLSEARCH_PATH /* The archive extension */ #undef LT_LIBEXT /* Define to the extension used for runtime loadable modules, say, ".so". */ #undef LT_MODULE_EXT /* Define to the name of the environment variable that determines the run-time module search path. */ #undef LT_MODULE_PATH_VAR /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ #undef MAP_ANONYMOUS /* Define if the mbrtowc function has the NULL pwc argument bug. */ #undef MBRTOWC_NULL_ARG1_BUG /* Define if the mbrtowc function has the NULL string argument bug. */ #undef MBRTOWC_NULL_ARG2_BUG /* Define if the mbrtowc function does not return 0 for a NUL character. */ #undef MBRTOWC_NUL_RETVAL_BUG /* Define if the mbrtowc function returns a wrong return value. */ #undef MBRTOWC_RETVAL_BUG /* Define if dlsym() requires a leading underscore in symbol names. */ #undef NEED_USCORE /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'ptrdiff_t'. */ #undef PTRDIFF_T_SUFFIX /* Define if nl_langinfo exists but is overridden by gnulib. */ #undef REPLACE_NL_LANGINFO /* Define this to 1 if strerror is broken. */ #undef REPLACE_STRERROR /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ #ifndef SIZE_MAX # undef SIZE_MAX #endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ #undef SIZE_T_SUFFIX /* 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 runtime. 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 to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Define this if you have libz library */ #undef USE_LIBZ /* Version number of package */ #undef VERSION /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX /* Define if WSAStartup is needed. */ #undef WINDOWS_SOCKETS /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX /* Define if GNU SASL is present */ #undef WITH_GSASL /* Enable use of readline */ #undef WITH_READLINE /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 in order to get the POSIX compatible declarations of socket functions. */ #undef _POSIX_PII_SOCKET /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define if you want regoff_t to be at least as wide POSIX requires. */ #undef _REGEX_LARGE_OFFSETS /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX /* Ensure that defines the limit macros, since gnulib's relies on them. */ #if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS 1 #endif /* Define so that glibc/gnulib argp.h does not typedef error_t. */ #undef __error_t_defined /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to a type to use for `error_t' if it is not otherwise available. */ #undef error_t /* Define to a replacement function name for getpass(). */ #undef getpass /* Define to rpl_gmtime if the replacement function should be used. */ #undef gmtime /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to long or long long if and don't define. */ #undef intmax_t /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define to rpl_localtime if the replacement function should be used. */ #undef localtime /* Define to a type if does not define. */ #undef mbstate_t /* Define to the name of the strftime replacement function. */ #undef my_strftime /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ #undef ptrdiff_t /* Define to rpl_re_comp if the replacement should be used. */ #undef re_comp /* Define to rpl_re_compile_fastmap if the replacement should be used. */ #undef re_compile_fastmap /* Define to rpl_re_compile_pattern if the replacement should be used. */ #undef re_compile_pattern /* Define to rpl_re_exec if the replacement should be used. */ #undef re_exec /* Define to rpl_re_match if the replacement should be used. */ #undef re_match /* Define to rpl_re_match_2 if the replacement should be used. */ #undef re_match_2 /* Define to rpl_re_search if the replacement should be used. */ #undef re_search /* Define to rpl_re_search_2 if the replacement should be used. */ #undef re_search_2 /* Define to rpl_re_set_registers if the replacement should be used. */ #undef re_set_registers /* Define to rpl_re_set_syntax if the replacement should be used. */ #undef re_set_syntax /* Define to rpl_re_syntax_options if the replacement should be used. */ #undef re_syntax_options /* Define to rpl_regcomp if the replacement should be used. */ #undef regcomp /* Define to rpl_regerror if the replacement should be used. */ #undef regerror /* Define to rpl_regexec if the replacement should be used. */ #undef regexec /* Define to rpl_regfree if the replacement should be used. */ #undef regfree /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to int if does not define */ #undef socklen_t /* Define as a signed type of the same size as size_t. */ #undef ssize_t /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED #if !HAVE_DECL_CRYPT char *crypt(const char *key, const char *salt); #endif /* Some older versions of readline have completion_matches */ #ifndef HAVE_RL_COMPLETION_MATCHES # define rl_completion_matches completion_matches #endif dico-2.2/configure000077500000000000000000055527131172612674100142330ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for GNU dico 2.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ( test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" )) || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } ( test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )) || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" lt_ltdl_dir='libltdl' SHELL=${CONFIG_SHELL-/bin/sh} exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GNU dico' PACKAGE_TARNAME='dico' PACKAGE_VERSION='2.2' PACKAGE_STRING='GNU dico 2.2' PACKAGE_BUGREPORT='bug-dico@gnu.org' ac_unique_file="dicod/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_func_list= ac_header_list= gl_getopt_required=POSIX gl_getopt_required=POSIX gt_needs= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS gl_LTLIBOBJS gl_LIBOBJS ltdl_LTLIBOBJS ltdl_LIBOBJS am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS IMPRIMATUR_COND_DIST_INFO_FALSE IMPRIMATUR_COND_DIST_INFO_TRUE IMPRIMATUR_COND_FRENCHSPACING_FALSE IMPRIMATUR_COND_FRENCHSPACING_TRUE IMPRIMATUR_COND_MAKEDOC_FALSE IMPRIMATUR_COND_MAKEDOC_TRUE IMPRIMATUR_MAKEINFOFLAGS RENDITION IMPRIMATUR_MODULE_DIR WORDNET_COND_FALSE WORDNET_COND_TRUE WORDNET_IOPT WORDNET_LOPT PAM_COND_FALSE PAM_COND_TRUE PAM_LIBS LDAP_COND_FALSE LDAP_COND_TRUE LIBDICOSASL BUILD_LIBDICOSASL GSASL_LIBS READLINE_LIBS PCRE_COND_FALSE PCRE_COND_TRUE TK_WISH_COND_FALSE TK_WISH_COND_TRUE WISH PYTHON_COND_FALSE PYTHON_COND_TRUE PYTHON_INCLUDES PYTHON_LIBS PYTHON_CONFIG GUILE_COND_FALSE GUILE_COND_TRUE GUILE_SITE GUILE_TOOLS GUILE_SNARF GUILE_CONFIG GUILE_VERSION_NUMBER GUILE_VERSION GUILE_LIBS GUILE_INCLUDES GINT_COND_SNARF_DOC_FILTER_FALSE GINT_COND_SNARF_DOC_FILTER_TRUE GINT_COND_DOC_FALSE GINT_COND_DOC_TRUE GINT_COND_INC_FALSE GINT_COND_INC_TRUE GINT_MODULE_DIR GRECS_INCLUDE_DIR GRECS_DISTDOC GRECS_HOST_PROJECT_INCLUDES GRECS_README GRECS_DISTCK_AT GRECS_CHANGELOG GRECS_DOCDIR GRECS_LDADD GRECS_TESTDIR GRECS_INCLUDES GRECS_BUILD_AUX GRECS_SRCDIR GRECS_COND_INSTALLHEADERS_FALSE GRECS_COND_INSTALLHEADERS_TRUE GRECS_COND_GIT_PARSER_FALSE GRECS_COND_GIT_PARSER_TRUE GRECS_COND_BIND_PARSER_FALSE GRECS_COND_BIND_PARSER_TRUE GRECS_COND_META1_PARSER_FALSE GRECS_COND_META1_PARSER_TRUE AUTOM4TE PP_SETUP_FILE PPBIN DEFAULT_PREPROCESSOR GRECS_SUBDIR DEFAULT_DICT_SERVER LOG_FACILITY LIBZ POSUB INTLLIBS INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS LTLIBICONV LIBICONV LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS gltests_WITNESS REPLACE_ISWCNTRL HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H NEXT_WCTYPE_H HAVE_ISWCNTRL REPLACE_ISWBLANK HAVE_WCTRANS_T HAVE_WCTYPE_T HAVE_ISWBLANK GNULIB_TOWCTRANS GNULIB_WCTRANS GNULIB_ISWCTYPE GNULIB_WCTYPE GNULIB_ISWBLANK HAVE_WINT_T NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H HAVE_FEATURES_H HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP HAVE_DECL_LOCALTIME_R GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME GNULIB_NANOSLEEP GNULIB_MKTIME SYSEXITS_H HAVE_SYSEXITS_H NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H NEXT_SYSEXITS_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H STDDEF_H HAVE_WCHAR_T REPLACE_NULL LIBSOCKET UNDEFINE_STRTOK_R REPLACE_STRTOK_R REPLACE_STRSIGNAL REPLACE_STRNLEN REPLACE_STRNDUP REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL HAVE_DECL_STRERROR_R HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP HAVE_STRPBRK HAVE_DECL_STRNLEN HAVE_DECL_STRNDUP HAVE_DECL_STRDUP HAVE_STRCHRNUL HAVE_STPNCPY HAVE_STPCPY HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MEMCHR HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL GNULIB_STRERROR_R GNULIB_STRERROR GNULIB_MBSTOK_R GNULIB_MBSSEP GNULIB_MBSSPN GNULIB_MBSPBRK GNULIB_MBSCSPN GNULIB_MBSCASESTR GNULIB_MBSPCASECMP GNULIB_MBSNCASECMP GNULIB_MBSCASECMP GNULIB_MBSSTR GNULIB_MBSRCHR GNULIB_MBSCHR GNULIB_MBSNLEN GNULIB_MBSLEN GNULIB_STRTOK_R GNULIB_STRCASESTR GNULIB_STRSTR GNULIB_STRSEP GNULIB_STRPBRK GNULIB_STRNLEN GNULIB_STRNDUP GNULIB_STRNCAT GNULIB_STRDUP GNULIB_STRCHRNUL GNULIB_STPNCPY GNULIB_STPCPY GNULIB_RAWMEMCHR GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA REPLACE_WCTOMB REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC REPLACE_PUTENV REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC REPLACE_CANONICALIZE_FILE_NAME REPLACE_CALLOC HAVE_DECL_UNSETENV HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD HAVE_DECL_SETENV HAVE_SETENV HAVE_RPMATCH HAVE_REALPATH HAVE_RANDOM_R HAVE_RANDOM_H HAVE_PTSNAME HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME HAVE_ATOLL HAVE__EXIT GNULIB_WCTOMB GNULIB_UNSETENV GNULIB_UNLOCKPT GNULIB_SYSTEM_POSIX GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_PUTENV GNULIB_PTSNAME GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP GNULIB_MBTOWC GNULIB_MALLOC_POSIX GNULIB_GRANTPT GNULIB_GETSUBOPT GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT LOCALCHARSET_TESTS_ENVIRONMENT GLIBC21 HAVE_LANGINFO_YESEXPR HAVE_LANGINFO_ERA HAVE_LANGINFO_T_FMT_AMPM HAVE_LANGINFO_CODESET HAVE_LANGINFO_H NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H NEXT_LANGINFO_H REPLACE_NL_LANGINFO HAVE_NL_LANGINFO GNULIB_NL_LANGINFO UINT64_MAX_EQ_ULONG_MAX UINT32_MAX_LT_UINTMAX_MAX INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX PRIPTR_PREFIX NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H NEXT_INTTYPES_H HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV HAVE_DECL_IMAXABS GNULIB_STRTOUMAX GNULIB_STRTOIMAX GNULIB_IMAXDIV GNULIB_IMAXABS PRI_MACROS_BROKEN STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX PTRDIFF_T_SUFFIX HAVE_SIGNED_WINT_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_SIG_ATOMIC_T BITSIZEOF_WINT_T BITSIZEOF_WCHAR_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_PTRDIFF_T APPLE_UNIVERSAL_BUILD HAVE_SYS_BITYPES_H HAVE_SYS_INTTYPES_H HAVE_STDINT_H NEXT_AS_FIRST_DIRECTIVE_STDINT_H NEXT_STDINT_H HAVE_SYS_TYPES_H HAVE_INTTYPES_H HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT HAVE__BOOL STDBOOL_H NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H REPLACE_GETTIMEOFDAY HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL HAVE_GETTIMEOFDAY GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H GETHOSTNAME_LIB HAVE_NETDB_H NEXT_AS_FIRST_DIRECTIVE_NETDB_H NEXT_NETDB_H HAVE_DECL_GETNAMEINFO HAVE_DECL_GETADDRINFO HAVE_DECL_GAI_STRERROR HAVE_DECL_FREEADDRINFO HAVE_STRUCT_ADDRINFO GNULIB_GETADDRINFO HAVE_WINSOCK2_H HAVE_WS2TCPIP_H HAVE_SYS_SOCKET_H NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H NEXT_SYS_SOCKET_H HAVE_ACCEPT4 HAVE_SA_FAMILY_T HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY HAVE_STRUCT_SOCKADDR_STORAGE GNULIB_ACCEPT4 GNULIB_SHUTDOWN GNULIB_SETSOCKOPT GNULIB_SENDTO GNULIB_RECVFROM GNULIB_SEND GNULIB_RECV GNULIB_LISTEN GNULIB_GETSOCKOPT GNULIB_GETSOCKNAME GNULIB_GETPEERNAME GNULIB_BIND GNULIB_ACCEPT GNULIB_CONNECT GNULIB_SOCKET UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R REPLACE_GETDOMAINNAME REPLACE_GETCWD REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R HAVE_DECL_GETDOMAINNAME HAVE_DECL_FCHDIR HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE HAVE_PREAD HAVE_PIPE2 HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT HAVE_EUIDACCESS HAVE_DUP3 HAVE_DUP2 HAVE_CHOWN GNULIB_WRITE GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_GETOPT GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 GNULIB_PIPE GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN GNULIB_GETHOSTNAME GNULIB_GETGROUPS GNULIB_GETDTABLESIZE GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 GNULIB_CLOSE GNULIB_CHOWN REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF REPLACE_VFPRINTF REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_TMPFILE REPLACE_STDIO_WRITE_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT REPLACE_RENAME REPLACE_REMOVE REPLACE_PRINTF REPLACE_POPEN REPLACE_PERROR REPLACE_OBSTACK_PRINTF REPLACE_GETLINE REPLACE_GETDELIM REPLACE_FTELLO REPLACE_FTELL REPLACE_FSEEKO REPLACE_FSEEK REPLACE_FREOPEN REPLACE_FPURGE REPLACE_FPRINTF REPLACE_FOPEN REPLACE_FFLUSH REPLACE_FCLOSE REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT HAVE_FTELLO HAVE_FSEEKO HAVE_DPRINTF HAVE_DECL_VSNPRINTF HAVE_DECL_SNPRINTF HAVE_DECL_OBSTACK_PRINTF HAVE_DECL_GETLINE HAVE_DECL_GETDELIM HAVE_DECL_FTELLO HAVE_DECL_FSEEKO HAVE_DECL_FPURGE GNULIB_VSPRINTF_POSIX GNULIB_VSNPRINTF GNULIB_VPRINTF_POSIX GNULIB_VPRINTF GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF GNULIB_VASPRINTF GNULIB_TMPFILE GNULIB_STDIO_H_SIGPIPE GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF GNULIB_RENAMEAT GNULIB_RENAME GNULIB_REMOVE GNULIB_PUTS GNULIB_PUTCHAR GNULIB_PUTC GNULIB_PRINTF_POSIX GNULIB_PRINTF GNULIB_POPEN GNULIB_PERROR GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF GNULIB_GETLINE GNULIB_GETDELIM GNULIB_FWRITE GNULIB_FTELLO GNULIB_FTELL GNULIB_FSEEKO GNULIB_FSEEK GNULIB_FREOPEN GNULIB_FPUTS GNULIB_FPUTC GNULIB_FPURGE GNULIB_FPRINTF_POSIX GNULIB_FPRINTF GNULIB_FOPEN GNULIB_FFLUSH GNULIB_FCLOSE GNULIB_DPRINTF FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H EOVERFLOW_VALUE EOVERFLOW_HIDDEN ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT pkglibexecdir lispdir LOCALE_FR REPLACE_WCSWIDTH REPLACE_WCWIDTH REPLACE_WCSNRTOMBS REPLACE_WCSRTOMBS REPLACE_WCRTOMB REPLACE_MBSNRTOWCS REPLACE_MBSRTOWCS REPLACE_MBRLEN REPLACE_MBRTOWC REPLACE_MBSINIT REPLACE_WCTOB REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB HAVE_WCSWIDTH HAVE_WCSTOK HAVE_WCSSTR HAVE_WCSPBRK HAVE_WCSSPN HAVE_WCSCSPN HAVE_WCSRCHR HAVE_WCSCHR HAVE_WCSDUP HAVE_WCSXFRM HAVE_WCSCOLL HAVE_WCSNCASECMP HAVE_WCSCASECMP HAVE_WCSNCMP HAVE_WCSCMP HAVE_WCSNCAT HAVE_WCSCAT HAVE_WCPNCPY HAVE_WCSNCPY HAVE_WCPCPY HAVE_WCSCPY HAVE_WCSNLEN HAVE_WCSLEN HAVE_WMEMSET HAVE_WMEMMOVE HAVE_WMEMCPY HAVE_WMEMCMP HAVE_WMEMCHR HAVE_WCSNRTOMBS HAVE_WCSRTOMBS HAVE_WCRTOMB HAVE_MBSNRTOWCS HAVE_MBSRTOWCS HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC GNULIB_WCSWIDTH GNULIB_WCSTOK GNULIB_WCSSTR GNULIB_WCSPBRK GNULIB_WCSSPN GNULIB_WCSCSPN GNULIB_WCSRCHR GNULIB_WCSCHR GNULIB_WCSDUP GNULIB_WCSXFRM GNULIB_WCSCOLL GNULIB_WCSNCASECMP GNULIB_WCSCASECMP GNULIB_WCSNCMP GNULIB_WCSCMP GNULIB_WCSNCAT GNULIB_WCSCAT GNULIB_WCPNCPY GNULIB_WCSNCPY GNULIB_WCPCPY GNULIB_WCSCPY GNULIB_WCSNLEN GNULIB_WCSLEN GNULIB_WMEMSET GNULIB_WMEMMOVE GNULIB_WMEMCPY GNULIB_WMEMCMP GNULIB_WMEMCHR GNULIB_WCWIDTH GNULIB_WCSNRTOMBS GNULIB_WCSRTOMBS GNULIB_WCRTOMB GNULIB_MBSNRTOWCS GNULIB_MBSRTOWCS GNULIB_MBRLEN GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE LTDLOPEN LT_CONFIG_H CONVENIENCE_LTDL_FALSE CONVENIENCE_LTDL_TRUE INSTALL_LTDL_FALSE INSTALL_LTDL_TRUE ARGZ_H sys_symbol_underscore LIBADD_DL LT_DLPREOPEN LIBADD_DLD_LINK LIBADD_SHL_LOAD LIBADD_DLOPEN LT_DLLOADERS INCLTDL LTDLINCL LTDLDEPS LIBLTDL OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL LEXLIB LEX_OUTPUT_ROOT LEX YFLAGS YACC EGREP GREP CPP host_os host_vendor host_cpu host build_os build_vendor build_cpu build RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC DICO_MODDIR AM_BACKSLASH AM_DEFAULT_VERBOSITY am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL GINT_LDADD GINT_INCLUDES' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_included_ltdl with_ltdl_include with_ltdl_lib enable_ltdl_install with_included_regex enable_rpath with_libiconv_prefix enable_nls with_libintl_prefix with_preprocessor with_guile with_guile_site_dir with_python with_tk with_pcre with_autologin_file with_readline with_gsasl with_ldap enable_pam with_wordnet ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP YACC YFLAGS LOG_FACILITY DEFAULT_DICT_SERVER DEFAULT_PREPROCESSOR PYTHON_CONFIG' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$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 ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 | -n) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 <<_ACEOF \`configure' configures GNU dico 2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dico] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --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 System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of GNU dico 2.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-ltdl-install install libltdl --disable-rpath do not hardcode runtime library paths --disable-nls do not use Native Language Support --enable-pam enable PAM Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-included-ltdl use the GNU ltdl sources included here --with-ltdl-include=DIR use the ltdl headers installed in DIR --with-ltdl-lib=DIR use the libltdl.la installed in DIR --without-included-regex don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems). --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --without-preprocessor do not use external preprocessor --with-guile compile with Guile support (default) --with-guile-site-dir=DIR specify directory to install guile modules to --without-python do not build Python interface --with-tk build Tcl/Tk-based applications (GCIDER) --with-pcre compile Perl-compatible regular expressions support --with-autologin-file[=INTL] Use the autologin file (default INTL is .dicologin) --without-readline do not use readline --with-gsasl use libgsasl for SASL authentication --with-ldap Configure to work with OpenLDAP --with-wordnet[=DIR] use wordnet Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. LOG_FACILITY Default syslog facility DEFAULT_DICT_SERVER Set the name of the default DICT server for dico utility DEFAULT_PREPROCESSOR Set default preprocessor name PYTHON_CONFIG The name of python-config binary Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF GNU dico configure 2.2 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU dico $as_me 2.2, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi ac_func_list="$ac_func_list btowc" ac_func_list="$ac_func_list getdelim" ac_header_list="$ac_header_list sys/socket.h" ac_header_list="$ac_header_list netdb.h" ac_header_list="$ac_header_list sys/param.h" gl_getopt_required=GNU ac_header_list="$ac_header_list getopt.h" ac_header_list="$ac_header_list stdio_ext.h" ac_header_list="$ac_header_list termios.h" ac_func_list="$ac_func_list __fsetlocking" ac_func_list="$ac_func_list tcgetattr" ac_func_list="$ac_func_list tcsetattr" ac_header_list="$ac_header_list sys/time.h" ac_func_list="$ac_func_list gettimeofday" ac_header_list="$ac_header_list wchar.h" ac_header_list="$ac_header_list stdint.h" ac_header_list="$ac_header_list inttypes.h" ac_header_list="$ac_header_list langinfo.h" ac_func_list="$ac_func_list mbsinit" ac_func_list="$ac_func_list mbrtowc" ac_header_list="$ac_header_list sys/mman.h" ac_func_list="$ac_func_list mprotect" ac_func_list="$ac_func_list memchr" ac_func_list="$ac_func_list nl_langinfo" ac_func_list="$ac_func_list isblank" ac_func_list="$ac_func_list iswctype" ac_func_list="$ac_func_list wcscoll" ac_func_list="$ac_func_list tzset" ac_header_list="$ac_header_list sysexits.h" ac_func_list="$ac_func_list localtime_r" ac_header_list="$ac_header_list unistd.h" ac_func_list="$ac_func_list vasnprintf" ac_header_list="$ac_header_list features.h" ac_func_list="$ac_func_list wcrtomb" ac_func_list="$ac_func_list iswcntrl" ac_header_list="$ac_header_list wctype.h" gt_needs="$gt_needs need-formatstring-macros" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; 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 elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # 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 # AmigaOS /C/install, which installs bootblocks on floppy discs # 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /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 for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&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}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;} { (exit 1); exit 1; }; };; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} { (exit 1); exit 1; }; };; esac # 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" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $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". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } 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" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dico' VERSION='2.2' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} { $as_echo "$as_me:$LINENO: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' _am_tools=${am_cv_prog_tar_ustar-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if test "${am_cv_prog_tar_ustar+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:$LINENO: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac AM_BACKSLASH='\' DICO_MODDIR='$(libdir)/$(PACKAGE)' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_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 $# != 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 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&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 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else 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 <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else 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 <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #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)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 $as_echo_n "checking minix/config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 $as_echo_n "checking minix/config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 $as_echo_n "checking for minix/config.h... " >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 $as_echo "$ac_cv_header_minix_config_h" >&6; } fi if test "x$ac_cv_header_minix_config_h" = x""yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi case "$host_os" in hpux*) cat >>confdefs.h <<\_ACEOF #define _XOPEN_SOURCE 500 _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _TANDEM_SOURCE 1 _ACEOF { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if test "${ac_cv_sys_largefile_source+set}" = set; then $as_echo_n "(cached) " >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_sys_largefile_source=no; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_sys_largefile_source=1; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then cat >>confdefs.h <<\_ACEOF #define HAVE_FSEEKO 1 _ACEOF fi # Code from module alignof: # Code from module alloca-opt: # Code from module arg-nonnull: # Code from module bitrotate: # Code from module btowc: # Code from module c++defs: # Code from module c-ctype: # Code from module c-strcase: # Code from module close-hook: # Code from module configmake: # Code from module crypto/des: # Code from module crypto/md5: # Code from module crypto/sha1: # Code from module errno: # Code from module exitfail: # Code from module extensions: # Code from module float: # Code from module fprintftime: # Code from module fseeko: # Code from module getdelim: # Code from module getdomainname: # Code from module gethostname: # Code from module getline: # Code from module getopt: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module getpass-gnu: # Code from module gettext-h: # Code from module gettimeofday: # Code from module hash: # Code from module ignore-value: # Code from module include_next: # Code from module inline: # Code from module intprops: # Code from module inttostr: # Code from module inttypes: # Code from module langinfo: # Code from module localcharset: # Code from module lseek: # Code from module malloc: # Code from module malloc-gnu: # Code from module malloc-posix: # Code from module mbrtowc: # Code from module mbsinit: # Code from module mbtowc: # Code from module memchr: # Code from module multiarch: # Code from module netdb: # Code from module nl_langinfo: # Code from module obstack: # Code from module quote: # Code from module quotearg: # Code from module quotearg-simple: # Code from module realloc: # Code from module realloc-gnu: # Code from module realloc-posix: # Code from module regex: # Code from module size_max: # Code from module snprintf: # Code from module socketlib: # Code from module sockets: # Code from module socklen: # Code from module ssize_t: # Code from module stdbool: # Code from module stddef: # Code from module stdint: # Code from module stdio: # Code from module stdlib: # Code from module streq: # Code from module strerror: # Code from module strftime: # Code from module string: # Code from module strtoimax: # Code from module strtol: # Code from module strtoll: # Code from module strtoul: # Code from module strtoull: # Code from module strtoumax: # Code from module sys_socket: # Code from module sys_time: # Code from module sysexits: # Code from module time: # Code from module time_r: # Code from module unistd: # Code from module vasnprintf: # Code from module vasprintf: # Code from module verify: # Code from module warn-on-use: # Code from module wchar: # Code from module wcrtomb: # Code from module wctype-h: # Code from module xalloc: # Code from module xgetdomainname: # Code from module xgethostname: # Code from module xsize: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:$LINENO: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LEX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:$LINENO: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 $as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:$LINENO: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if test "${ac_cv_lib_lex+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_lex=$ac_lib else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_prog_lex_yytext_pointer=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.7a' macro_revision='1.3121' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. 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' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:$LINENO: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`print -r -- -n 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:$LINENO: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:$LINENO: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:$LINENO: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-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 "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_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 # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_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 extended 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. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_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]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # 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]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && 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 $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" 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 $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; 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" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&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 ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:$LINENO: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if test "${lt_cv_ld_force_load+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Set options enable_dlopen=yes enable_win32_dll=no # Check whether --enable-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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF 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 # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_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 _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_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 _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&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 { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # 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 extended regexp 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_|_GLOBAL__F[ID]_.*' # 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. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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 "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_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. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= 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 $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : 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 ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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 # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''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$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; 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 $linker_flags /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 $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:$LINENO: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if test "${lt_cv_prog_compiler__b+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 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 $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if test "${lt_cv_archive_cmds_need_lc+set}" = set; then $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" 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" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) 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. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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=`func_echo_all "$lib" | $SED '\''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' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH 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" # 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* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 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}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then lt_cv_shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH 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" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$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.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent 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 "$_LT_TAGVAR(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 { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; 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 if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* 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 #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* 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 #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 12887 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) void fnord () __attribute__((visibility("default"))); #endif void fnord () { int i=42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 12993 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) void fnord () __attribute__((visibility("default"))); #endif void fnord () { int i=42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; 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 striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&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 ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:$LINENO: checking which extension is used for runtime loadable modules" >&5 $as_echo_n "checking which extension is used for runtime loadable modules... " >&6; } if test "${libltdl_cv_shlibext+set}" = set; then $as_echo_n "(cached) " >&6 else module=yes eval libltdl_cv_shlibext=$shrext_cmds fi { $as_echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 $as_echo "$libltdl_cv_shlibext" >&6; } if test -n "$libltdl_cv_shlibext"; then cat >>confdefs.h <<_ACEOF #define LT_MODULE_EXT "$libltdl_cv_shlibext" _ACEOF fi { $as_echo "$as_me:$LINENO: checking which variable specifies run-time module search path" >&5 $as_echo_n "checking which variable specifies run-time module search path... " >&6; } if test "${lt_cv_module_path_var+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_module_path_var="$shlibpath_var" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_module_path_var" >&5 $as_echo "$lt_cv_module_path_var" >&6; } if test -n "$lt_cv_module_path_var"; then cat >>confdefs.h <<_ACEOF #define LT_MODULE_PATH_VAR "$lt_cv_module_path_var" _ACEOF fi { $as_echo "$as_me:$LINENO: checking for the default library search path" >&5 $as_echo_n "checking for the default library search path... " >&6; } if test "${lt_cv_sys_dlsearch_path+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_dlsearch_path" >&5 $as_echo "$lt_cv_sys_dlsearch_path" >&6; } if test -n "$lt_cv_sys_dlsearch_path"; then sys_dlsearch_path= for dir in $lt_cv_sys_dlsearch_path; do if test -z "$sys_dlsearch_path"; then sys_dlsearch_path="$dir" else sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" fi done cat >>confdefs.h <<_ACEOF #define LT_DLSEARCH_PATH "$sys_dlsearch_path" _ACEOF fi LT_DLLOADERS= ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LIBADD_DLOPEN= { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if test "${ac_cv_search_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_dlopen=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_dlopen+set}" = set; then break fi done if test "${ac_cv_search_dlopen+set}" = set; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF if test "$ac_cv_search_dlopen" != "none required" ; then LIBADD_DLOPEN="-ldl" fi libltdl_cv_lib_dl_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_DLFCN_H # include #endif int main () { dlopen(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la" fi fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" for ac_func in dlerror do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$lt_save_LIBS" fi LIBADD_SHL_LOAD= { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* 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 #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" LIBADD_SHL_LOAD="-ldld" fi fi case $host_os in darwin[1567].*) # We only want this for pre-Mac OS X 10.4. { $as_echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 $as_echo_n "checking for _dyld_func_lookup... " >&6; } if test "${ac_cv_func__dyld_func_lookup+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _dyld_func_lookup to an innocuous variant, in case declares _dyld_func_lookup. For example, HP-UX 11i declares gettimeofday. */ #define _dyld_func_lookup innocuous__dyld_func_lookup /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _dyld_func_lookup (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _dyld_func_lookup /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _dyld_func_lookup (); /* 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__dyld_func_lookup || defined __stub____dyld_func_lookup choke me #endif int main () { return _dyld_func_lookup (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func__dyld_func_lookup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__dyld_func_lookup=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 $as_echo "$ac_cv_func__dyld_func_lookup" >&6; } if test "x$ac_cv_func__dyld_func_lookup" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DYLD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la" fi ;; beos*) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" ;; cygwin* | mingw* | os2* | pw32*) { $as_echo "$as_me:$LINENO: checking whether cygwin_conv_path is declared" >&5 $as_echo_n "checking whether cygwin_conv_path is declared... " >&6; } if test "${ac_cv_have_decl_cygwin_conv_path+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef cygwin_conv_path (void) cygwin_conv_path; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_cygwin_conv_path=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_cygwin_conv_path=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_cygwin_conv_path" >&5 $as_echo "$ac_cv_have_decl_cygwin_conv_path" >&6; } if test "x$ac_cv_have_decl_cygwin_conv_path" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CYGWIN_CONV_PATH 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CYGWIN_CONV_PATH 0 _ACEOF fi LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" ;; esac { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DLD 1 _ACEOF LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la" fi LT_DLPREOPEN= if test -n "$LT_DLLOADERS" then for lt_loader in $LT_DLLOADERS; do LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " done cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDLLOADER 1 _ACEOF fi LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 $as_echo_n "checking for _ prefix in compiled symbols... " >&6; } if test "${lt_cv_sys_symbol_underscore+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <<_LT_EOF void nm_test_func(){} int main(){nm_test_func;return 0;} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. ac_nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then lt_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "configure: failed program was:" >&5 cat conftest.c >&5 fi rm -rf conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_symbol_underscore" >&5 $as_echo "$lt_cv_sys_symbol_underscore" >&6; } sys_symbol_underscore=$lt_cv_sys_symbol_underscore if test x"$lt_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then { $as_echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 $as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; } if test "${libltdl_cv_need_uscore+set}" = set; then $as_echo_n "(cached) " >&6 else libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" if test "$cross_compiling" = yes; then : libltdl_cv_need_uscore=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 14154 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) void fnord () __attribute__((visibility("default"))); #endif void fnord () { int i=42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; x$lt_dlunknown|x*) ;; esac else : # compilation failed fi fi rm -fr conftest* LIBS="$save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 $as_echo "$libltdl_cv_need_uscore" >&6; } fi fi if test x"$libltdl_cv_need_uscore" = xyes; then cat >>confdefs.h <<\_ACEOF #define NEED_USCORE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 $as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; } if test "${lt_cv_sys_dlopen_deplibs+set}" = set; then $as_echo_n "(cached) " >&6 else # PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. lt_cv_sys_dlopen_deplibs=unknown case $host_os in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. lt_cv_sys_dlopen_deplibs=unknown ;; aix[4-9]*) lt_cv_sys_dlopen_deplibs=yes ;; amigaos*) case $host_cpu in powerpc) lt_cv_sys_dlopen_deplibs=no ;; esac ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat lt_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) lt_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu) # GNU and its variants, using gnu ld.so (Glibc) lt_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) lt_cv_sys_dlopen_deplibs=yes ;; interix*) lt_cv_sys_dlopen_deplibs=yes ;; irix[12345]*|irix6.[01]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. lt_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. lt_cv_sys_dlopen_deplibs=yes ;; netbsd*) lt_cv_sys_dlopen_deplibs=yes ;; openbsd*) lt_cv_sys_dlopen_deplibs=yes ;; osf[1234]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explicitly say `no'. lt_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. lt_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. lt_cv_sys_dlopen_deplibs=yes ;; qnx*) lt_cv_sys_dlopen_deplibs=yes ;; solaris*) lt_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_dlopen_deplibs" >&5 $as_echo "$lt_cv_sys_dlopen_deplibs" >&6; } if test "$lt_cv_sys_dlopen_deplibs" != yes; then cat >>confdefs.h <<\_ACEOF #define LTDL_DLOPEN_DEPLIBS 1 _ACEOF fi : for ac_header in argz.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for error_t" >&5 $as_echo_n "checking for error_t... " >&6; } if test "${ac_cv_type_error_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_error_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(HAVE_ARGZ_H) # include #endif int main () { if (sizeof (error_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(HAVE_ARGZ_H) # include #endif int main () { if (sizeof ((error_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_error_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 $as_echo "$ac_cv_type_error_t" >&6; } if test "x$ac_cv_type_error_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ERROR_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define error_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define __error_t_defined 1 _ACEOF fi ARGZ_H= for ac_func in argz_add argz_append argz_count argz_create_sep argz_insert \ argz_next argz_stringify do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else ARGZ_H=argz.h; _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext" fi done if test -z "$ARGZ_H"; then { $as_echo "$as_me:$LINENO: checking if argz actually works" >&5 $as_echo_n "checking if argz actually works... " >&6; } if test "${lt_cv_sys_argz_works+set}" = set; then $as_echo_n "(cached) " >&6 else case $host_os in #( *cygwin*) lt_cv_sys_argz_works=no if test "$cross_compiling" != no; then lt_cv_sys_argz_works="guessing no" else lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' save_IFS=$IFS IFS=-. set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` IFS=$save_IFS lt_os_major=${2-0} lt_os_minor=${3-0} lt_os_micro=${4-0} if test "$lt_os_major" -gt 1 \ || { test "$lt_os_major" -eq 1 \ && { test "$lt_os_minor" -gt 5 \ || { test "$lt_os_minor" -eq 5 \ && test "$lt_os_micro" -gt 24; }; }; }; then lt_cv_sys_argz_works=yes fi fi ;; #( *) lt_cv_sys_argz_works=yes ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_argz_works" >&5 $as_echo "$lt_cv_sys_argz_works" >&6; } if test $lt_cv_sys_argz_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_ARGZ 1 _ACEOF else ARGZ_H=argz.h _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext" fi fi { $as_echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 $as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; } if test "${libltdl_cv_preloaded_symbols+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi fi { $as_echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 $as_echo "$libltdl_cv_preloaded_symbols" >&6; } if test x"$libltdl_cv_preloaded_symbols" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PRELOADED_SYMBOLS 1 _ACEOF fi # Set options # Check whether --with-included_ltdl was given. if test "${with_included_ltdl+set}" = set; then withval=$with_included_ltdl; fi if test "x$with_included_ltdl" != xyes; then # We are not being forced to use the included libltdl sources, so # decide whether there is a useful installed version we can use. { $as_echo "$as_me:$LINENO: checking for ltdl.h" >&5 $as_echo_n "checking for ltdl.h... " >&6; } if test "${ac_cv_header_ltdl_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_ltdl_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_ltdl_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ltdl_h" >&5 $as_echo "$ac_cv_header_ltdl_h" >&6; } if test "x$ac_cv_header_ltdl_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking whether lt_dlinterface_register is declared" >&5 $as_echo_n "checking whether lt_dlinterface_register is declared... " >&6; } if test "${ac_cv_have_decl_lt_dlinterface_register+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include int main () { #ifndef lt_dlinterface_register (void) lt_dlinterface_register; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_lt_dlinterface_register=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_lt_dlinterface_register=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_lt_dlinterface_register" >&5 $as_echo "$ac_cv_have_decl_lt_dlinterface_register" >&6; } if test "x$ac_cv_have_decl_lt_dlinterface_register" = x""yes; then { $as_echo "$as_me:$LINENO: checking for lt_dladvise_preload in -lltdl" >&5 $as_echo_n "checking for lt_dladvise_preload in -lltdl... " >&6; } if test "${ac_cv_lib_ltdl_lt_dladvise_preload+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lltdl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lt_dladvise_preload (); int main () { return lt_dladvise_preload (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ltdl_lt_dladvise_preload=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ltdl_lt_dladvise_preload=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dladvise_preload" >&5 $as_echo "$ac_cv_lib_ltdl_lt_dladvise_preload" >&6; } if test "x$ac_cv_lib_ltdl_lt_dladvise_preload" = x""yes; then with_included_ltdl=no else with_included_ltdl=yes fi else with_included_ltdl=yes fi else with_included_ltdl=yes fi fi # Check whether --with-ltdl_include was given. if test "${with_ltdl_include+set}" = set; then withval=$with_ltdl_include; fi if test -n "$with_ltdl_include"; then if test -f "$with_ltdl_include/ltdl.h"; then : else { { $as_echo "$as_me:$LINENO: error: invalid ltdl include directory: \`$with_ltdl_include'" >&5 $as_echo "$as_me: error: invalid ltdl include directory: \`$with_ltdl_include'" >&2;} { (exit 1); exit 1; }; } fi else with_ltdl_include=no fi # Check whether --with-ltdl_lib was given. if test "${with_ltdl_lib+set}" = set; then withval=$with_ltdl_lib; fi if test -n "$with_ltdl_lib"; then if test -f "$with_ltdl_lib/libltdl.la"; then : else { { $as_echo "$as_me:$LINENO: error: invalid ltdl library directory: \`$with_ltdl_lib'" >&5 $as_echo "$as_me: error: invalid ltdl library directory: \`$with_ltdl_lib'" >&2;} { (exit 1); exit 1; }; } fi else with_ltdl_lib=no fi case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in ,yes,no,no,) case $enable_ltdl_convenience in no) { { $as_echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5 $as_echo "$as_me: error: this package needs a convenience libltdl" >&2;} { (exit 1); exit 1; }; } ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ;; ,no,no,no,) # If the included ltdl is not to be used, then use the # preinstalled libltdl we found. cat >>confdefs.h <<\_ACEOF #define HAVE_LTDL 1 _ACEOF LIBLTDL=-lltdl LTDLDEPS= LTDLINCL= ;; ,no*,no,*) { { $as_echo "$as_me:$LINENO: error: \`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" >&5 $as_echo "$as_me: error: \`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" >&2;} { (exit 1); exit 1; }; } ;; *) with_included_ltdl=no LIBLTDL="-L$with_ltdl_lib -lltdl" LTDLDEPS= LTDLINCL="-I$with_ltdl_include" ;; esac INCLTDL="$LTDLINCL" # Report our decision... { $as_echo "$as_me:$LINENO: checking where to find libltdl headers" >&5 $as_echo_n "checking where to find libltdl headers... " >&6; } { $as_echo "$as_me:$LINENO: result: $LTDLINCL" >&5 $as_echo "$LTDLINCL" >&6; } { $as_echo "$as_me:$LINENO: checking where to find libltdl library" >&5 $as_echo_n "checking where to find libltdl library... " >&6; } { $as_echo "$as_me:$LINENO: result: $LIBLTDL" >&5 $as_echo "$LIBLTDL" >&6; } # Check whether --enable-ltdl-install was given. if test "${enable_ltdl_install+set}" = set; then enableval=$enable_ltdl_install; fi case ,${enable_ltdl_install},${enable_ltdl_convenience} in *yes*) ;; *) enable_ltdl_convenience=yes ;; esac if test x"${enable_ltdl_install-no}" != xno; then INSTALL_LTDL_TRUE= INSTALL_LTDL_FALSE='#' else INSTALL_LTDL_TRUE='#' INSTALL_LTDL_FALSE= fi if test x"${enable_ltdl_convenience-no}" != xno; then CONVENIENCE_LTDL_TRUE= CONVENIENCE_LTDL_FALSE='#' else CONVENIENCE_LTDL_TRUE='#' CONVENIENCE_LTDL_FALSE= fi # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS # the user used. This is so that ltdl.h can pick up the parent projects # config.h file, The first file in AC_CONFIG_HEADERS must contain the # definitions required by ltdl.c. # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). for ac_header in unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in closedir opendir readdir do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else _LT_LIBOBJS="$_LT_LIBOBJS lt__dirent.$ac_objext" fi done for ac_func in strlcat strlcpy do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else _LT_LIBOBJS="$_LT_LIBOBJS lt__strl.$ac_objext" fi done cat >>confdefs.h <<_ACEOF #define LT_LIBEXT "$libext" _ACEOF name=ltdl LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` # Only expand once: ac_config_files="$ac_config_files libltdl/Makefile" { $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if test "${ac_cv_lib_socket_socket+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_socket_socket=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5 $as_echo_n "checking for gethostbyaddr in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyaddr (); int main () { return gethostbyaddr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_nsl_gethostbyaddr=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyaddr=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyaddr" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyaddr" >&6; } if test "x$ac_cv_lib_nsl_gethostbyaddr" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi { $as_echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5 $as_echo_n "checking for nanosleep in -lrt... " >&6; } if test "${ac_cv_lib_rt_nanosleep+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_rt_nanosleep=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_rt_nanosleep=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; } if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_opendir=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_opendir=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else 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 <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else 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 <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #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)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h limits.h strings.h sys/time.h \ sys/socket.h socket.h syslog.h unistd.h \ crypt.h readline/readline.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_working_alloca_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # 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); if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_alloca_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # 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=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int 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; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac GNULIB_BTOWC=0; GNULIB_WCTOB=0; GNULIB_MBSINIT=0; GNULIB_MBRTOWC=0; GNULIB_MBRLEN=0; GNULIB_MBSRTOWCS=0; GNULIB_MBSNRTOWCS=0; GNULIB_WCRTOMB=0; GNULIB_WCSRTOMBS=0; GNULIB_WCSNRTOMBS=0; GNULIB_WCWIDTH=0; GNULIB_WMEMCHR=0; GNULIB_WMEMCMP=0; GNULIB_WMEMCPY=0; GNULIB_WMEMMOVE=0; GNULIB_WMEMSET=0; GNULIB_WCSLEN=0; GNULIB_WCSNLEN=0; GNULIB_WCSCPY=0; GNULIB_WCPCPY=0; GNULIB_WCSNCPY=0; GNULIB_WCPNCPY=0; GNULIB_WCSCAT=0; GNULIB_WCSNCAT=0; GNULIB_WCSCMP=0; GNULIB_WCSNCMP=0; GNULIB_WCSCASECMP=0; GNULIB_WCSNCASECMP=0; GNULIB_WCSCOLL=0; GNULIB_WCSXFRM=0; GNULIB_WCSDUP=0; GNULIB_WCSCHR=0; GNULIB_WCSRCHR=0; GNULIB_WCSCSPN=0; GNULIB_WCSSPN=0; GNULIB_WCSPBRK=0; GNULIB_WCSSTR=0; GNULIB_WCSTOK=0; GNULIB_WCSWIDTH=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; HAVE_MBRLEN=1; HAVE_MBSRTOWCS=1; HAVE_MBSNRTOWCS=1; HAVE_WCRTOMB=1; HAVE_WCSRTOMBS=1; HAVE_WCSNRTOMBS=1; HAVE_WMEMCHR=1; HAVE_WMEMCMP=1; HAVE_WMEMCPY=1; HAVE_WMEMMOVE=1; HAVE_WMEMSET=1; HAVE_WCSLEN=1; HAVE_WCSNLEN=1; HAVE_WCSCPY=1; HAVE_WCPCPY=1; HAVE_WCSNCPY=1; HAVE_WCPNCPY=1; HAVE_WCSCAT=1; HAVE_WCSNCAT=1; HAVE_WCSCMP=1; HAVE_WCSNCMP=1; HAVE_WCSCASECMP=1; HAVE_WCSNCASECMP=1; HAVE_WCSCOLL=1; HAVE_WCSXFRM=1; HAVE_WCSDUP=1; HAVE_WCSCHR=1; HAVE_WCSRCHR=1; HAVE_WCSCSPN=1; HAVE_WCSSPN=1; HAVE_WCSPBRK=1; HAVE_WCSSTR=1; HAVE_WCSTOK=1; HAVE_WCSWIDTH=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; REPLACE_BTOWC=0; REPLACE_WCTOB=0; REPLACE_MBSINIT=0; REPLACE_MBRTOWC=0; REPLACE_MBRLEN=0; REPLACE_MBSRTOWCS=0; REPLACE_MBSNRTOWCS=0; REPLACE_WCRTOMB=0; REPLACE_WCSRTOMBS=0; REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; REPLACE_WCSWIDTH=0; { $as_echo "$as_me:$LINENO: checking whether uses 'inline' correctly" >&5 $as_echo_n "checking whether uses 'inline' correctly... " >&6; } if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_wchar_h_correct_inline=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include extern int zero (void); int main () { return zero(); } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.$ac_objext conftest1.$ac_objext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int zero (void) { return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then : else gl_cv_header_wchar_h_correct_inline=no fi fi fi rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_correct_inline" >&5 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } if test $gl_cv_header_wchar_h_correct_inline = no; then { { $as_echo "$as_me:$LINENO: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." >&5 $as_echo "$as_me: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." >&2;} { (exit 1); exit 1; }; } fi for ac_func in $ac_func_list do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if test "${am_cv_langinfo_codeset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_langinfo_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_langinfo_codeset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } if test "${gt_cv_locale_fr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Win32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the native Win32 locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else # None found. gt_cv_locale_fr=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO-8859-1 else # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.ISO8859-1 else # Test for the HP-UX locale name. if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr_FR.iso88591 else # Test for the Solaris 7 locale name. if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=fr else # None found. gt_cv_locale_fr=none fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5 $as_echo "$gt_cv_locale_fr" >&6; } LOCALE_FR=$gt_cv_locale_fr { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # Check for potential -arch flags. It is not universal unless # there are some -arch flags. Note that *ppc* also matches # ppc64. This check is also rather less than ideal. case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; esac else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to _BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then # Try to guess by grepping values from an object file. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; #( no) ;; #( universal) cat >>confdefs.h <<\_ACEOF #define AC_APPLE_UNIVERSAL_BUILD 1 _ACEOF ;; #( *) { { $as_echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 $as_echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac { $as_echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if test "${gl_cv_have_include_next+set}" = set; then $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat < conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include #include_next #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat < conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_have_include_next=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat >conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_have_include_next=buggy else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { $as_echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 $as_echo "$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi { $as_echo "$as_me:$LINENO: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } if test "${gl_cv_pragma_columns+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __TANDEM choke me #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "choke me" >/dev/null 2>&1; then gl_cv_pragma_columns=yes else gl_cv_pragma_columns=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_pragma_columns" >&5 $as_echo "$gl_cv_pragma_columns" >&6; } if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi { $as_echo "$as_me:$LINENO: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } if test "${gl_cv_header_errno_h_complete+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if !defined ENOMSG booboo #endif #if !defined EIDRM booboo #endif #if !defined ENOLINK booboo #endif #if !defined EPROTO booboo #endif #if !defined EMULTIHOP booboo #endif #if !defined EBADMSG booboo #endif #if !defined EOVERFLOW booboo #endif #if !defined ENOTSUP booboo #endif #if !defined ESTALE booboo #endif #if !defined EDQUOT booboo #endif #if !defined ECANCELED booboo #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "booboo" >/dev/null 2>&1; then gl_cv_header_errno_h_complete=no else gl_cv_header_errno_h_complete=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_complete" >&5 $as_echo "$gl_cv_header_errno_h_complete" >&6; } if test $gl_cv_header_errno_h_complete = yes; then ERRNO_H='' else if test $gl_cv_have_include_next = yes; then gl_cv_next_errno_h='<'errno.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_errno_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/errno.h#{ s#.*"\(.*/errno.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_errno_h" >&5 $as_echo "$gl_cv_next_errno_h" >&6; } fi NEXT_ERRNO_H=$gl_cv_next_errno_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_errno_h fi NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive ERRNO_H='errno.h' fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=yes else gl_cv_header_errno_h_EMULTIHOP=no fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EMULTIHOP yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EMULTIHOP=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EMULTIHOP; } static unsigned long int ulongval () { return EMULTIHOP; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EMULTIHOP) < 0) { long int i = longval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (EMULTIHOP)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } case $gl_cv_header_errno_h_EMULTIHOP in yes | no) EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= ;; *) EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=yes else gl_cv_header_errno_h_ENOLINK=no fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef ENOLINK yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_ENOLINK=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_ENOLINK = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return ENOLINK; } static unsigned long int ulongval () { return ENOLINK; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((ENOLINK) < 0) { long int i = longval (); if (i != (ENOLINK)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (ENOLINK)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_ENOLINK=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } case $gl_cv_header_errno_h_ENOLINK in yes | no) ENOLINK_HIDDEN=0; ENOLINK_VALUE= ;; *) ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" ;; esac fi if test -n "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=yes else gl_cv_header_errno_h_EOVERFLOW=no fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include #ifdef EOVERFLOW yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then gl_cv_header_errno_h_EOVERFLOW=hidden fi rm -f conftest* if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include int main () { static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;; '') ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _XOPEN_SOURCE_EXTENDED 1 #include /* The following two lines are a workaround against an autoconf-2.52 bug. */ #include #include static long int longval () { return EOVERFLOW; } static unsigned long int ulongval () { return EOVERFLOW; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((EOVERFLOW) < 0) { long int i = longval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (EOVERFLOW)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } case $gl_cv_header_errno_h_EOVERFLOW in yes | no) EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= ;; *) EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" ;; esac fi GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; GNULIB_FFLUSH=0; GNULIB_FOPEN=0; GNULIB_FPRINTF=0; GNULIB_FPRINTF_POSIX=0; GNULIB_FPURGE=0; GNULIB_FPUTC=0; GNULIB_FPUTS=0; GNULIB_FREOPEN=0; GNULIB_FSEEK=0; GNULIB_FSEEKO=0; GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FWRITE=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; GNULIB_PERROR=0; GNULIB_POPEN=0; GNULIB_PRINTF=0; GNULIB_PRINTF_POSIX=0; GNULIB_PUTC=0; GNULIB_PUTCHAR=0; GNULIB_PUTS=0; GNULIB_REMOVE=0; GNULIB_RENAME=0; GNULIB_RENAMEAT=0; GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; GNULIB_STDIO_H_SIGPIPE=0; GNULIB_TMPFILE=0; GNULIB_VASPRINTF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; GNULIB_VFPRINTF_POSIX=0; GNULIB_VPRINTF=0; GNULIB_VPRINTF_POSIX=0; GNULIB_VSNPRINTF=0; GNULIB_VSPRINTF_POSIX=0; HAVE_DECL_FPURGE=1; HAVE_DECL_FSEEKO=1; HAVE_DECL_FTELLO=1; HAVE_DECL_GETDELIM=1; HAVE_DECL_GETLINE=1; HAVE_DECL_OBSTACK_PRINTF=1; HAVE_DECL_SNPRINTF=1; HAVE_DECL_VSNPRINTF=1; HAVE_DPRINTF=1; HAVE_FSEEKO=1; HAVE_FTELLO=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; REPLACE_DPRINTF=0; REPLACE_FCLOSE=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; REPLACE_FPRINTF=0; REPLACE_FPURGE=0; REPLACE_FREOPEN=0; REPLACE_FSEEK=0; REPLACE_FSEEKO=0; REPLACE_FTELL=0; REPLACE_FTELLO=0; REPLACE_GETDELIM=0; REPLACE_GETLINE=0; REPLACE_OBSTACK_PRINTF=0; REPLACE_PERROR=0; REPLACE_POPEN=0; REPLACE_PRINTF=0; REPLACE_REMOVE=0; REPLACE_RENAME=0; REPLACE_RENAMEAT=0; REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; REPLACE_STDIO_WRITE_FUNCS=0; REPLACE_TMPFILE=0; REPLACE_VASPRINTF=0; REPLACE_VDPRINTF=0; REPLACE_VFPRINTF=0; REPLACE_VPRINTF=0; REPLACE_VSNPRINTF=0; REPLACE_VSPRINTF=0; { $as_echo "$as_me:$LINENO: checking for fseeko" >&5 $as_echo_n "checking for fseeko... " >&6; } if test "${gl_cv_func_fseeko+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { fseeko (stdin, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_fseeko=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_fseeko=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_fseeko" >&5 $as_echo "$gl_cv_func_fseeko" >&6; } { $as_echo "$as_me:$LINENO: checking whether stdin defaults to large file offsets" >&5 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; } if test "${gl_cv_var_stdin_large_offset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if defined __SL64 && defined __SCLE /* cygwin */ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and it is easier to do a version check than building a runtime test. */ # include # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) choke me # endif #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_var_stdin_large_offset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_var_stdin_large_offset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_var_stdin_large_offset" >&5 $as_echo "$gl_cv_var_stdin_large_offset" >&6; } { $as_echo "$as_me:$LINENO: checking whether fseeko is declared" >&5 $as_echo_n "checking whether fseeko is declared... " >&6; } if test "${ac_cv_have_decl_fseeko+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef fseeko (void) fseeko; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_fseeko=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fseeko=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko" >&5 $as_echo "$ac_cv_have_decl_fseeko" >&6; } if test "x$ac_cv_have_decl_fseeko" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FSEEKO 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FSEEKO 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether getdelim is declared" >&5 $as_echo_n "checking whether getdelim is declared... " >&6; } if test "${ac_cv_have_decl_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getdelim (void) getdelim; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getdelim=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getdelim=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5 $as_echo "$ac_cv_have_decl_getdelim" >&6; } if test "x$ac_cv_have_decl_getdelim" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDELIM 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDELIM 0 _ACEOF fi GNULIB_CHOWN=0; GNULIB_CLOSE=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; GNULIB_EUIDACCESS=0; GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; GNULIB_GETDOMAINNAME=0; GNULIB_GETDTABLESIZE=0; GNULIB_GETGROUPS=0; GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN=0; GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; GNULIB_LSEEK=0; GNULIB_PIPE=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_PWRITE=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; GNULIB_UNISTD_H_GETOPT=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; GNULIB_USLEEP=0; GNULIB_WRITE=0; HAVE_CHOWN=1; HAVE_DUP2=1; HAVE_DUP3=1; HAVE_EUIDACCESS=1; HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; HAVE_PIPE=1; HAVE_PIPE2=1; HAVE_PREAD=1; HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_FCHDIR=1; HAVE_DECL_GETDOMAINNAME=1; HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_PWRITE=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; GNULIB_SOCKET=0; GNULIB_CONNECT=0; GNULIB_ACCEPT=0; GNULIB_BIND=0; GNULIB_GETPEERNAME=0; GNULIB_GETSOCKNAME=0; GNULIB_GETSOCKOPT=0; GNULIB_LISTEN=0; GNULIB_RECV=0; GNULIB_SEND=0; GNULIB_RECVFROM=0; GNULIB_SENDTO=0; GNULIB_SETSOCKOPT=0; GNULIB_SHUTDOWN=0; GNULIB_ACCEPT4=0; HAVE_STRUCT_SOCKADDR_STORAGE=1; HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; HAVE_SA_FAMILY_T=1; HAVE_ACCEPT4=1; for ac_header in $ac_header_list do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done case "$host_os" in osf*) cat >>confdefs.h <<\_ACEOF #define _POSIX_PII_SOCKET 1 _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } if test $gl_cv_header_sys_socket_h_selfcontained = yes; then for ac_func in shutdown do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_shutdown = yes; then { $as_echo "$as_me:$LINENO: checking whether defines the SHUT_* macros" >&5 $as_echo_n "checking whether defines the SHUT_* macros... " >&6; } if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_shut=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_shut" >&5 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi fi # We need to check for ws2tcpip.h now. if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_socket_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_socket_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/socket.h#{ s#.*"\(.*/sys/socket.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_socket_h='<'sys/socket.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5 $as_echo "$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/socket.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_socket_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 for ac_header in ws2tcpip.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 $as_echo_n "checking for struct sockaddr_storage... " >&6; } if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_sockaddr_storage=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (struct sockaddr_storage)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((struct sockaddr_storage))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_sockaddr_storage=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; } if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 $as_echo_n "checking for sa_family_t... " >&6; } if test "${ac_cv_type_sa_family_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_sa_family_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (sa_family_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((sa_family_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_sa_family_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5 $as_echo "$ac_cv_type_sa_family_t" >&6; } if test "x$ac_cv_type_sa_family_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SA_FAMILY_T 1 _ACEOF fi if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi if test $ac_cv_type_struct_sockaddr_storage != no; then { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5 $as_echo_n "checking for struct sockaddr_storage.ss_family... " >&6; } if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { static struct sockaddr_storage ac_aggr; if (ac_aggr.ss_family) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_storage_ss_family=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { static struct sockaddr_storage ac_aggr; if (sizeof ac_aggr.ss_family) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_storage_ss_family=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sockaddr_storage_ss_family=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; } if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 _ACEOF else HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 fi fi if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then SYS_SOCKET_H='sys/socket.h' fi if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require prerequisite headers. */ #include #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done GNULIB_GETADDRINFO=0; HAVE_STRUCT_ADDRINFO=1; HAVE_DECL_FREEADDRINFO=1; HAVE_DECL_GAI_STRERROR=1; HAVE_DECL_GETADDRINFO=1; HAVE_DECL_GETNAMEINFO=1; if test $gl_cv_have_include_next = yes; then gl_cv_next_netdb_h='<'netdb.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_netdb_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_netdb_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/netdb.h#{ s#.*"\(.*/netdb.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_netdb_h='<'netdb.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_netdb_h" >&5 $as_echo "$gl_cv_next_netdb_h" >&6; } fi NEXT_NETDB_H=$gl_cv_next_netdb_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'netdb.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_netdb_h fi NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive if test $ac_cv_header_netdb_h = yes; then HAVE_NETDB_H=1 else HAVE_NETDB_H=0 fi for gl_func in getaddrinfo freeaddrinfo gai_strerror getnameinfo; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking whether getline is declared" >&5 $as_echo_n "checking whether getline is declared... " >&6; } if test "${ac_cv_have_decl_getline+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getline (void) getline; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getline=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getline" >&5 $as_echo "$ac_cv_have_decl_getline" >&6; } if test "x$ac_cv_have_decl_getline" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETLINE 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETLINE 0 _ACEOF fi if test $gl_cv_have_include_next = yes; then gl_cv_next_getopt_h='<'getopt.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_getopt_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_getopt_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/getopt.h#{ s#.*"\(.*/getopt.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_getopt_h" >&5 $as_echo "$gl_cv_next_getopt_h" >&6; } fi NEXT_GETOPT_H=$gl_cv_next_getopt_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'getopt.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_getopt_h fi NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi gl_replace_getopt= if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_header in getopt.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_func in getopt_long_only do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:$LINENO: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } if test "${gl_cv_func_getopt_posix+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int *p = &optreset; return optreset; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_optind_min=1 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !getopt_clip; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_optind_min=1 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_optind_min=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" if test "$cross_compiling" = yes; then case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { { int argc = 0; char *argv[10]; int c; argv[argc++] = "program"; argv[argc++] = "-a"; argv[argc++] = "foo"; argv[argc++] = "bar"; argv[argc] = NULL; optind = OPTIND_MIN; opterr = 0; c = getopt (argc, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (argc, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { int argc = 0; char *argv[10]; int c; argv[argc++] = "program"; argv[argc++] = "donald"; argv[argc++] = "-p"; argv[argc++] = "billy"; argv[argc++] = "duck"; argv[argc++] = "-a"; argv[argc++] = "bar"; argv[argc] = NULL; optind = OPTIND_MIN; opterr = 0; c = getopt (argc, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { char *argv[3] = { "program", "-ab", NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_getopt_posix=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_getopt_posix=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CPPFLAGS=$gl_save_CPPFLAGS fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_getopt_posix" >&5 $as_echo "$gl_cv_func_getopt_posix" >&6; } case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:$LINENO: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } if test "${gl_cv_func_getopt_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int result = 0; /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { char *myargv[3]; myargv[0] = "conftest"; myargv[1] = "-+"; myargv[2] = 0; opterr = 0; if (getopt (2, myargv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { char *argv[] = { "program", "-p", "foo", "bar", NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { char *argv[] = { "program", "foo", "-p", NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { char *argv[] = { "program", "-b", "-a", NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } return result; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_getopt_gnu=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_getopt_gnu=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi case $gl_had_POSIXLY_CORRECT in exported) ;; yes) $as_unset POSIXLY_CORRECT || test "${POSIXLY_CORRECT+set}" != set || { POSIXLY_CORRECT=; export POSIXLY_CORRECT; }; POSIXLY_CORRECT=1 ;; *) $as_unset POSIXLY_CORRECT || test "${POSIXLY_CORRECT+set}" != set || { POSIXLY_CORRECT=; export POSIXLY_CORRECT; } ;; esac fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_getopt_gnu" >&5 $as_echo "$gl_cv_func_getopt_gnu" >&6; } if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi { $as_echo "$as_me:$LINENO: checking whether getenv is declared" >&5 $as_echo_n "checking whether getenv is declared... " >&6; } if test "${ac_cv_have_decl_getenv+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getenv (void) getenv; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getenv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getenv=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 $as_echo "$ac_cv_have_decl_getenv" >&6; } if test "x$ac_cv_have_decl_getenv" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV 0 _ACEOF fi if test -n "$gl_replace_getopt"; then GETOPT_H=getopt.h cat >>confdefs.h <<\_ACEOF #define __GETOPT_PREFIX rpl_ _ACEOF GNULIB_UNISTD_H_GETOPT=1 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" fi { $as_echo "$as_me:$LINENO: checking whether getpass is declared" >&5 $as_echo_n "checking whether getpass is declared... " >&6; } if test "${ac_cv_have_decl_getpass+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getpass (void) getpass; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getpass=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getpass=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getpass" >&5 $as_echo "$ac_cv_have_decl_getpass" >&6; } if test "x$ac_cv_have_decl_getpass" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETPASS 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETPASS 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5 $as_echo_n "checking whether fflush_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef fflush_unlocked (void) fflush_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_fflush_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fflush_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5 $as_echo "$ac_cv_have_decl_fflush_unlocked" >&6; } if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FFLUSH_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FFLUSH_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether flockfile is declared" >&5 $as_echo_n "checking whether flockfile is declared... " >&6; } if test "${ac_cv_have_decl_flockfile+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef flockfile (void) flockfile; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_flockfile=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_flockfile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_flockfile" >&5 $as_echo "$ac_cv_have_decl_flockfile" >&6; } if test "x$ac_cv_have_decl_flockfile" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FLOCKFILE 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FLOCKFILE 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 $as_echo_n "checking whether fputs_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef fputs_unlocked (void) fputs_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_fputs_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_fputs_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 $as_echo "$ac_cv_have_decl_fputs_unlocked" >&6; } if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPUTS_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPUTS_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether funlockfile is declared" >&5 $as_echo_n "checking whether funlockfile is declared... " >&6; } if test "${ac_cv_have_decl_funlockfile+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef funlockfile (void) funlockfile; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_funlockfile=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_funlockfile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_funlockfile" >&5 $as_echo "$ac_cv_have_decl_funlockfile" >&6; } if test "x$ac_cv_have_decl_funlockfile" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FUNLOCKFILE 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FUNLOCKFILE 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 $as_echo_n "checking whether putc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef putc_unlocked (void) putc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_putc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_putc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 $as_echo "$ac_cv_have_decl_putc_unlocked" >&6; } if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTC_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_restrict=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) cat >>confdefs.h <<\_ACEOF #define restrict /**/ _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac GNULIB_GETTIMEOFDAY=0; HAVE_GETTIMEOFDAY=1; HAVE_STRUCT_TIMEVAL=1; HAVE_SYS_TIME_H=1; REPLACE_GETTIMEOFDAY=0; if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_time_h='<'sys/time.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_time_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/time.h#{ s#.*"\(.*/sys/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_time_h='<'sys/time.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5 $as_echo "$gl_cv_next_sys_time_h" >&6; } fi NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_time_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive if test $ac_cv_header_sys_time_h != yes; then HAVE_SYS_TIME_H=0 fi { $as_echo "$as_me:$LINENO: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } if test "${gl_cv_sys_struct_timeval+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TIME_H #include #endif #include int main () { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timeval=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timeval=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5 $as_echo "$gl_cv_sys_struct_timeval" >&6; } if test $gl_cv_sys_struct_timeval != yes; then HAVE_STRUCT_TIMEVAL=0 fi for gl_func in gettimeofday; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TIME_H # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if test "${ac_cv_header_stdbool_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdbool_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } { $as_echo "$as_me:$LINENO: checking for _Bool" >&5 $as_echo_n "checking for _Bool... " >&6; } if test "${ac_cv_type__Bool+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type__Bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((_Bool))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 $as_echo "$ac_cv_type__Bool" >&6; } if test "x$ac_cv_type__Bool" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi { $as_echo "$as_me:$LINENO: checking for off_t" >&5 $as_echo_n "checking for off_t... " >&6; } if test "${ac_cv_type_off_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_off_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((off_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 $as_echo "$ac_cv_type_off_t" >&6; } if test "x$ac_cv_type_off_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_unsigned_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many implementations with broken preprocessors. Perhaps this can be revisited in 2012. In the meantime, code should not expect #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 ? 1 : -1)]; int i = 63; int main () { /* Test availability of runtime routines for shift and division. */ long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | (llmax / ll) | (llmax % ll) | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | (ullmax / ull) | (ullmax % ull)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long_int=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } if test $ac_cv_type_unsigned_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG_INT 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if test "${ac_cv_type_long_long_int+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int if test $ac_cv_type_long_long_int = yes; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef LLONG_MAX # define HALF \ (1LL << (sizeof (long long int) * CHAR_BIT - 2)) # define LLONG_MAX (HALF - 1 + HALF) #endif int main () { long long int n = 1; int i; for (i = 0; ; i++) { long long int m = n << i; if (m >> i != n) return 1; if (LLONG_MAX / 2 < m) break; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_type_long_long_int=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } if test $ac_cv_type_long_long_int = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_LONG_INT 1 _ACEOF fi gl_cv_c_multiarch=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then arch= prev= for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do if test -n "$prev"; then case $word in i?86 | x86_64 | ppc | ppc64) if test -z "$arch" || test "$arch" = "$word"; then arch="$word" else gl_cv_c_multiarch=yes fi ;; esac prev= else if test "x$word" = "x-arch"; then prev=arch fi fi done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gl_cv_c_multiarch = yes; then APPLE_UNIVERSAL_BUILD=1 else APPLE_UNIVERSAL_BUILD=0 fi if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if test "$cross_compiling" = yes; then gl_cv_header_working_stdint_h=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_working_stdint_h=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then result=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_signed'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi for ac_header in inttypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_inttypes_h = yes; then { $as_echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } if test "${gt_cv_inttypes_pri_broken+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef PRId32 char *p = PRId32; #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_inttypes_pri_broken=no else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_inttypes_pri_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 $as_echo "$gt_cv_inttypes_pri_broken" >&6; } fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF PRI_MACROS_BROKEN=1 else PRI_MACROS_BROKEN=0 fi { $as_echo "$as_me:$LINENO: checking whether imaxabs is declared" >&5 $as_echo_n "checking whether imaxabs is declared... " >&6; } if test "${ac_cv_have_decl_imaxabs+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef imaxabs (void) imaxabs; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_imaxabs=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_imaxabs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_imaxabs" >&5 $as_echo "$ac_cv_have_decl_imaxabs" >&6; } if test "x$ac_cv_have_decl_imaxabs" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXABS 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXABS 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether imaxdiv is declared" >&5 $as_echo_n "checking whether imaxdiv is declared... " >&6; } if test "${ac_cv_have_decl_imaxdiv+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef imaxdiv (void) imaxdiv; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_imaxdiv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_imaxdiv=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_imaxdiv" >&5 $as_echo "$ac_cv_have_decl_imaxdiv" >&6; } if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXDIV 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IMAXDIV 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether strtoimax is declared" >&5 $as_echo_n "checking whether strtoimax is declared... " >&6; } if test "${ac_cv_have_decl_strtoimax+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strtoimax (void) strtoimax; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strtoimax=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoimax=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoimax" >&5 $as_echo "$ac_cv_have_decl_strtoimax" >&6; } if test "x$ac_cv_have_decl_strtoimax" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOIMAX 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOIMAX 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether strtoumax is declared" >&5 $as_echo_n "checking whether strtoumax is declared... " >&6; } if test "${ac_cv_have_decl_strtoumax+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strtoumax (void) strtoumax; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strtoumax=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoumax=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoumax" >&5 $as_echo "$ac_cv_have_decl_strtoumax" >&6; } if test "x$ac_cv_have_decl_strtoumax" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOUMAX 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOUMAX 0 _ACEOF fi GNULIB_IMAXABS=0; GNULIB_IMAXDIV=0; GNULIB_STRTOIMAX=0; GNULIB_STRTOUMAX=0; HAVE_DECL_IMAXABS=1; HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; GNULIB_NL_LANGINFO=0; HAVE_NL_LANGINFO=1; REPLACE_NL_LANGINFO=0; { $as_echo "$as_me:$LINENO: checking for working fcntl.h" >&5 $as_echo_n "checking for working fcntl.h... " >&6; } if test "${gl_cv_header_working_fcntl_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_header_working_fcntl_h=cross-compiling else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifndef O_NOATIME #define O_NOATIME 0 #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif static int const constants[] = { O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY }; int main () { int result = !constants; { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0) result |= 2; else { int fd = open (sym, O_RDONLY | O_NOFOLLOW); if (fd >= 0) { close (fd); result |= 4; } } unlink (sym); } { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); if (fd < 0) result |= 8; else { struct stat st0; if (fstat (fd, &st0) != 0) result |= 16; else { char c; sleep (1); if (read (fd, &c, 1) != 1) result |= 24; else { if (close (fd) != 0) result |= 32; else { struct stat st1; if (stat (file, &st1) != 0) result |= 40; else if (st0.st_atime != st1.st_atime) result |= 64; } } } } } return result; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_working_fcntl_h=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) case $? in #( 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_fcntl_h" >&5 $as_echo "$gl_cv_header_working_fcntl_h" >&6; } case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOATIME $ac_val _ACEOF case $gl_cv_header_working_fcntl_h in #( *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( *) ac_val=1;; esac cat >>confdefs.h <<_ACEOF #define HAVE_WORKING_O_NOFOLLOW $ac_val _ACEOF { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getc_unlocked (void) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 $as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } if test "${ac_cv_gnu_library_2_1+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif #ifdef __UCLIBC__ Lucky user #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 $as_echo "$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; GNULIB_GRANTPT=0; GNULIB_MALLOC_POSIX=0; GNULIB_MBTOWC=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; GNULIB_PTSNAME=0; GNULIB_PUTENV=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; GNULIB_SYSTEM_POSIX=0; GNULIB_UNLOCKPT=0; GNULIB_UNSETENV=0; GNULIB_WCTOMB=0; HAVE__EXIT=1; HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; HAVE_PTSNAME=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNLOCKPT=1; HAVE_DECL_UNSETENV=1; REPLACE_CALLOC=0; REPLACE_CANONICALIZE_FILE_NAME=0; REPLACE_MALLOC=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; REPLACE_PUTENV=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; REPLACE_UNSETENV=0; REPLACE_WCTOMB=0; { $as_echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } if test "${gl_cv_func_malloc_posix+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_malloc_posix=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_malloc_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_malloc_posix" >&5 $as_echo "$gl_cv_func_malloc_posix" >&6; } { $as_echo "$as_me:$LINENO: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } if test "${ac_cv_type_mbstate_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { mbstate_t x; return sizeof x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_mbstate_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mbstate_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 $as_echo "$ac_cv_type_mbstate_t" >&6; } if test $ac_cv_type_mbstate_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBSTATE_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define mbstate_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } if test "${gt_cv_locale_ja+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Win32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Note that on native Win32, the Japanese locale is Japanese_Japan.932, # and CP932 is very different from EUC-JP, so we cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP else # Test for the locale name with explicit encoding suffix. if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC-JP else # Test for the HP-UX, OSF/1, NetBSD locale name. if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.eucJP else # Test for the IRIX, FreeBSD locale name. if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja_JP.EUC else # Test for the Solaris 7 locale name. if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_ja=ja else # Special test for NetBSD 1.6. if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then gt_cv_locale_ja=ja_JP.eucJP else # None found. gt_cv_locale_ja=none fi fi fi fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5 $as_echo "$gt_cv_locale_ja" >&6; } LOCALE_JA=$gt_cv_locale_ja { $as_echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } if test "${gt_cv_locale_zh_CN+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Win32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; #else if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ #if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } #endif #ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; for (p = buf; *p != '\0'; p++) if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Win32 locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else # None found. gt_cv_locale_zh_CN=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN else # Test for the locale name with explicit encoding suffix. if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=zh_CN.GB18030 else # None found. gt_cv_locale_zh_CN=none fi fi ;; esac else # If there was a link error, due to mblen(), the system is so old that # it certainly doesn't have a chinese locale. gt_cv_locale_zh_CN=none fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_zh_CN" >&5 $as_echo "$gt_cv_locale_zh_CN" >&6; } LOCALE_ZH_CN=$gt_cv_locale_zh_CN { $as_echo "$as_me:$LINENO: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } if test "${gt_cv_locale_fr_utf8+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_LANGINFO_CODESET # include #endif #include #include struct tm t; char buf[16]; int main () { /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl imitates locale dependent behaviour by looking at the environment variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Win32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; # else if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, some unit tests fail. */ # if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) return 1; } # endif # ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; # endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is two bytes long, with UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 4 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then case "$host_os" in # Handle native Windows specially, because there setlocale() interprets # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", # "fr" or "fra" as "French" or "French_France.1252", # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) # Test for the hypothetical native Win32 locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else # None found. gt_cv_locale_fr_utf8=none fi ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR else # Test for the locale name with explicit encoding suffix. if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr_FR.UTF-8 else # Test for the Solaris 7 locale name. if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=fr.UTF-8 else # None found. gt_cv_locale_fr_utf8=none fi fi fi ;; esac fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; GNULIB_RAWMEMCHR=0; GNULIB_STPCPY=0; GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; GNULIB_STRNCAT=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; GNULIB_STRSEP=0; GNULIB_STRSTR=0; GNULIB_STRCASESTR=0; GNULIB_STRTOK_R=0; GNULIB_MBSLEN=0; GNULIB_MBSNLEN=0; GNULIB_MBSCHR=0; GNULIB_MBSRCHR=0; GNULIB_MBSSTR=0; GNULIB_MBSCASECMP=0; GNULIB_MBSNCASECMP=0; GNULIB_MBSPCASECMP=0; GNULIB_MBSCASESTR=0; GNULIB_MBSCSPN=0; GNULIB_MBSPBRK=0; GNULIB_MBSSPN=0; GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; GNULIB_STRERROR_R=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; HAVE_STPCPY=1; HAVE_STPNCPY=1; HAVE_STRCHRNUL=1; HAVE_DECL_STRDUP=1; HAVE_DECL_STRNDUP=1; HAVE_DECL_STRNLEN=1; HAVE_STRPBRK=1; HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; HAVE_DECL_STRERROR_R=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STPNCPY=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRERROR=0; REPLACE_STRERROR_R=0; REPLACE_STRNCAT=0; REPLACE_STRNDUP=0; REPLACE_STRNLEN=0; REPLACE_STRSIGNAL=0; REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. { $as_echo "$as_me:$LINENO: checking for mmap" >&5 $as_echo_n "checking for mmap... " >&6; } if test "${ac_cv_func_mmap+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define mmap to an innocuous variant, in case declares mmap. For example, HP-UX 11i declares gettimeofday. */ #define mmap innocuous_mmap /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mmap (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef mmap /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mmap (); /* 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_mmap || defined __stub___mmap choke me #endif int main () { return mmap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mmap=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mmap=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 $as_echo "$ac_cv_func_mmap" >&6; } if test "x$ac_cv_func_mmap" = x""yes; then gl_have_mmap=yes else gl_have_mmap=no fi # Try to allow MAP_ANONYMOUS. gl_have_mmap_anonymous=no if test $gl_have_mmap = yes; then { $as_echo "$as_me:$LINENO: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANONYMOUS I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then gl_have_mmap_anonymous=yes fi rm -f conftest* if test $gl_have_mmap_anonymous != yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef MAP_ANON I cant identify this map. #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "I cant identify this map." >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define MAP_ANONYMOUS MAP_ANON _ACEOF gl_have_mmap_anonymous=yes fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_have_mmap_anonymous" >&5 $as_echo "$gl_have_mmap_anonymous" >&6; } if test $gl_have_mmap_anonymous = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MAP_ANONYMOUS 1 _ACEOF fi fi if test $ac_cv_func_memchr = yes; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. { $as_echo "$as_me:$LINENO: checking whether memchr works" >&5 $as_echo_n "checking whether memchr works... " >&6; } if test "${gl_cv_func_memchr_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_memchr_works="guessing no" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_MMAN_H # include # include # include # include # ifndef MAP_FILE # define MAP_FILE 0 # endif #endif int main () { int result = 0; char *fence = NULL; #if HAVE_SYS_MMAN_H && HAVE_MPROTECT # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; # else /* !HAVE_MAP_ANONYMOUS */ const int flags = MAP_FILE | MAP_PRIVATE; int fd = open ("/dev/zero", O_RDONLY, 0666); if (fd >= 0) # endif { int pagesize = getpagesize (); char *two_pages = (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, flags, fd, 0); if (two_pages != (char *)(-1) && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) fence = two_pages + pagesize; } #endif if (fence) { if (memchr (fence, 0, 0)) result |= 1; strcpy (fence - 9, "12345678"); if (memchr (fence - 9, 0, 79) != fence - 1) result |= 2; if (memchr (fence - 1, 0, 3) != fence - 1) result |= 4; } return result; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_memchr_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_memchr_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } if test "$gl_cv_func_memchr_works" != yes; then REPLACE_MEMCHR=1 fi else HAVE_MEMCHR=0 fi if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" for ac_header in bp-sym.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:$LINENO: checking whether snprintf returns a byte count as in C99" >&5 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on MacOS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) gl_cv_func_snprintf_retval_c99="guessing no";; openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Solaris >= 2.10. solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; solaris*) gl_cv_func_printf_sizes_c99="guessing no";; # Guess yes on AIX >= 4. aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on NetBSD >= 3. netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) gl_cv_func_snprintf_retval_c99="guessing no";; netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on BeOS. beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; # If we don't know, assume the worst. *) gl_cv_func_snprintf_retval_c99="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static char buf[100]; int main () { strcpy (buf, "ABCDEF"); if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; if (snprintf (buf, 0, "%d %d", 4567, 89) != 7) return 2; if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7) return 3; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_retval_c99=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_retval_c99=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_retval_c99" >&5 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 $as_echo_n "checking whether snprintf is declared... " >&6; } if test "${ac_cv_have_decl_snprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef snprintf (void) snprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_snprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_snprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 $as_echo "$ac_cv_have_decl_snprintf" >&6; } if test "x$ac_cv_have_decl_snprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF 0 _ACEOF fi REPLACE_NULL=0; HAVE_WCHAR_T=1; STDDEF_H=''; { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if test "${gt_cv_c_wchar_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wchar_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WCHAR_T 1 _ACEOF fi if test -z "$ERRNO_H"; then { $as_echo "$as_me:$LINENO: checking for working strerror function" >&5 $as_echo_n "checking for working strerror function... " >&6; } if test "${gl_cv_func_working_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*strerror (-2); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_working_strerror=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_working_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*strerror (-2); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_working_strerror=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_working_strerror=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_strerror" >&5 $as_echo "$gl_cv_func_working_strerror" >&6; } if test $gl_cv_func_working_strerror = no; then REPLACE_STRERROR=1 fi else REPLACE_STRERROR=1 fi if test $REPLACE_STRERROR = 1; then { $as_echo "$as_me:$LINENO: checking whether strerror is declared" >&5 $as_echo_n "checking whether strerror is declared... " >&6; } if test "${ac_cv_have_decl_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strerror (void) strerror; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strerror=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strerror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5 $as_echo "$ac_cv_have_decl_strerror" >&6; } if test "x$ac_cv_have_decl_strerror" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR 0 _ACEOF fi if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi fi { $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test "${ac_cv_struct_tm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 $as_echo_n "checking for struct tm.tm_zone... " >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; if (ac_aggr.tm_zone) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; if (sizeof ac_aggr.tm_zone) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 $as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TM_ZONE 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 $as_echo_n "checking whether tzname is declared... " >&6; } if test "${ac_cv_have_decl_tzname+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef tzname (void) tzname; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_tzname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_tzname=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 $as_echo "$ac_cv_have_decl_tzname" >&6; } if test "x$ac_cv_have_decl_tzname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } if test "${ac_cv_var_tzname+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME extern char *tzname[]; #endif int main () { return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_var_tzname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 $as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TZNAME 1 _ACEOF fi fi { $as_echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 $as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct tm ac_aggr; if (ac_aggr.tm_gmtoff) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_gmtoff=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct tm ac_aggr; if (sizeof ac_aggr.tm_gmtoff) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_gmtoff=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_gmtoff=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 $as_echo "$ac_cv_member_struct_tm_tm_gmtoff" >&6; } if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TM_GMTOFF 1 _ACEOF fi if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_string_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/string.h#{ s#.*"\(.*/string.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5 $as_echo "$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'string.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_string_h fi NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; HAVE_TIMEGM=1; REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_time_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_sys_time_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_sys_struct_timespec_in_pthread_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_sys_struct_timespec_in_pthread_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_time_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/time.h#{ s#.*"\(.*/time.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_time_h" >&5 $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_time_h fi NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive { $as_echo "$as_me:$LINENO: checking whether localtime_r is declared" >&5 $as_echo_n "checking whether localtime_r is declared... " >&6; } if test "${ac_cv_have_decl_localtime_r+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef localtime_r (void) localtime_r; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_localtime_r=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_localtime_r=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_localtime_r" >&5 $as_echo "$ac_cv_have_decl_localtime_r" >&6; } if test "x$ac_cv_have_decl_localtime_r" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_LOCALTIME_R 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_LOCALTIME_R 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 $as_echo_n "checking for wint_t... " >&6; } if test "${gt_cv_c_wint_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include wint_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_wint_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 $as_echo "$gt_cv_c_wint_t" >&6; } if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WINT_T 1 _ACEOF fi if test $ac_cv_header_features_h = yes; then HAVE_FEATURES_H=1 else HAVE_FEATURES_H=0 fi { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 $as_echo_n "checking for inttypes.h... " >&6; } if test "${gl_cv_header_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_inttypes_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_inttypes_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 $as_echo "$gl_cv_header_inttypes_h" >&6; } if test $gl_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 $as_echo_n "checking for stdint.h... " >&6; } if test "${gl_cv_header_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_stdint_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_stdint_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 $as_echo "$gl_cv_header_stdint_h" >&6; } if test $gl_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for intmax_t" >&5 $as_echo_n "checking for intmax_t... " >&6; } if test "${gt_cv_c_intmax_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if HAVE_STDINT_H_WITH_UINTMAX #include #endif #if HAVE_INTTYPES_H_WITH_UINTMAX #include #endif int main () { intmax_t x = -1; return !x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_c_intmax_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_c_intmax_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 $as_echo "$gt_cv_c_intmax_t" >&6; } if test $gt_cv_c_intmax_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INTMAX_T 1 _ACEOF else test $ac_cv_type_long_long_int = yes \ && ac_type='long long' \ || ac_type='long' cat >>confdefs.h <<_ACEOF #define intmax_t $ac_type _ACEOF fi for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 $as_echo_n "checking whether _snprintf is declared... " >&6; } if test "${ac_cv_have_decl__snprintf+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef _snprintf (void) _snprintf; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl__snprintf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl__snprintf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 $as_echo "$ac_cv_have_decl__snprintf" >&6; } if test "x$ac_cv_have_decl__snprintf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL__SNPRINTF 0 _ACEOF fi case "$gl_cv_func_snprintf_retval_c99" in *yes) cat >>confdefs.h <<\_ACEOF #define HAVE_SNPRINTF_RETVAL_C99 1 _ACEOF ;; esac XGETTEXT_EXTRA_OPTIONS= GNULIB_ISWBLANK=0; GNULIB_WCTYPE=0; GNULIB_ISWCTYPE=0; GNULIB_WCTRANS=0; GNULIB_TOWCTRANS=0; HAVE_ISWBLANK=1; HAVE_WCTYPE_T=1; HAVE_WCTRANS_T=1; REPLACE_ISWBLANK=0; if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=false gl_libdeps= gl_ltlibdeps= gl_m4_base='m4' gl_source_base='gnu' # Code from module alignof: # Code from module alloca-opt: if test $ac_cv_func_alloca_works = no; then : fi # Define an additional variable used in the Makefile substitution. if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } if test "${gl_cv_rpl_alloca+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined __GNUC__ || defined _AIX || defined _MSC_VER Need own alloca #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Need own alloca" >/dev/null 2>&1; then gl_cv_rpl_alloca=yes else gl_cv_rpl_alloca=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 $as_echo "$gl_cv_rpl_alloca" >&6; } if test $gl_cv_rpl_alloca = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF ALLOCA_H=alloca.h else ALLOCA_H= fi else ALLOCA_H=alloca.h fi # Code from module arg-nonnull: # Code from module bitrotate: # Code from module btowc: if test $ac_cv_func_btowc = no; then HAVE_BTOWC=0 else { $as_echo "$as_me:$LINENO: checking whether btowc(0) is correct" >&5 $as_echo_n "checking whether btowc(0) is correct... " >&6; } if test "${gl_cv_func_btowc_nul+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess no on Cygwin. cygwin*) gl_cv_func_btowc_nul="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_nul="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (btowc ('\0') != 0) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_btowc_nul=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_btowc_nul=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_nul" >&5 $as_echo "$gl_cv_func_btowc_nul" >&6; } { $as_echo "$as_me:$LINENO: checking whether btowc(EOF) is correct" >&5 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; } if test "${gl_cv_func_btowc_eof+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on IRIX. irix*) gl_cv_func_btowc_eof="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_btowc_eof="guessing yes" ;; esac if test $LOCALE_FR != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (btowc (EOF) != WEOF) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_btowc_eof=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_btowc_eof=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_eof" >&5 $as_echo "$gl_cv_func_btowc_eof" >&6; } case "$gl_cv_func_btowc_nul" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac case "$gl_cv_func_btowc_eof" in *yes) ;; *) REPLACE_BTOWC=1 ;; esac fi if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then : gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" : fi GNULIB_BTOWC=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_BTOWC 1 _ACEOF # Code from module c++defs: # Code from module c-ctype: # Code from module c-strcase: # Code from module close-hook: # Code from module configmake: if test "x$datarootdir" = x; then datarootdir='${datadir}' fi if test "x$docdir" = x; then docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' fi if test "x$htmldir" = x; then htmldir='${docdir}' fi if test "x$dvidir" = x; then dvidir='${docdir}' fi if test "x$pdfdir" = x; then pdfdir='${docdir}' fi if test "x$psdir" = x; then psdir='${docdir}' fi if test "x$lispdir" = x; then lispdir='${datarootdir}/emacs/site-lisp' fi if test "x$localedir" = x; then localedir='${datarootdir}/locale' fi pkglibexecdir='${libexecdir}/${PACKAGE}' # Code from module crypto/des: gl_LIBOBJS="$gl_LIBOBJS des.$ac_objext" # Code from module crypto/md5: gl_LIBOBJS="$gl_LIBOBJS md5.$ac_objext" : # Code from module crypto/sha1: gl_LIBOBJS="$gl_LIBOBJS sha1.$ac_objext" : # Code from module errno: # Code from module exitfail: # Code from module extensions: # Code from module float: FLOAT_H= case "$host_os" in beos* | openbsd* | mirbsd*) FLOAT_H=float.h if test $gl_cv_have_include_next = yes; then gl_cv_next_float_h='<'float.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_float_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/float.h#{ s#.*"\(.*/float.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_float_h" >&5 $as_echo "$gl_cv_next_float_h" >&6; } fi NEXT_FLOAT_H=$gl_cv_next_float_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'float.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_float_h fi NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive ;; esac # Code from module fprintftime: gl_LIBOBJS="$gl_LIBOBJS fprintftime.$ac_objext" # Code from module fseeko: if test $ac_cv_have_decl_fseeko = no; then HAVE_DECL_FSEEKO=0 fi if test $gl_cv_func_fseeko = no; then HAVE_FSEEKO=0 if test $gl_cv_func_fseeko = yes; then REPLACE_FSEEKO=1 fi gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" else if test $gl_cv_var_stdin_large_offset = no; then if test $gl_cv_func_fseeko = yes; then REPLACE_FSEEKO=1 fi gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" fi fi GNULIB_FSEEKO=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_FSEEKO 1 _ACEOF # Code from module getdelim: if test $ac_cv_func_getdelim = yes; then { $as_echo "$as_me:$LINENO: checking for working getdelim function" >&5 $as_echo_n "checking for working getdelim function... " >&6; } if test "${gl_cv_func_working_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then gl_cv_func_working_getdelim=yes else gl_cv_func_working_getdelim=no fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 2; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 3; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_working_getdelim=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_working_getdelim=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_getdelim" >&5 $as_echo "$gl_cv_func_working_getdelim" >&6; } else gl_cv_func_working_getdelim=no fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi if test $gl_cv_func_working_getdelim = no; then if test $ac_cv_func_getdelim = yes; then REPLACE_GETDELIM=1 fi gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" for ac_func in flockfile funlockfile do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getc_unlocked (void) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 $as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi fi GNULIB_GETDELIM=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_GETDELIM 1 _ACEOF # Code from module getdomainname: for ac_func in getdomainname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for getdomainname in -lnsl" >&5 $as_echo_n "checking for getdomainname in -lnsl... " >&6; } if test "${gl_cv_func_getdomainname_in_libnsl+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_func_getdomainname_in_libnsl=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lnsl" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int getdomainname (char *, size_t); int main () { getdomainname(NULL, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_getdomainname_in_libnsl=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_getdomainname_in_libnsl" >&5 $as_echo "$gl_cv_func_getdomainname_in_libnsl" >&6; } fi done { $as_echo "$as_me:$LINENO: checking whether getdomainname is declared" >&5 $as_echo_n "checking whether getdomainname is declared... " >&6; } if test "${ac_cv_have_decl_getdomainname+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #include int main () { #ifndef getdomainname (void) getdomainname; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getdomainname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getdomainname=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdomainname" >&5 $as_echo "$ac_cv_have_decl_getdomainname" >&6; } if test "x$ac_cv_have_decl_getdomainname" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDOMAINNAME 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETDOMAINNAME 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for getdomainname's second argument type" >&5 $as_echo_n "checking for getdomainname's second argument type... " >&6; } if test "${gl_cv_decl_getdomainname_argtype2+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_have_decl_getdomainname; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NETDB_H #include #endif #include extern int getdomainname (char *, int); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_decl_getdomainname_argtype2='int' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_decl_getdomainname_argtype2='size_t' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else gl_cv_decl_getdomainname_argtype2='int' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_getdomainname_argtype2" >&5 $as_echo "$gl_cv_decl_getdomainname_argtype2" >&6; } if test $ac_cv_have_decl_getdomainname = no; then HAVE_DECL_GETDOMAINNAME=0 fi if { test $ac_cv_func_getdomainname = yes \ && test $gl_cv_decl_getdomainname_argtype2 != size_t; \ } \ || test "$gl_cv_func_getdomainname_in_libnsl" = yes; then REPLACE_GETDOMAINNAME=1 fi if test $HAVE_DECL_GETDOMAINNAME = 0 || test $REPLACE_GETDOMAINNAME = 1; then gl_LIBOBJS="$gl_LIBOBJS getdomainname.$ac_objext" if test $ac_cv_func_getdomainname = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETDOMAINNAME 1 _ACEOF fi for ac_header in sys/systeminfo.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in sysinfo do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi GNULIB_GETDOMAINNAME=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_GETDOMAINNAME 1 _ACEOF # Code from module gethostname: if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi GETHOSTNAME_LIB= for ac_func in gethostname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for gethostname in winsock2.h and -lws2_32" >&5 $as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_w32_gethostname+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_w32_gethostname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H #include #endif #include int main () { gethostname(NULL, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_w32_gethostname=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_w32_gethostname" >&5 $as_echo "$gl_cv_w32_gethostname" >&6; } if test "$gl_cv_w32_gethostname" = "yes"; then GETHOSTNAME_LIB="-lws2_32" fi fi done if test "$ac_cv_func_gethostname" = no; then gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext" HAVE_GETHOSTNAME=0 if test "$gl_cv_w32_gethostname" != "yes"; then for ac_func in uname do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi { $as_echo "$as_me:$LINENO: checking for HOST_NAME_MAX" >&5 $as_echo_n "checking for HOST_NAME_MAX... " >&6; } if test "${gl_cv_decl_HOST_NAME_MAX+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_decl_HOST_NAME_MAX= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HOST_NAME_MAX lucky #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "lucky" >/dev/null 2>&1; then gl_cv_decl_HOST_NAME_MAX=yes fi rm -f conftest* if test -z "$gl_cv_decl_HOST_NAME_MAX"; then if test "$gl_cv_w32_gethostname" = yes; then gl_cv_decl_HOST_NAME_MAX=256 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif int main () { static int test_array [1 - 2 * !((MAXHOSTNAMELEN) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) gl_cv_decl_HOST_NAME_MAX=$ac_lo;; '') gl_cv_decl_HOST_NAME_MAX=256 ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_PARAM_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif #if HAVE_NETDB_H # include #endif static long int longval () { return MAXHOSTNAMELEN; } static unsigned long int ulongval () { return MAXHOSTNAMELEN; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((MAXHOSTNAMELEN) < 0) { long int i = longval (); if (i != (MAXHOSTNAMELEN)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (MAXHOSTNAMELEN)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_decl_HOST_NAME_MAX=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_decl_HOST_NAME_MAX=256 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_HOST_NAME_MAX" >&5 $as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; } if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then cat >>confdefs.h <<_ACEOF #define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX _ACEOF fi GNULIB_GETHOSTNAME=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_GETHOSTNAME 1 _ACEOF # Code from module getline: gl_getline_needs_run_time_check=no { $as_echo "$as_me:$LINENO: checking for getline" >&5 $as_echo_n "checking for getline... " >&6; } if test "${ac_cv_func_getline+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getline to an innocuous variant, in case declares getline. For example, HP-UX 11i declares gettimeofday. */ #define getline innocuous_getline /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getline (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getline /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getline (); /* 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_getline || defined __stub___getline choke me #endif int main () { return getline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_getline=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getline=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getline" >&5 $as_echo "$ac_cv_func_getline" >&6; } if test "x$ac_cv_func_getline" = x""yes; then gl_getline_needs_run_time_check=yes else am_cv_func_working_getline=no fi if test $gl_getline_needs_run_time_check = yes; then { $as_echo "$as_me:$LINENO: checking for working getline function" >&5 $as_echo_n "checking for working getline function... " >&6; } if test "${am_cv_func_working_getline+set}" = set; then $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then am_cv_func_working_getline=yes else am_cv_func_working_getline=no fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getline (&line, &siz, in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 2; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getline (&line, &siz, in) == -1) return 3; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_working_getline=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_working_getline=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_func_working_getline" >&5 $as_echo "$am_cv_func_working_getline" >&6; } fi if test $ac_cv_have_decl_getline = no; then HAVE_DECL_GETLINE=0 fi if test $am_cv_func_working_getline = no; then REPLACE_GETLINE=1 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" if test $ac_cv_func_getdelim = yes; then { $as_echo "$as_me:$LINENO: checking for working getdelim function" >&5 $as_echo_n "checking for working getdelim function... " >&6; } if test "${gl_cv_func_working_getdelim+set}" = set; then $as_echo_n "(cached) " >&6 else echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then gl_cv_func_working_getdelim=yes else gl_cv_func_working_getdelim=no fi rm -f conftest* else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ # include # include # include int main () { FILE *in = fopen ("./conftest.data", "r"); if (!in) return 1; { /* Test result for a NULL buffer and a zero size. Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; int len = getdelim (&line, &siz, '\n', in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 2; } { /* Test result for a NULL buffer and a non-zero size. This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; if (getdelim (&line, &siz, '\n', in) == -1) return 3; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_working_getdelim=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_working_getdelim=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_getdelim" >&5 $as_echo "$gl_cv_func_working_getdelim" >&6; } else gl_cv_func_working_getdelim=no fi if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi if test $gl_cv_func_working_getdelim = no; then if test $ac_cv_func_getdelim = yes; then REPLACE_GETDELIM=1 fi gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" for ac_func in flockfile funlockfile do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 $as_echo_n "checking whether getc_unlocked is declared... " >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef getc_unlocked (void) getc_unlocked; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_getc_unlocked=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 $as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi fi fi GNULIB_GETLINE=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_GETLINE 1 _ACEOF # Code from module getopt: # Code from module getopt-gnu: cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_GETOPT_GNU 1 _ACEOF # Code from module getopt-posix: if test -n "$gl_replace_getopt"; then GETOPT_H=getopt.h cat >>confdefs.h <<\_ACEOF #define __GETOPT_PREFIX rpl_ _ACEOF GNULIB_UNISTD_H_GETOPT=1 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" fi # Code from module getpass-gnu: gl_LIBOBJS="$gl_LIBOBJS getpass.$ac_objext" { $as_echo "$as_me:$LINENO: checking whether __fsetlocking is declared" >&5 $as_echo_n "checking whether __fsetlocking is declared... " >&6; } if test "${ac_cv_have_decl___fsetlocking+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_STDIO_EXT_H #include #endif int main () { #ifndef __fsetlocking (void) __fsetlocking; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl___fsetlocking=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl___fsetlocking=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___fsetlocking" >&5 $as_echo "$ac_cv_have_decl___fsetlocking" >&6; } if test "x$ac_cv_have_decl___fsetlocking" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL___FSETLOCKING 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL___FSETLOCKING 0 _ACEOF fi : cat >>confdefs.h <<\_ACEOF #define getpass gnu_getpass _ACEOF # Code from module gettext-h: # Code from module gettimeofday: gl_gettimeofday_timezone=void if test $ac_cv_func_gettimeofday != yes; then HAVE_GETTIMEOFDAY=0 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in _ftime do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else { $as_echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_gettimeofday_clobber=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { time_t t = 0; struct tm *lt; struct tm saved_lt; struct timeval tv; lt = localtime (&t); saved_lt = *lt; gettimeofday (&tv, NULL); return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_gettimeofday_clobber=no else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_gettimeofday_clobber=yes fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } if test $gl_cv_func_gettimeofday_clobber = yes; then REPLACE_GETTIMEOFDAY=1 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in _ftime do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define gmtime rpl_gmtime _ACEOF cat >>confdefs.h <<\_ACEOF #define localtime rpl_localtime _ACEOF cat >>confdefs.h <<\_ACEOF #define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include struct timeval c; int gettimeofday (struct timeval *restrict, void *restrict); int main () { /* glibc uses struct timezone * rather than the POSIX void * if _GNU_SOURCE is defined. However, since the only portable use of gettimeofday uses NULL as the second parameter, and since the glibc definition is actually more typesafe, it is not worth wrapping this to get a compliant signature. */ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; int x = f (&c, 0); return !(x | c.tv_sec | c.tv_usec); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_gettimeofday_posix_signature=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int gettimeofday (struct timeval *restrict, struct timezone *restrict); int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_gettimeofday_posix_signature=almost else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_gettimeofday_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } if test $gl_cv_func_gettimeofday_posix_signature = almost; then gl_gettimeofday_timezone='struct timezone' elif test $gl_cv_func_gettimeofday_posix_signature != yes; then REPLACE_GETTIMEOFDAY=1 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" for ac_header in sys/timeb.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in _ftime do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi cat >>confdefs.h <<_ACEOF #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone _ACEOF GNULIB_GETTIMEOFDAY=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_GETTIMEOFDAY 1 _ACEOF # Code from module hash: gl_LIBOBJS="$gl_LIBOBJS hash.$ac_objext" # Code from module ignore-value: # Code from module include_next: # Code from module inline: { $as_echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 $as_echo_n "checking whether the compiler generally respects inline... " >&6; } if test "${gl_cv_c_inline_effective+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_c_inline = no; then gl_cv_c_inline_effective=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifdef __NO_INLINE__ #error "inline is not effective" #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_c_inline_effective=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_c_inline_effective=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 $as_echo "$gl_cv_c_inline_effective" >&6; } if test $gl_cv_c_inline_effective = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_INLINE 1 _ACEOF fi # Code from module intprops: # Code from module inttostr: : : : : : # Code from module inttypes: { $as_echo "$as_me:$LINENO: checking whether inttypes.h conforms to C99" >&5 $as_echo_n "checking whether inttypes.h conforms to C99... " >&6; } if test "${gl_cv_header_working_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_working_inttypes_h=no if test "$gl_cv_header_working_stdint_h" = yes \ && test $ac_cv_header_inttypes_h = yes \ && test "$ac_cv_have_decl_imaxabs" = yes \ && test "$ac_cv_have_decl_imaxdiv" = yes \ && test "$ac_cv_have_decl_strtoimax" = yes \ && test "$ac_cv_have_decl_strtoumax" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ #include /* No need to duplicate the tests of stdint.m4; they are subsumed by $gl_cv_header_working_stdint_h = yes. */ /* Tests for macros supposed to be defined in inttypes.h. */ const char *k = /* implicit string concatenation */ #ifdef INT8_MAX PRId8 PRIi8 #endif #ifdef UINT8_MAX PRIo8 PRIu8 PRIx8 PRIX8 #endif #ifdef INT16_MAX PRId16 PRIi16 #endif #ifdef UINT16_MAX PRIo16 PRIu16 PRIx16 PRIX16 #endif #ifdef INT32_MAX PRId32 PRIi32 #endif #ifdef UINT32_MAX PRIo32 PRIu32 PRIx32 PRIX32 #endif #ifdef INT64_MAX PRId64 PRIi64 #endif #ifdef UINT64_MAX PRIo64 PRIu64 PRIx64 PRIX64 #endif PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 PRIdLEAST64 PRIiLEAST64 PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 PRIdFAST64 PRIiFAST64 PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX #ifdef INTPTR_MAX PRIdPTR PRIiPTR #endif #ifdef UINTPTR_MAX PRIoPTR PRIuPTR PRIxPTR PRIXPTR #endif ; const char *l = /* implicit string concatenation */ #ifdef INT8_MAX SCNd8 SCNi8 #endif #ifdef UINT8_MAX SCNo8 SCNu8 SCNx8 #endif #ifdef INT16_MAX SCNd16 SCNi16 #endif #ifdef UINT16_MAX SCNo16 SCNu16 SCNx16 #endif #ifdef INT32_MAX SCNd32 SCNi32 #endif #ifdef UINT32_MAX SCNo32 SCNu32 SCNx32 #endif #ifdef INT64_MAX SCNd64 SCNi64 #endif #ifdef UINT64_MAX SCNo64 SCNu64 SCNx64 #endif SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 SCNdLEAST64 SCNiLEAST64 SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 SCNdFAST64 SCNiFAST64 SCNoFAST64 SCNuFAST64 SCNxFAST64 SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX #ifdef INTPTR_MAX SCNdPTR SCNiPTR #endif #ifdef UINTPTR_MAX SCNoPTR SCNuPTR SCNxPTR #endif ; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_working_inttypes_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_inttypes_h" >&5 $as_echo "$gl_cv_header_working_inttypes_h" >&6; } if test $gl_cv_have_include_next = yes; then gl_cv_next_inttypes_h='<'inttypes.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_inttypes_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_inttypes_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/inttypes.h#{ s#.*"\(.*/inttypes.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_inttypes_h" >&5 $as_echo "$gl_cv_next_inttypes_h" >&6; } fi NEXT_INTTYPES_H=$gl_cv_next_inttypes_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'inttypes.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_inttypes_h fi NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive cat >>confdefs.h <<\_ACEOF #define GL_TRIGGER_STDC_LIMIT_MACROS 1 _ACEOF PRIPTR_PREFIX= if test -n "$STDINT_H"; then PRIPTR_PREFIX='"l"' else for glpfx in '' l ll I64; do case $glpfx in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; I64) gltype1='__int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern intptr_t foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then PRIPTR_PREFIX='"'$glpfx'"' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -n "$PRIPTR_PREFIX" && break done fi if test "$ac_cv_have_decl_imaxabs" = yes; then HAVE_DECL_IMAXABS=1 else HAVE_DECL_IMAXABS=0 fi if test "$ac_cv_have_decl_imaxdiv" = yes; then HAVE_DECL_IMAXDIV=1 else HAVE_DECL_IMAXDIV=0 fi if test "$ac_cv_have_decl_strtoimax" = yes; then HAVE_DECL_STRTOIMAX=1 else HAVE_DECL_STRTOIMAX=0 fi if test "$ac_cv_have_decl_strtoumax" = yes; then HAVE_DECL_STRTOUMAX=1 else HAVE_DECL_STRTOUMAX=0 fi { $as_echo "$as_me:$LINENO: checking whether INT32_MAX < INTMAX_MAX" >&5 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT32_MAX && defined INTMAX_MAX #define CONDITION (INT32_MAX < INTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (int) < sizeof (long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then INT32_MAX_LT_INTMAX_MAX=1; else INT32_MAX_LT_INTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { $as_echo "$as_me:$LINENO: checking whether INT64_MAX == LONG_MAX" >&5 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined INT64_MAX #define CONDITION (INT64_MAX == LONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (long long int) == sizeof (long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then INT64_MAX_EQ_LONG_MAX=1; else INT64_MAX_EQ_LONG_MAX=0; fi else INT64_MAX_EQ_LONG_MAX=-1 fi { $as_echo "$as_me:$LINENO: checking whether UINT32_MAX < UINTMAX_MAX" >&5 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT32_MAX && defined UINTMAX_MAX #define CONDITION (UINT32_MAX < UINTMAX_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then UINT32_MAX_LT_UINTMAX_MAX=1; else UINT32_MAX_LT_UINTMAX_MAX=0; fi if test $APPLE_UNIVERSAL_BUILD = 0; then { $as_echo "$as_me:$LINENO: checking whether UINT64_MAX == ULONG_MAX" >&5 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Work also in C++ mode. */ #define __STDC_LIMIT_MACROS 1 /* Work if build is not clean. */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H #include #if HAVE_STDINT_H #include #endif #if defined UINT64_MAX #define CONDITION (UINT64_MAX == ULONG_MAX) #elif HAVE_LONG_LONG_INT #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) #else #define CONDITION 0 #endif int test[CONDITION ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then UINT64_MAX_EQ_ULONG_MAX=1; else UINT64_MAX_EQ_ULONG_MAX=0; fi else UINT64_MAX_EQ_ULONG_MAX=-1 fi for gl_func in imaxabs imaxdiv strtoimax strtoumax; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module langinfo: if test $gl_cv_have_include_next = yes; then gl_cv_next_langinfo_h='<'langinfo.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_langinfo_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_langinfo_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/langinfo.h#{ s#.*"\(.*/langinfo.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_langinfo_h='<'langinfo.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_langinfo_h" >&5 $as_echo "$gl_cv_next_langinfo_h" >&6; } fi NEXT_LANGINFO_H=$gl_cv_next_langinfo_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'langinfo.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_langinfo_h fi NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive HAVE_LANGINFO_CODESET=0 HAVE_LANGINFO_T_FMT_AMPM=0 HAVE_LANGINFO_ERA=0 HAVE_LANGINFO_YESEXPR=0 if test $ac_cv_header_langinfo_h = yes; then HAVE_LANGINFO_H=1 { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines CODESET" >&5 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } if test "${gl_cv_header_langinfo_codeset+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int a = CODESET; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_langinfo_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_codeset" >&5 $as_echo "$gl_cv_header_langinfo_codeset" >&6; } if test $gl_cv_header_langinfo_codeset = yes; then HAVE_LANGINFO_CODESET=1 fi { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines T_FMT_AMPM" >&5 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int a = T_FMT_AMPM; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_langinfo_t_fmt_ampm=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_langinfo_t_fmt_ampm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then HAVE_LANGINFO_T_FMT_AMPM=1 fi { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines ERA" >&5 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; } if test "${gl_cv_header_langinfo_era+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int a = ERA; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_langinfo_era=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_langinfo_era=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_era" >&5 $as_echo "$gl_cv_header_langinfo_era" >&6; } if test $gl_cv_header_langinfo_era = yes; then HAVE_LANGINFO_ERA=1 fi { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines YESEXPR" >&5 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int a = YESEXPR; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_langinfo_yesexpr=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_langinfo_yesexpr=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_yesexpr" >&5 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } if test $gl_cv_header_langinfo_yesexpr = yes; then HAVE_LANGINFO_YESEXPR=1 fi else HAVE_LANGINFO_H=0 fi for gl_func in nl_langinfo; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module localcharset: LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" # Code from module lseek: { $as_echo "$as_me:$LINENO: checking whether lseek detects pipes" >&5 $as_echo_n "checking whether lseek detects pipes... " >&6; } if test "${gl_cv_func_lseek_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else if test $cross_compiling = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for off_t */ #include /* for SEEK_CUR */ #include int main () { /* Exit with success only if stdin is seekable. */ return lseek (0, (off_t)0, SEEK_CUR) < 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ && test 1 = "`echo hi \ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_lseek_pipe=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ /* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ Choke me. #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_lseek_pipe=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_lseek_pipe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_lseek_pipe" >&5 $as_echo "$gl_cv_func_lseek_pipe" >&6; } if test $gl_cv_func_lseek_pipe = no; then gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" REPLACE_LSEEK=1 cat >>confdefs.h <<\_ACEOF #define LSEEK_PIPE_BROKEN 1 _ACEOF fi GNULIB_LSEEK=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_LSEEK 1 _ACEOF # Code from module malloc: # Code from module malloc-gnu: for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_GNU 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_GNU 0 _ACEOF gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" REPLACE_MALLOC=1 fi cat >>confdefs.h <<_ACEOF #define GNULIB_MALLOC_GNU 1 _ACEOF # Code from module malloc-posix: if test $gl_cv_func_malloc_posix = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_POSIX 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" REPLACE_MALLOC=1 fi GNULIB_MALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_MALLOC_POSIX 1 _ACEOF # Code from module mbrtowc: if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_incomplete_state=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_incomplete_state=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_sanitycheck=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_sanitycheck=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then : fi if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBRTOWC=1 else { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL pwc argument" >&5 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris. solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "\303\237er"; mbstate_t state; wchar_t wc; size_t ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, input, 5, &state); if (ret != 2) result |= 1; if (!mbsinit (&state)) result |= 2; memset (&state, '\0', sizeof (mbstate_t)); ret = mbrtowc (NULL, input, 5, &state); if (ret != 2) /* Solaris 7 fails here: ret is -1. */ result |= 4; if (!mbsinit (&state)) result |= 8; } return result; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_null_arg1=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_null_arg1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg1" >&5 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL string argument" >&5 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on OSF/1. osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { mbstate_t state; wchar_t wc; int ret; memset (&state, '\0', sizeof (mbstate_t)); wc = (wchar_t) 0xBADFACE; mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_null_arg2=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_null_arg2=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg2" >&5 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc has a correct return value" >&5 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } if test "${gl_cv_func_mbrtowc_retval+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on HP-UX, Solaris, native Windows. hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_retval="guessing yes" ;; esac if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ || { case "$host_os" in mingw*) true;; *) false;; esac; }; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; int found_some_locale = 0; /* This fails on Solaris. */ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { char input[] = "B\303\274\303\237er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 1) result |= 1; } found_some_locale = 1; } /* This fails on HP-UX 11.11. */ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) { input[1] = '\0'; if (mbrtowc (&wc, input + 2, 5, &state) != 2) result |= 2; } found_some_locale = 1; } /* This fails on native Windows. */ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) { char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 4; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) { char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 8; } found_some_locale = 1; } if (setlocale (LC_ALL, "Chinese_China.936") != NULL) { char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) { input[3] = '\0'; if (mbrtowc (&wc, input + 4, 4, &state) != 1) result |= 16; } found_some_locale = 1; } return (found_some_locale ? result : 77); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_retval=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test $? != 77; then gl_cv_func_mbrtowc_retval=no fi fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8 and 9. solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8 and 9. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_nul_retval=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_nul_retval=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NULL_ARG1_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_null_arg2" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NULL_ARG2_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_retval" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_RETVAL_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac case "$gl_cv_func_mbrtowc_nul_retval" in *yes) ;; *) cat >>confdefs.h <<\_ACEOF #define MBRTOWC_NUL_RETVAL_BUG 1 _ACEOF REPLACE_MBRTOWC=1 ;; esac fi fi if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then : gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" : fi GNULIB_MBRTOWC=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_MBRTOWC 1 _ACEOF # Code from module mbsinit: if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_incomplete_state=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_incomplete_state=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_sanitycheck=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_sanitycheck=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then : fi if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 else if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSINIT=1 else case "$host_os" in mingw*) REPLACE_MBSINIT=1 ;; esac fi fi if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then : gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" : fi GNULIB_MBSINIT=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_MBSINIT 1 _ACEOF # Code from module mbtowc: if false; then REPLACE_MBTOWC=1 fi if test $REPLACE_MBTOWC = 1; then gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" : fi GNULIB_MBTOWC=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_MBTOWC 1 _ACEOF # Code from module memchr: GNULIB_MEMCHR=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_MEMCHR 1 _ACEOF # Code from module multiarch: # Code from module netdb: if test $gl_cv_have_include_next = yes; then gl_cv_next_netdb_h='<'netdb.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_netdb_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_netdb_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/netdb.h#{ s#.*"\(.*/netdb.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_netdb_h='<'netdb.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_netdb_h" >&5 $as_echo "$gl_cv_next_netdb_h" >&6; } fi NEXT_NETDB_H=$gl_cv_next_netdb_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'netdb.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_netdb_h fi NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive if test $ac_cv_header_netdb_h = yes; then HAVE_NETDB_H=1 else HAVE_NETDB_H=0 fi for gl_func in getaddrinfo freeaddrinfo gai_strerror getnameinfo; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module nl_langinfo: if test $ac_cv_func_nl_langinfo = yes; then # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. { $as_echo "$as_me:$LINENO: checking whether YESEXPR works" >&5 $as_echo_n "checking whether YESEXPR works... " >&6; } if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then case "$host_os" in # Guess no on irix systems. irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; # Guess yes elsewhere. *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !*nl_langinfo(YESEXPR); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_nl_langinfo_yesexpr_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_nl_langinfo_yesexpr_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } case $gl_cv_func_nl_langinfo_yesexpr_works in *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; esac cat >>confdefs.h <<_ACEOF #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS _ACEOF if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then : else REPLACE_NL_LANGINFO=1 cat >>confdefs.h <<\_ACEOF #define REPLACE_NL_LANGINFO 1 _ACEOF gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" fi else HAVE_NL_LANGINFO=0 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" fi GNULIB_NL_LANGINFO=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_NL_LANGINFO 1 _ACEOF # Code from module obstack: { $as_echo "$as_me:$LINENO: checking for obstacks" >&5 $as_echo_n "checking for obstacks... " >&6; } if test "${ac_cv_func_obstack+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include "obstack.h" int main () { struct obstack mem; #define obstack_chunk_alloc malloc #define obstack_chunk_free free obstack_init (&mem); obstack_free (&mem, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_obstack=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_obstack=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 $as_echo "$ac_cv_func_obstack" >&6; } if test $ac_cv_func_obstack = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OBSTACK 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" fi # Code from module quote: gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext" # Code from module quotearg: gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext" # Code from module quotearg-simple: # Code from module realloc: # Code from module realloc-gnu: for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC_GNU 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC_GNU 0 _ACEOF gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" REPLACE_REALLOC=1 fi cat >>confdefs.h <<_ACEOF #define GNULIB_REALLOC_GNU 1 _ACEOF # Code from module realloc-posix: if test $gl_cv_func_malloc_posix = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC_POSIX 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" REPLACE_REALLOC=1 fi GNULIB_REALLOC_POSIX=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_REALLOC_POSIX 1 _ACEOF # Code from module regex: # Check whether --with-included-regex was given. if test "${with_included_regex+set}" = set; then withval=$with_included_regex; fi case $with_included_regex in #( yes|no) ac_use_included_regex=$with_included_regex ;; '') # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. { $as_echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 $as_echo_n "checking for working re_compile_pattern... " >&6; } if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_re_compile_pattern_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include #include #include int main () { int result = 0; static struct re_pattern_buffer regex; unsigned char folded_chars[UCHAR_MAX + 1]; int i; const char *s; struct re_registers regs; /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html This test needs valgrind to catch the bug on Debian GNU/Linux 3.1 x86, but it might catch the bug better on other platforms and it shouldn't hurt to try the test here. */ if (setlocale (LC_ALL, "en_US.UTF-8")) { static char const pat[] = "insert into"; static char const data[] = "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) result |= 1; else if (re_search (®ex, data, sizeof data - 1, 0, sizeof data - 1, ®s) != -1) result |= 1; if (! setlocale (LC_ALL, "C")) return 1; } /* This test is from glibc bug 3957, reported by Andrew Mackey. */ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[^x]b", 6, ®ex); if (s) result |= 2; /* This should fail, but succeeds for glibc-2.5. */ else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) result |= 2; /* This regular expression is from Spencer ere test number 75 in grep-2.3. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); for (i = 0; i <= UCHAR_MAX; i++) folded_chars[i] = i; regex.translate = folded_chars; s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) result |= 4; /* Ensure that [b-a] is diagnosed as invalid, when using RE_NO_EMPTY_RANGES. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("a[b-a]", 6, ®ex); if (s == 0) result |= 8; /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex); if (s) result |= 8; /* The following example is derived from a problem report against gawk from Jorge Stolfi . */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[an\371]*n", 7, ®ex); if (s) result |= 8; /* This should match, but does not for glibc-2.2.1. */ else if (re_match (®ex, "an", 2, 0, ®s) != 2) result |= 8; memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 8; /* glibc-2.2.93 does not work with a negative RANGE argument. */ else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) result |= 8; /* The version of regex.c in older versions of gnulib ignored RE_ICASE. Detect that problem too. */ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("x", 1, ®ex); if (s) result |= 16; else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) result |= 16; /* Catch a bug reported by Vin Shelton in http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html */ re_set_syntax (RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); if (s) result |= 32; /* REG_STARTEND was added to glibc on 2004-01-15. Reject older versions. */ if (! REG_STARTEND) result |= 64; #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and 32-bit int), but we should wait until glibc implements this feature. Otherwise, support for equivalence classes and multibyte collation symbols would always be broken except when compiling --without-included-regex. */ if (sizeof (regoff_t) < sizeof (ptrdiff_t) || sizeof (regoff_t) < sizeof (ssize_t)) result |= 64; #endif return result; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_re_compile_pattern_working=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_re_compile_pattern_working=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_working" >&5 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } case $gl_cv_func_re_compile_pattern_working in #( yes) ac_use_included_regex=no;; #( no) ac_use_included_regex=yes;; esac ;; *) { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 $as_echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} { (exit 1); exit 1; }; } ;; esac if test $ac_use_included_regex = yes; then cat >>confdefs.h <<\_ACEOF #define _REGEX_LARGE_OFFSETS 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define re_syntax_options rpl_re_syntax_options _ACEOF cat >>confdefs.h <<\_ACEOF #define re_set_syntax rpl_re_set_syntax _ACEOF cat >>confdefs.h <<\_ACEOF #define re_compile_pattern rpl_re_compile_pattern _ACEOF cat >>confdefs.h <<\_ACEOF #define re_compile_fastmap rpl_re_compile_fastmap _ACEOF cat >>confdefs.h <<\_ACEOF #define re_search rpl_re_search _ACEOF cat >>confdefs.h <<\_ACEOF #define re_search_2 rpl_re_search_2 _ACEOF cat >>confdefs.h <<\_ACEOF #define re_match rpl_re_match _ACEOF cat >>confdefs.h <<\_ACEOF #define re_match_2 rpl_re_match_2 _ACEOF cat >>confdefs.h <<\_ACEOF #define re_set_registers rpl_re_set_registers _ACEOF cat >>confdefs.h <<\_ACEOF #define re_comp rpl_re_comp _ACEOF cat >>confdefs.h <<\_ACEOF #define re_exec rpl_re_exec _ACEOF cat >>confdefs.h <<\_ACEOF #define regcomp rpl_regcomp _ACEOF cat >>confdefs.h <<\_ACEOF #define regexec rpl_regexec _ACEOF cat >>confdefs.h <<\_ACEOF #define regerror rpl_regerror _ACEOF cat >>confdefs.h <<\_ACEOF #define regfree rpl_regfree _ACEOF gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" for ac_header in libintl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether isblank is declared" >&5 $as_echo_n "checking whether isblank is declared... " >&6; } if test "${ac_cv_have_decl_isblank+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #ifndef isblank (void) isblank; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_isblank=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_isblank=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 $as_echo "$ac_cv_have_decl_isblank" >&6; } if test "x$ac_cv_have_decl_isblank" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISBLANK 0 _ACEOF fi fi # Code from module size_max: for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 $as_echo_n "checking for SIZE_MAX... " >&6; } if test "${gl_cv_size_max+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_size_max= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_STDINT_H #include #endif #ifdef SIZE_MAX Found it #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Found it" >/dev/null 2>&1; then gl_cv_size_max=yes fi rm -f conftest* if test -z "$gl_cv_size_max"; then if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) size_t_bits_minus_1=$ac_lo;; '') size_t_bits_minus_1= ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof (size_t) * CHAR_BIT - 1) < 0) { long int i = longval (); if (i != (sizeof (size_t) * CHAR_BIT - 1)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof (size_t) * CHAR_BIT - 1)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then size_t_bits_minus_1=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) size_t_bits_minus_1= fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) fits_in_uint=$ac_lo;; '') fits_in_uint= ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) { long int i = longval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof (size_t) <= sizeof (unsigned int))) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then fits_in_uint=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) fits_in_uint= fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern size_t foo; extern unsigned long foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then fits_in_uint=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $fits_in_uint = 1; then gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" else gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" fi else gl_cv_size_max='((size_t)~(size_t)0)' fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 $as_echo "$gl_cv_size_max" >&6; } if test "$gl_cv_size_max" != yes; then cat >>confdefs.h <<_ACEOF #define SIZE_MAX $gl_cv_size_max _ACEOF fi # Code from module snprintf: gl_cv_func_snprintf_usable=no for ac_func in snprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_snprintf = yes; then { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } if test "${gl_cv_func_snprintf_size1+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then gl_cv_func_snprintf_size1="guessing yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_snprintf_size1=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_snprintf_size1=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 $as_echo "$gl_cv_func_snprintf_size1" >&6; } case "$gl_cv_func_snprintf_size1" in *yes) case "$gl_cv_func_snprintf_retval_c99" in *yes) gl_cv_func_snprintf_usable=yes ;; esac ;; esac fi if test $gl_cv_func_snprintf_usable = no; then gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" if test $ac_cv_func_snprintf = yes; then REPLACE_SNPRINTF=1 fi : fi if test $ac_cv_have_decl_snprintf = no; then HAVE_DECL_SNPRINTF=0 fi GNULIB_SNPRINTF=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_SNPRINTF 1 _ACEOF cat >>confdefs.h <<_ACEOF #define GNULIB_SNPRINTF 1 _ACEOF # Code from module socketlib: if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi LIBSOCKET= if test $HAVE_WINSOCK2_H = 1; then { $as_echo "$as_me:$LINENO: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } if test "${gl_cv_func_wsastartup+set}" = set; then $as_echo_n "(cached) " >&6 else gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_WINSOCK2_H # include #endif int main () { WORD wVersionRequested = MAKEWORD(1, 1); WSADATA wsaData; int err = WSAStartup(wVersionRequested, &wsaData); WSACleanup (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_func_wsastartup=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_wsastartup=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wsastartup" >&5 $as_echo "$gl_cv_func_wsastartup" >&6; } if test "$gl_cv_func_wsastartup" = "yes"; then cat >>confdefs.h <<\_ACEOF #define WINDOWS_SOCKETS 1 _ACEOF LIBSOCKET='-lws2_32' fi else { $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 $as_echo_n "checking for library containing setsockopt... " >&6; } if test "${gl_cv_lib_socket+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_lib_socket= cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_save_LIBS="$LIBS" LIBS="$gl_save_LIBS -lsocket" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lsocket" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnetwork" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lnetwork" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then LIBS="$gl_save_LIBS -lnet" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern #ifdef __cplusplus "C" #endif char setsockopt(); int main () { setsockopt(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gl_cv_lib_socket="-lnet" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi LIBS="$gl_save_LIBS" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$gl_cv_lib_socket"; then gl_cv_lib_socket="none needed" fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_lib_socket" >&5 $as_echo "$gl_cv_lib_socket" >&6; } if test "$gl_cv_lib_socket" != "none needed"; then LIBSOCKET="$gl_cv_lib_socket" fi fi # Code from module sockets: : # Code from module socklen: { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_socklen_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_SOCKET_H # include #elif HAVE_WS2TCPIP_H # include #endif int main () { if (sizeof (socklen_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_SOCKET_H # include #elif HAVE_WS2TCPIP_H # include #endif int main () { if (sizeof ((socklen_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_socklen_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 $as_echo "$ac_cv_type_socklen_t" >&6; } if test "x$ac_cv_type_socklen_t" = x""yes; then : else { $as_echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 $as_echo_n "checking for socklen_t equivalent... " >&6; } if test "${gl_cv_socklen_t_equiv+set}" = set; then $as_echo_n "(cached) " >&6 else # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername gl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t "unsigned int" "long int" "unsigned long int"; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int getpeername (int, $arg2 *, $t *); int main () { $t len; getpeername (0, 0, &len); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_socklen_t_equiv="$t" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$gl_cv_socklen_t_equiv" != "" && break done test "$gl_cv_socklen_t_equiv" != "" && break done fi if test "$gl_cv_socklen_t_equiv" = ""; then { { $as_echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 $as_echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5 $as_echo "$gl_cv_socklen_t_equiv" >&6; } cat >>confdefs.h <<_ACEOF #define socklen_t $gl_cv_socklen_t_equiv _ACEOF fi # Code from module ssize_t: { $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } if test "${gt_cv_ssize_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gt_cv_ssize_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 $as_echo "$gt_cv_ssize_t" >&6; } if test $gt_cv_ssize_t = no; then cat >>confdefs.h <<\_ACEOF #define ssize_t int _ACEOF fi # Code from module stdbool: # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi # Code from module stddef: if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:$LINENO: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } if test "${gl_cv_decl_null_works+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_decl_null_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_decl_null_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_decl_null_works" >&5 $as_echo "$gl_cv_decl_null_works" >&6; } if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then if test $gl_cv_have_include_next = yes; then gl_cv_next_stddef_h='<'stddef.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stddef_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stddef.h#{ s#.*"\(.*/stddef.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stddef_h" >&5 $as_echo "$gl_cv_next_stddef_h" >&6; } fi NEXT_STDDEF_H=$gl_cv_next_stddef_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stddef.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stddef_h fi NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive fi # Code from module stdint: if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else HAVE_LONG_LONG_INT=0 fi if test $ac_cv_type_unsigned_long_long_int = yes; then HAVE_UNSIGNED_LONG_LONG_INT=1 else HAVE_UNSIGNED_LONG_LONG_INT=0 fi if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $ac_cv_header_inttypes_h = yes; then HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test $ac_cv_header_sys_types_h = yes; then HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_stdint_h='<'stdint.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdint.h#{ s#.*"\(.*/stdint.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 $as_echo "$gl_cv_next_stdint_h" >&6; } fi NEXT_STDINT_H=$gl_cv_next_stdint_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdint_h fi NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive if test $ac_cv_header_stdint_h = yes; then HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } if test "${gl_cv_header_working_stdint_h+set}" = set; then $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) #error "WCHAR_MIN, WCHAR_MAX not defined in " #endif /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN; #endif #ifdef INT16_MAX int16_t a2 = INT16_MAX; int16_t a2min = INT16_MIN; #endif #ifdef INT32_MAX int32_t a3 = INT32_MAX; int32_t a3min = INT32_MIN; #endif #ifdef INT64_MAX int64_t a4 = INT64_MAX; int64_t a4min = INT64_MIN; #endif #ifdef UINT8_MAX uint8_t b1 = UINT8_MAX; #else typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; #endif #ifdef UINT16_MAX uint16_t b2 = UINT16_MAX; #endif #ifdef UINT32_MAX uint32_t b3 = UINT32_MAX; #endif #ifdef UINT64_MAX uint64_t b4 = UINT64_MAX; #endif int_least8_t c1 = INT8_C (0x7f); int_least8_t c1max = INT_LEAST8_MAX; int_least8_t c1min = INT_LEAST8_MIN; int_least16_t c2 = INT16_C (0x7fff); int_least16_t c2max = INT_LEAST16_MAX; int_least16_t c2min = INT_LEAST16_MIN; int_least32_t c3 = INT32_C (0x7fffffff); int_least32_t c3max = INT_LEAST32_MAX; int_least32_t c3min = INT_LEAST32_MIN; int_least64_t c4 = INT64_C (0x7fffffffffffffff); int_least64_t c4max = INT_LEAST64_MAX; int_least64_t c4min = INT_LEAST64_MIN; uint_least8_t d1 = UINT8_C (0xff); uint_least8_t d1max = UINT_LEAST8_MAX; uint_least16_t d2 = UINT16_C (0xffff); uint_least16_t d2max = UINT_LEAST16_MAX; uint_least32_t d3 = UINT32_C (0xffffffff); uint_least32_t d3max = UINT_LEAST32_MAX; uint_least64_t d4 = UINT64_C (0xffffffffffffffff); uint_least64_t d4max = UINT_LEAST64_MAX; int_fast8_t e1 = INT_FAST8_MAX; int_fast8_t e1min = INT_FAST8_MIN; int_fast16_t e2 = INT_FAST16_MAX; int_fast16_t e2min = INT_FAST16_MIN; int_fast32_t e3 = INT_FAST32_MAX; int_fast32_t e3min = INT_FAST32_MIN; int_fast64_t e4 = INT_FAST64_MAX; int_fast64_t e4min = INT_FAST64_MIN; uint_fast8_t f1 = UINT_FAST8_MAX; uint_fast16_t f2 = UINT_FAST16_MAX; uint_fast32_t f3 = UINT_FAST32_MAX; uint_fast64_t f4 = UINT_FAST64_MAX; #ifdef INTPTR_MAX intptr_t g = INTPTR_MAX; intptr_t gmin = INTPTR_MIN; #endif #ifdef UINTPTR_MAX uintptr_t h = UINTPTR_MAX; #endif intmax_t i = INTMAX_MAX; uintmax_t j = UINTMAX_MAX; #include /* for CHAR_BIT */ #define TYPE_MINIMUM(t) \ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) #define TYPE_MAXIMUM(t) \ ((t) ((t) 0 < (t) -1 \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) struct s { int check_PTRDIFF: PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; /* Detect bug in FreeBSD 6.0 / ia64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) ? 1 : -1; int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; int check_WCHAR: WCHAR_MIN == TYPE_MINIMUM (wchar_t) && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) ? 1 : -1; /* Detect bug in mingw. */ int check_WINT: WINT_MIN == TYPE_MINIMUM (wint_t) && WINT_MAX == TYPE_MAXIMUM (wint_t) ? 1 : -1; /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ int check_UINT8_C: (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; int check_UINT16_C: (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; /* Detect bugs in OpenBSD 3.9 stdint.h. */ #ifdef UINT8_MAX int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; #endif #ifdef UINT16_MAX int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; #endif #ifdef UINT32_MAX int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; #endif #ifdef UINT64_MAX int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; #endif int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; }; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if test "$cross_compiling" = yes; then gl_cv_header_working_stdint_h=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include #include #define MVAL(macro) MVAL1(macro) #define MVAL1(expression) #expression static const char *macro_values[] = { #ifdef INT8_MAX MVAL (INT8_MAX), #endif #ifdef INT16_MAX MVAL (INT16_MAX), #endif #ifdef INT32_MAX MVAL (INT32_MAX), #endif #ifdef INT64_MAX MVAL (INT64_MAX), #endif #ifdef UINT8_MAX MVAL (UINT8_MAX), #endif #ifdef UINT16_MAX MVAL (UINT16_MAX), #endif #ifdef UINT32_MAX MVAL (UINT32_MAX), #endif #ifdef UINT64_MAX MVAL (UINT64_MAX), #endif NULL }; int main () { const char **mv; for (mv = macro_values; *mv != NULL; mv++) { const char *value = *mv; /* Test whether it looks like a cast expression. */ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 || strncmp (value, "((int)"/*)*/, 6) == 0 || strncmp (value, "((signed short)"/*)*/, 15) == 0 || strncmp (value, "((signed char)"/*)*/, 14) == 0) return mv - macro_values + 1; } return 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_header_working_stdint_h=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 $as_echo "$gl_cv_header_working_stdint_h" >&6; } fi if test "$gl_cv_header_working_stdint_h" = yes; then STDINT_H= else for ac_header in sys/inttypes.h sys/bitypes.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_sys_inttypes_h = yes; then HAVE_SYS_INTTYPES_H=1 else HAVE_SYS_INTTYPES_H=0 fi if test $ac_cv_header_sys_bitypes_h = yes; then HAVE_SYS_BITYPES_H=1 else HAVE_SYS_BITYPES_H=0 fi if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include int main () { static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) result=$ac_lo;; '') result=unknown ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif #include static long int longval () { return sizeof ($gltype) * CHAR_BIT; } static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if ((sizeof ($gltype) * CHAR_BIT) < 0) { long int i = longval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != (sizeof ($gltype) * CHAR_BIT)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) result=unknown fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val eval gl_cv_bitsizeof_${gltype}=\$result fi ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_bitsizeof_${gltype} if test $result = unknown; then result=0 fi GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` cat >>confdefs.h <<_ACEOF #define BITSIZEOF_${GLTYPE} $result _ACEOF eval BITSIZEOF_${GLTYPE}=\$result done for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then result=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval gl_cv_type_${gltype}_signed=\$result fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_signed'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval result=\$gl_cv_type_${gltype}_signed GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` if test "$result" = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SIGNED_${GLTYPE} 1 _ACEOF eval HAVE_SIGNED_${GLTYPE}=1 else eval HAVE_SIGNED_${GLTYPE}=0 fi done gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no if test $APPLE_UNIVERSAL_BUILD = 0; then for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done fi for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no eval result=\$gl_cv_type_${gltype}_signed if test "$result" = yes; then glsufu= else glsufu=u fi for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do case $glsuf in '') gltype1='int';; l) gltype1='long int';; ll) gltype1='long long int';; i64) gltype1='__int64';; u) gltype1='unsigned int';; ul) gltype1='unsigned long int';; ull) gltype1='unsigned long long int';; ui64)gltype1='unsigned __int64';; esac cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #if HAVE_WCHAR_H # include # include # include #endif extern $gltype foo; extern $gltype1 foo; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval gl_cv_type_${gltype}_suffix=\$glsuf else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext eval result=\$gl_cv_type_${gltype}_suffix test "$result" != no && break done fi ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` eval result=\$gl_cv_type_${gltype}_suffix test "$result" = no && result= eval ${GLTYPE}_SUFFIX=\$result cat >>confdefs.h <<_ACEOF #define ${GLTYPE}_SUFFIX $result _ACEOF done STDINT_H=stdint.h fi # Code from module stdio: if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdio_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdio.h#{ s#.*"\(.*/stdio.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5 $as_echo "$gl_cv_next_stdio_h" >&6; } fi NEXT_STDIO_H=$gl_cv_next_stdio_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdio.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdio_h fi NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 GNULIB_VPRINTF=1 GNULIB_FPUTC=1 GNULIB_PUTC=1 GNULIB_PUTCHAR=1 GNULIB_FPUTS=1 GNULIB_PUTS=1 GNULIB_FWRITE=1 for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module stdlib: if test $gl_cv_have_include_next = yes; then gl_cv_next_stdlib_h='<'stdlib.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_stdlib_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/stdlib.h#{ s#.*"\(.*/stdlib.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5 $as_echo "$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdlib.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdlib_h fi NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if HAVE_SYS_LOADAVG_H # include #endif #if HAVE_RANDOM_H # include #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module streq: # Code from module strerror: if test $REPLACE_STRERROR = 1; then gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" cat >>confdefs.h <<_ACEOF #define REPLACE_STRERROR $REPLACE_STRERROR _ACEOF fi GNULIB_STRERROR=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_STRERROR 1 _ACEOF # Code from module strftime: gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext" # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. cat >>confdefs.h <<\_ACEOF #define my_strftime nstrftime _ACEOF # Code from module string: # Code from module strtoimax: { $as_echo "$as_me:$LINENO: checking whether defines strtoimax as a macro" >&5 $as_echo_n "checking whether defines strtoimax as a macro... " >&6; } if test "${gl_cv_func_strtoimax_macro+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef strtoimax inttypes_h_defines_strtoimax #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then gl_cv_func_strtoimax_macro=yes else gl_cv_func_strtoimax_macro=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_strtoimax_macro" >&5 $as_echo "$gl_cv_func_strtoimax_macro" >&6; } if test "$gl_cv_func_strtoimax_macro" != yes; then for ac_func in strtoimax do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoimax = no; then { $as_echo "$as_me:$LINENO: checking whether strtoll is declared" >&5 $as_echo_n "checking whether strtoll is declared... " >&6; } if test "${ac_cv_have_decl_strtoll+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strtoll (void) strtoll; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strtoll=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoll=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoll" >&5 $as_echo "$ac_cv_have_decl_strtoll" >&6; } if test "x$ac_cv_have_decl_strtoll" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOLL 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOLL 0 _ACEOF fi fi fi GNULIB_STRTOIMAX=1 # Code from module strtol: for ac_func in strtol do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done # Code from module strtoll: if test "$ac_cv_type_long_long_int" = yes; then for ac_func in strtoll do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoll = no; then HAVE_STRTOLL=0 : fi fi GNULIB_STRTOLL=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_STRTOLL 1 _ACEOF # Code from module strtoul: for ac_func in strtoul do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done # Code from module strtoull: if test "$ac_cv_type_unsigned_long_long_int" = yes; then for ac_func in strtoull do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoull = no; then HAVE_STRTOULL=0 : fi fi GNULIB_STRTOULL=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_STRTOULL 1 _ACEOF # Code from module strtoumax: { $as_echo "$as_me:$LINENO: checking whether defines strtoumax as a macro" >&5 $as_echo_n "checking whether defines strtoumax as a macro... " >&6; } if test "${gl_cv_func_strtoumax_macro+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef strtoumax inttypes_h_defines_strtoumax #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then gl_cv_func_strtoumax_macro=yes else gl_cv_func_strtoumax_macro=no fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_strtoumax_macro" >&5 $as_echo "$gl_cv_func_strtoumax_macro" >&6; } if test "$gl_cv_func_strtoumax_macro" != yes; then for ac_func in strtoumax do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" fi done if test $ac_cv_func_strtoumax = no; then { $as_echo "$as_me:$LINENO: checking whether strtoull is declared" >&5 $as_echo_n "checking whether strtoull is declared... " >&6; } if test "${ac_cv_have_decl_strtoull+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { #ifndef strtoull (void) strtoull; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_strtoull=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_strtoull=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoull" >&5 $as_echo "$ac_cv_have_decl_strtoull" >&6; } if test "x$ac_cv_have_decl_strtoull" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOULL 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRTOULL 0 _ACEOF fi fi fi GNULIB_STRTOUMAX=1 # Code from module sys_socket: case "$host_os" in osf*) cat >>confdefs.h <<\_ACEOF #define _POSIX_PII_SOCKET 1 _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking whether is self-contained" >&5 $as_echo_n "checking whether is self-contained... " >&6; } if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_selfcontained=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_selfcontained=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } if test $gl_cv_header_sys_socket_h_selfcontained = yes; then for ac_func in shutdown do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_shutdown = yes; then { $as_echo "$as_me:$LINENO: checking whether defines the SHUT_* macros" >&5 $as_echo_n "checking whether defines the SHUT_* macros... " >&6; } if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_header_sys_socket_h_shut=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_header_sys_socket_h_shut" >&5 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } if test $gl_cv_header_sys_socket_h_shut = no; then SYS_SOCKET_H='sys/socket.h' fi fi fi # We need to check for ws2tcpip.h now. if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_socket_h='<'sys/socket.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sys_socket_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_socket_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sys/socket.h#{ s#.*"\(.*/sys/socket.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sys_socket_h='<'sys/socket.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_socket_h" >&5 $as_echo "$gl_cv_next_sys_socket_h" >&6; } fi NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/socket.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_socket_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive if test $ac_cv_header_sys_socket_h = yes; then HAVE_SYS_SOCKET_H=1 HAVE_WS2TCPIP_H=0 else HAVE_SYS_SOCKET_H=0 for ac_header in ws2tcpip.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_ws2tcpip_h = yes; then HAVE_WS2TCPIP_H=1 else HAVE_WS2TCPIP_H=0 fi fi { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 $as_echo_n "checking for struct sockaddr_storage... " >&6; } if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_struct_sockaddr_storage=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (struct sockaddr_storage)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((struct sockaddr_storage))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_sockaddr_storage=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; } if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 $as_echo_n "checking for sa_family_t... " >&6; } if test "${ac_cv_type_sa_family_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_sa_family_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof (sa_family_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* sys/types.h is not needed according to POSIX, but the sys/socket.h in i386-unknown-freebsd4.10 and powerpc-apple-darwin5.5 required it. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { if (sizeof ((sa_family_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_sa_family_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5 $as_echo "$ac_cv_type_sa_family_t" >&6; } if test "x$ac_cv_type_sa_family_t" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SA_FAMILY_T 1 _ACEOF fi if test $ac_cv_type_struct_sockaddr_storage = no; then HAVE_STRUCT_SOCKADDR_STORAGE=0 fi if test $ac_cv_type_sa_family_t = no; then HAVE_SA_FAMILY_T=0 fi if test $ac_cv_type_struct_sockaddr_storage != no; then { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5 $as_echo_n "checking for struct sockaddr_storage.ss_family... " >&6; } if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { static struct sockaddr_storage ac_aggr; if (ac_aggr.ss_family) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_storage_ss_family=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif int main () { static struct sockaddr_storage ac_aggr; if (sizeof ac_aggr.ss_family) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_storage_ss_family=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_sockaddr_storage_ss_family=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; } if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 _ACEOF else HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 fi fi if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then SYS_SOCKET_H='sys/socket.h' fi if test $ac_cv_header_sys_socket_h != yes; then for ac_header in winsock2.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$ac_cv_header_winsock2_h" = yes; then HAVE_WINSOCK2_H=1 UNISTD_H_HAVE_WINSOCK2_H=1 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else HAVE_WINSOCK2_H=0 fi for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Some systems require prerequisite headers. */ #include #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } # Code from module sys_time: { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } # Code from module sysexits: if test $ac_cv_header_sysexits_h = yes; then HAVE_SYSEXITS_H=1 if test $gl_cv_have_include_next = yes; then gl_cv_next_sysexits_h='<'sysexits.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_sysexits_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sysexits_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_sysexits_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/sysexits.h#{ s#.*"\(.*/sysexits.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_sysexits_h='<'sysexits.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_sysexits_h" >&5 $as_echo "$gl_cv_next_sysexits_h" >&6; } fi NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sysexits.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sysexits_h fi NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { switch (0) { case EX_OK: case EX_USAGE: case EX_DATAERR: case EX_NOINPUT: case EX_NOUSER: case EX_NOHOST: case EX_UNAVAILABLE: case EX_SOFTWARE: case EX_OSERR: case EX_OSFILE: case EX_CANTCREAT: case EX_IOERR: case EX_TEMPFAIL: case EX_PROTOCOL: case EX_NOPERM: case EX_CONFIG: break; } ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then SYSEXITS_H= else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 SYSEXITS_H=sysexits.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else HAVE_SYSEXITS_H=0 SYSEXITS_H=sysexits.h fi # Code from module time: # Code from module time_r: if test $ac_cv_have_decl_localtime_r = no; then HAVE_DECL_LOCALTIME_R=0 fi if test $ac_cv_func_localtime_r = yes; then HAVE_LOCALTIME_R=1 { $as_echo "$as_me:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } if test "${gl_cv_time_r_posix+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { /* We don't need to append 'restrict's to the argument types, even though the POSIX signature has the 'restrict's, since C99 says they can't affect type compatibility. */ struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; if (ptr) return 0; /* Check the return type is a pointer. On HP-UX 10 it is 'int'. */ *localtime_r (0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_time_r_posix=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_time_r_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 $as_echo "$gl_cv_time_r_posix" >&6; } if test $gl_cv_time_r_posix = yes; then REPLACE_LOCALTIME_R=0 else REPLACE_LOCALTIME_R=1 fi else HAVE_LOCALTIME_R=0 fi if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" : fi GNULIB_TIME_R=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_TIME_R 1 _ACEOF # Code from module unistd: if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_unistd_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_unistd_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/unistd.h#{ s#.*"\(.*/unistd.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 $as_echo "$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'unistd.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_unistd_h fi NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module vasnprintf: if test $ac_cv_func_vasnprintf = no; then gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" if test $ac_cv_func_vasnprintf = yes; then cat >>confdefs.h <<\_ACEOF #define REPLACE_VASNPRINTF 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 $as_echo_n "checking for ptrdiff_t... " >&6; } if test "${ac_cv_type_ptrdiff_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_ptrdiff_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (ptrdiff_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((ptrdiff_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ptrdiff_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 $as_echo "$ac_cv_type_ptrdiff_t" >&6; } if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define ptrdiff_t long _ACEOF fi fi # Code from module vasprintf: for ac_func in vasprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_func_vasprintf = no; then gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext" if test $ac_cv_func_vasprintf = yes; then REPLACE_VASPRINTF=1 else HAVE_VASPRINTF=0 fi fi GNULIB_VASPRINTF=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_VASPRINTF 1 _ACEOF XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format" XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format" # Code from module verify: # Code from module warn-on-use: # Code from module wchar: if test $gl_cv_have_include_next = yes; then gl_cv_next_wchar_h='<'wchar.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_wchar_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wchar_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wchar.h#{ s#.*"\(.*/wchar.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 $as_echo "$gl_cv_next_wchar_h" >&6; } fi NEXT_WCHAR_H=$gl_cv_next_wchar_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wchar.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wchar_h fi NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive if test $ac_cv_header_wchar_h = yes; then HAVE_WCHAR_H=1 else HAVE_WCHAR_H=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module wcrtomb: if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX and OSF/1. aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac if test $LOCALE_JA != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_incomplete_state=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_incomplete_state=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on Solaris 8. solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; esac if test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { /* This fails on Solaris 8: mbrtowc returns 2, and sets wc to 0x00F0. mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ mbstate_t state; wchar_t wc; memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) return 1; } return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_mbrtowc_sanitycheck=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_mbrtowc_sanitycheck=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } REPLACE_MBSTATE_T=0 case "$gl_cv_func_mbrtowc_incomplete_state" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac case "$gl_cv_func_mbrtowc_sanitycheck" in *yes) ;; *) REPLACE_MBSTATE_T=1 ;; esac else REPLACE_MBSTATE_T=1 fi if test $REPLACE_MBSTATE_T = 1; then : fi if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 else { $as_echo "$as_me:$LINENO: checking whether wcrtomb return value is correct" >&5 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; } if test "${gl_cv_func_wcrtomb_retval+set}" = set; then $as_echo_n "(cached) " >&6 else case "$host_os" in # Guess no on AIX 4, OSF/1 and Solaris. aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; # Guess yes otherwise. *) gl_cv_func_wcrtomb_retval="guessing yes" ;; esac if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include int main () { int result = 0; if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 1; } if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 2; } if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 4; } if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) { if (wcrtomb (NULL, 0, NULL) != 1) result |= 8; } return result; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_wcrtomb_retval=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_wcrtomb_retval=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_wcrtomb_retval" >&5 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } case "$gl_cv_func_wcrtomb_retval" in *yes) ;; *) REPLACE_WCRTOMB=1 ;; esac fi fi if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then : gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext" : fi GNULIB_WCRTOMB=1 cat >>confdefs.h <<\_ACEOF #define GNULIB_TEST_WCRTOMB 1 _ACEOF # Code from module wctype-h: if test $ac_cv_func_iswcntrl = yes; then HAVE_ISWCNTRL=1 else HAVE_ISWCNTRL=0 fi if test $gt_cv_c_wint_t = yes; then HAVE_WINT_T=1 else HAVE_WINT_T=0 fi if test $gl_cv_have_include_next = yes; then gl_cv_next_wctype_h='<'wctype.h'>' else { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } if test "${gl_cv_next_wctype_h+set}" = set; then $as_echo_n "(cached) " >&6 else if test $ac_cv_header_wctype_h = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n '\#/wctype.h#{ s#.*"\(.*/wctype.h\)".*#\1# s#^/[^/]#//&# p q }'`'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_next_wctype_h" >&5 $as_echo "$gl_cv_next_wctype_h" >&6; } fi NEXT_WCTYPE_H=$gl_cv_next_wctype_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'wctype.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_wctype_h fi NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then { $as_echo "$as_me:$LINENO: checking whether iswcntrl works" >&5 $as_echo_n "checking whether iswcntrl works... " >&6; } if test "${gl_cv_func_iswcntrl_works+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_func_iswcntrl_works=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_func_iswcntrl_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include int main () { return iswprint ('x') == 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gl_cv_func_iswcntrl_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gl_cv_func_iswcntrl_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $gl_cv_func_iswcntrl_works" >&5 $as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi HAVE_WCTYPE_H=1 else HAVE_WCTYPE_H=0 fi if test "$gl_cv_func_iswcntrl_works" = no; then REPLACE_ISWCNTRL=1 else REPLACE_ISWCNTRL=0 fi if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then : fi { $as_echo "$as_me:$LINENO: checking for wctype_t" >&5 $as_echo_n "checking for wctype_t... " >&6; } if test "${gl_cv_type_wctype_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #if HAVE_WCTYPE_H # include #endif wctype_t a; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_type_wctype_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_type_wctype_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_type_wctype_t" >&5 $as_echo "$gl_cv_type_wctype_t" >&6; } if test $gl_cv_type_wctype_t = no; then HAVE_WCTYPE_T=0 fi { $as_echo "$as_me:$LINENO: checking for wctrans_t" >&5 $as_echo_n "checking for wctrans_t... " >&6; } if test "${gl_cv_type_wctrans_t+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #include #include wctrans_t a; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gl_cv_type_wctrans_t=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gl_cv_type_wctrans_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gl_cv_type_wctrans_t" >&5 $as_echo "$gl_cv_type_wctrans_t" >&6; } if test $gl_cv_type_wctrans_t = no; then HAVE_WCTRANS_T=0 fi for gl_func in wctype iswctype wctrans towctrans ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include # include # include # include #endif #include int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_gl_Symbol=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_gl_Symbol'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # Code from module xalloc: gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext" : : # Code from module xgetdomainname: # Code from module xgethostname: # Code from module xsize: for ac_header in stdint.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # End of code from modules gltests_libdeps= gltests_ltlibdeps= gl_source_base='tests' gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS gl_module_indicator_condition=$gltests_WITNESS LIBGNU_LIBDEPS="$gl_libdeps" LIBGNU_LTLIBDEPS="$gl_ltlibdeps" { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* 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"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 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; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for pid_t" >&5 $as_echo_n "checking for pid_t... " >&6; } if test "${ac_cv_type_pid_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_pid_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((pid_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 $as_echo "$ac_cv_type_pid_t" >&6; } if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for off_t" >&5 $as_echo_n "checking for off_t... " >&6; } if test "${ac_cv_type_off_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_off_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((off_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 $as_echo "$ac_cv_type_off_t" >&6; } if test "x$ac_cv_type_off_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_socklen_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif #ifdef HAVE_SOCKET_H # include #endif int main () { if (sizeof (socklen_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif #ifdef HAVE_SOCKET_H # include #endif int main () { if (sizeof ((socklen_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_socklen_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 $as_echo "$ac_cv_type_socklen_t" >&6; } if test "x$ac_cv_type_socklen_t" = x""yes; then : else cat >>confdefs.h <<\_ACEOF #define socklen_t int _ACEOF fi { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_signal=int else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in gethostname select socket strdup strerror strtol \ setegid setregid setresgid seteuid setreuid \ sysconf getdtablesize do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Crypt { $as_echo "$as_me:$LINENO: checking whether crypt is declared" >&5 $as_echo_n "checking whether crypt is declared... " >&6; } if test "${ac_cv_have_decl_crypt+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef HAVE_CRYPT_H # include #endif int main () { #ifndef crypt (void) crypt; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_have_decl_crypt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_have_decl_crypt=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_crypt" >&5 $as_echo "$ac_cv_have_decl_crypt" >&6; } if test "x$ac_cv_have_decl_crypt" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CRYPT 1 _ACEOF else cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CRYPT 0 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } if test "${ac_cv_lib_crypt_crypt+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char crypt (); int main () { return crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_crypt_crypt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypt_crypt=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } if test "x$ac_cv_lib_crypt_crypt" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF LIBS="-lcrypt $LIBS" fi # Gettext. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-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 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${acl_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&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 acl_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. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:$LINENO: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if test "${acl_cv_rpath+set}" = set; then $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBICONV_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:$LINENO: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if test "${am_cv_func_iconv+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_func_iconv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if test "${am_cv_func_iconv_works+set}" = set; then $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_iconv_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if test "${am_cv_proto_iconv+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 $as_echo "${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.17 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_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 { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGMERGE+set}" = set; then $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gt_cv_func_CFPreferencesCopyAppValue=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_CFPreferencesCopyAppValue=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CFPREFERENCESCOPYAPPVALUE 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gt_cv_func_CFLocaleCopyCurrent=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_CFLocaleCopyCurrent=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CFLOCALECOPYCURRENT 1 _ACEOF fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$gt_func_gnugettext_libc=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$gt_func_gnugettext_libc=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:$LINENO: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if test "${am_cv_func_iconv+set}" = set; then $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_func_iconv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if test "${am_cv_func_iconv_works+set}" = set; then $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv_works=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_iconv_works=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBINTL_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$gt_func_gnugettext_libintl=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$gt_func_gnugettext_libintl=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF else USE_NLS=no fi fi { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:$LINENO: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi POSUB=po fi INTLLIBS="$LIBINTL" ac_config_links="$ac_config_links include/gettext.h:gnu/gettext.h" # Check for zlib if test "${ac_cv_header_zlib_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 $as_echo_n "checking for zlib.h... " >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 $as_echo "$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 $as_echo_n "checking zlib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 $as_echo_n "checking zlib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 $as_echo_n "checking for zlib.h... " >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 $as_echo "$ac_cv_header_zlib_h" >&6; } fi if test "x$ac_cv_header_zlib_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5 $as_echo_n "checking for inflate in -lz... " >&6; } if test "${ac_cv_lib_z_inflate+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inflate (); int main () { return inflate (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_z_inflate=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_inflate=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5 $as_echo "$ac_cv_lib_z_inflate" >&6; } if test "x$ac_cv_lib_z_inflate" = x""yes; then cat >>confdefs.h <<_ACEOF #define USE_LIBZ 1 _ACEOF LIBZ=-lz fi fi LOG_FACILITY="LOG_DAEMON" if test -n "$LOG_FACILITY"; then logfacility=`echo $LOG_FACILITY | tr a-z A-Z` case $logfacility in USER|DAEMON|AUTH|AUTHPRIV|MAIL|CRON|LOCAL[0-7]) LOG_FACILITY=LOG_$logfacility;; LOG_USER|LOG_DAEMON|LOG_AUTH|LOG_AUTHPRIV|LOG_MAIL|LOG_CRON|LOG_LOCAL[0-7]) LOG_FACILITY=$logfacility;; *) { { $as_echo "$as_me:$LINENO: error: Invalid value of LOG_FACILITY" >&5 $as_echo "$as_me: error: Invalid value of LOG_FACILITY" >&2;} { (exit 1); exit 1; }; };; esac fi cat >>confdefs.h <<_ACEOF #define LOG_FACILITY $LOG_FACILITY _ACEOF if test -z "$DEFAULT_DICT_SERVER" ; then DEFAULT_DICT_SERVER="gnu.org.ua" fi # Grecs configuration system 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:$LINENO: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test "$LEX" = :; then LEX=${am_missing_run}flex fi { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi GRECS_SUBDIR=grecs # ********************** # Preprocessor # ********************** # Check whether --with-preprocessor was given. if test "${with_preprocessor+set}" = set; then withval=$with_preprocessor; case "${withval}" in yes) use_ext_pp=yes ;; no) use_ext_pp=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --with-preprocessor" >&5 $as_echo "$as_me: error: bad value ${withval} for --with-preprocessor" >&2;} { (exit 1); exit 1; }; } ;; esac else use_ext_pp=yes fi if test $use_ext_pp != no; then # Check for default preprocessor if test -z "$DEFAULT_PREPROCESSOR" ; then DEFAULT_PREPROCESSOR="m4 -s" fi save_PATH=$PATH PREPROC_OPTIONS=`echo $DEFAULT_PREPROCESSOR | sed -n 's/[^ ][^ ]* //p'` case "$DEFAULT_PREPROCESSOR" in /*) PATH=`expr $DEFAULT_PREPROCESSOR : '\(.*\)/.*'`:$PATH DEFAULT_PREPROCESSOR=`expr $DEFAULT_PREPROCESSOR : '.*/\(.*\)'`;; esac # Extract the first word of "$DEFAULT_PREPROCESSOR", so it can be a program name with args. set dummy $DEFAULT_PREPROCESSOR; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else case $PPBIN in [\\/]* | ?:[\\/]*) ac_cv_path_PPBIN="$PPBIN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PPBIN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PPBIN=$ac_cv_path_PPBIN if test -n "$PPBIN"; then { $as_echo "$as_me:$LINENO: result: $PPBIN" >&5 $as_echo "$PPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi DEFAULT_PREPROCESSOR=$PPBIN if test -n "$DEFAULT_PREPROCESSOR"; then DEFAULT_PREPROCESSOR="$DEFAULT_PREPROCESSOR $PREPROC_OPTIONS" PP_SETUP_FILE='pp-setup' if test -n "$PP_SETUP_FILE"; then case $PPBIN in *m4) ;; # Install default pp-setup *) PP_SETUP_FILE=;; # Skip it esac fi fi PATH=$save_PATH DEFAULT_PREPROCESSOR="\\\"$DEFAULT_PREPROCESSOR\\\"" else DEFAULT_PREPROCESSOR=NULL fi ac_config_commands="$ac_config_commands grecs/tests/atconfig" ac_config_files="$ac_config_files grecs/tests/Makefile grecs/tests/atlocal" AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"} GRECS_TESTDIR=tests for ac_header in getopt.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in sysconf getdtablesize getopt_long do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done GRECS_BUILD_AUX="build-aux/getopt.m4" GRECS_BUILD_AUX="$GRECS_BUILD_AUX build-aux/git2chg.awk" if false; then GRECS_COND_META1_PARSER_TRUE= GRECS_COND_META1_PARSER_FALSE='#' else GRECS_COND_META1_PARSER_TRUE='#' GRECS_COND_META1_PARSER_FALSE= fi if false; then GRECS_COND_BIND_PARSER_TRUE= GRECS_COND_BIND_PARSER_FALSE='#' else GRECS_COND_BIND_PARSER_TRUE='#' GRECS_COND_BIND_PARSER_FALSE= fi if false; then GRECS_COND_GIT_PARSER_TRUE= GRECS_COND_GIT_PARSER_FALSE='#' else GRECS_COND_GIT_PARSER_TRUE='#' GRECS_COND_GIT_PARSER_FALSE= fi if false; then GRECS_COND_INSTALLHEADERS_TRUE= GRECS_COND_INSTALLHEADERS_FALSE='#' else GRECS_COND_INSTALLHEADERS_TRUE='#' GRECS_COND_INSTALLHEADERS_FALSE= fi GRECS_SRCDIR=grecs GRECS_INCLUDES='-I$(top_srcdir)/grecs/src' GRECS_INCLUDE_DIR='$(pkgincludedir)' GRECS_LDADD='$(top_builddir)/grecs/src/libgrecs.la' GRECS_CHANGELOG='#' GRECS_README=README.submodule ac_config_files="$ac_config_files grecs/src/Makefile:grecs/src/Make-shared.in" ac_config_files="$ac_config_files grecs/Makefile" GRECS_HOST_PROJECT_INCLUDES='-I$(top_srcdir)/gnu -I$(top_builddir)/gnu' # Check for Guile if test "$LEX" = :; then LEX=${am_missing_run}flex fi GINT_MODULE_DIR=gint if false; then GINT_COND_INC_TRUE= GINT_COND_INC_FALSE='#' else GINT_COND_INC_TRUE='#' GINT_COND_INC_FALSE= fi if false; then GINT_COND_DOC_TRUE= GINT_COND_DOC_FALSE='#' else GINT_COND_DOC_TRUE='#' GINT_COND_DOC_FALSE= fi if false; then GINT_COND_SNARF_DOC_FILTER_TRUE= GINT_COND_SNARF_DOC_FILTER_FALSE='#' else GINT_COND_SNARF_DOC_FILTER_TRUE='#' GINT_COND_SNARF_DOC_FILTER_FALSE= fi gint_guile_status=no # Check whether --with-guile was given. if test "${with_guile+set}" = set; then withval=$with_guile; gint_enable_guile=$withval else gint_enable_guile=yes fi if test "$gint_enable_guile" = yes; then # Extract the first word of "guile-config", so it can be a program name with args. set dummy guile-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GUILE_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $GUILE_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GUILE_CONFIG="$GUILE_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GUILE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GUILE_CONFIG" && ac_cv_path_GUILE_CONFIG="no" ;; esac fi GUILE_CONFIG=$ac_cv_path_GUILE_CONFIG if test -n "$GUILE_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $GUILE_CONFIG" >&5 $as_echo "$GUILE_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$GUILE_CONFIG" = no; then status_guile=no else # Extract the first word of "guile-snarf", so it can be a program name with args. set dummy guile-snarf; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GUILE_SNARF+set}" = set; then $as_echo_n "(cached) " >&6 else case $GUILE_SNARF in [\\/]* | ?:[\\/]*) ac_cv_path_GUILE_SNARF="$GUILE_SNARF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GUILE_SNARF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GUILE_SNARF=$ac_cv_path_GUILE_SNARF if test -n "$GUILE_SNARF"; then { $as_echo "$as_me:$LINENO: result: $GUILE_SNARF" >&5 $as_echo "$GUILE_SNARF" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "guile-tools", so it can be a program name with args. set dummy guile-tools; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GUILE_TOOLS+set}" = set; then $as_echo_n "(cached) " >&6 else case $GUILE_TOOLS in [\\/]* | ?:[\\/]*) ac_cv_path_GUILE_TOOLS="$GUILE_TOOLS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GUILE_TOOLS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GUILE_TOOLS=$ac_cv_path_GUILE_TOOLS if test -n "$GUILE_TOOLS"; then { $as_echo "$as_me:$LINENO: result: $GUILE_TOOLS" >&5 $as_echo "$GUILE_TOOLS" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi GUILE_INCLUDES=`$GUILE_CONFIG compile` GUILE_LIBS=`$GUILE_CONFIG link` GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed 's/guile-config [^0-9]* \([0-9][0-9.]*\)$/\1/'` VEX=`echo $GUILE_VERSION | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'` GUILE_VERSION_NUMBER=`eval expr "$VEX"` gint_guile_status=ok if test $GUILE_VERSION_NUMBER -lt 1800; then gint_guile_status=badversion fi if test $gint_guile_status = ok; then save_LIBS=$LIBS save_CFLAGS=$CFLAGS LIBS="$LIBS $GUILE_LIBS" CFLAGS="$CFLAGS $GUILE_INCLUDES" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { scm_shell(0, NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gint_guile_status=cantlink fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$save_LIBS CFLAGS=$save_CFLAGS fi fi if test $gint_guile_status != ok; then GUILE_INCLUDES= GUILE_LIBS= GUILE_VERSION= GUILE_VERSION_NUMBER= status_guile=no else save_LIBS=$LIBS save_CFLAGS=$CFLAGS LIBS="$LIBS $GUILE_LIBS" CFLAGS="$CFLAGS $GUILE_INCLUDES" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { SCM_DEVAL_P = 1; SCM_BACKTRACE_P = 1; SCM_RECORD_POSITIONS_P = 1; SCM_RESET_DEBUG_MODE; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then gint_guile_debug=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gint_guile_debug=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $gint_guile_debug = yes; then cat >>confdefs.h <<_ACEOF #define GUILE_DEBUG_MACROS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for scm_t_off" >&5 $as_echo_n "checking for scm_t_off... " >&6; } if test "${ac_cv_type_scm_t_off+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_scm_t_off=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof (scm_t_off)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { if (sizeof ((scm_t_off))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_scm_t_off=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_scm_t_off" >&5 $as_echo "$ac_cv_type_scm_t_off" >&6; } if test "x$ac_cv_type_scm_t_off" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_SCM_T_OFF 1 _ACEOF fi LIBS=$save_LIBS CFLAGS=$save_CFLAGS # Check whether --with-guile-site-dir was given. if test "${with_guile_site_dir+set}" = set; then withval=$with_guile_site_dir; case $withval in /*) GUILE_SITE=$withval;; yes) GUILE_SITE=`guile -c '(write (%site-dir)) (newline)'`;; *) { { $as_echo "$as_me:$LINENO: error: Argument to --with-guile-site-dir must be an absolute directory name" >&5 $as_echo "$as_me: error: Argument to --with-guile-site-dir must be an absolute directory name" >&2;} { (exit 1); exit 1; }; };; esac else GUILE_SITE=`guile -c '(write (%site-dir)) (newline)'` pfx=$prefix test "x$pfx" = xNONE && pfx=$ac_default_prefix case $GUILE_SITE in $pfx/*) ;; # OK *) { $as_echo "$as_me:$LINENO: WARNING: guile site directory $GUILE_SITE lies outside your current prefix ($pfx)." >&5 $as_echo "$as_me: WARNING: guile site directory $GUILE_SITE lies outside your current prefix ($pfx)." >&2;} GUILE_SITE='$(datadir)/guile/site' { $as_echo "$as_me:$LINENO: WARNING: Falling back to ${GUILE_SITE} instead. Use --with-guile-site-dir to force using site directory." >&5 $as_echo "$as_me: WARNING: Falling back to ${GUILE_SITE} instead. Use --with-guile-site-dir to force using site directory." >&2;} ;; esac fi cat >>confdefs.h <<_ACEOF #define GUILE_VERSION "$GUILE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define GUILE_VERSION_NUMBER $GUILE_VERSION_NUMBER _ACEOF status_guile=yes fi else status_guile=no fi if test $status_guile = yes; then GUILE_COND_TRUE= GUILE_COND_FALSE='#' else GUILE_COND_TRUE='#' GUILE_COND_FALSE= fi # Check for Python # Check whether --with-python was given. if test "${with_python+set}" = set; then withval=$with_python; case "${withval}" in yes) status_python=yes ;; no) status_python=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --without-python" >&5 $as_echo "$as_me: error: bad value ${withval} for --without-python" >&2;} { (exit 1); exit 1; }; } ;; esac else status_python=yes fi if test "$status_python" = yes; then # Extract the first word of "python-config", so it can be a program name with args. set dummy python-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PYTHON_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PYTHON_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON_CONFIG="$PYTHON_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PYTHON_CONFIG" >&5 $as_echo "$PYTHON_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$PYTHON_CONFIG"; then PYTHON_LIBS=`python-config --libs` PYTHON_INCLUDES=`python-config --includes` else status_python=no fi fi if test $status_python = yes; then PYTHON_COND_TRUE= PYTHON_COND_FALSE='#' else PYTHON_COND_TRUE='#' PYTHON_COND_FALSE= fi # Tcl/tk # Check whether --with-tk was given. if test "${with_tk+set}" = set; then withval=$with_tk; case "${withval}" in yes) status_tk=yes ;; no) status_tk=no;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --with-tk" >&5 $as_echo "$as_me: error: bad value ${withval} for --with-tk" >&2;} { (exit 1); exit 1; }; } esac else status_tk=yes fi if test $status_tk=yes; then # Extract the first word of "wish", so it can be a program name with args. set dummy wish; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_WISH+set}" = set; then $as_echo_n "(cached) " >&6 else case $WISH in [\\/]* | ?:[\\/]*) ac_cv_path_WISH="$WISH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_WISH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi WISH=$ac_cv_path_WISH if test -n "$WISH"; then { $as_echo "$as_me:$LINENO: result: $WISH" >&5 $as_echo "$WISH" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$WISH"; then status_tk=no fi if test $status_tk = yes; then TK_WISH_COND_TRUE= TK_WISH_COND_FALSE='#' else TK_WISH_COND_TRUE='#' TK_WISH_COND_FALSE= fi fi # Check for libpcre # Check whether --with-pcre was given. if test "${with_pcre+set}" = set; then withval=$with_pcre; case "${withval}" in yes) status_pcre=yes ;; no) status_pcre=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --with-pcre" >&5 $as_echo "$as_me: error: bad value ${withval} for --with-pcre" >&2;} { (exit 1); exit 1; }; } ;; esac else status_pcre=yes fi if test $status_pcre = yes; then if test "${ac_cv_header_pcre_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for pcre.h" >&5 $as_echo_n "checking for pcre.h... " >&6; } if test "${ac_cv_header_pcre_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 $as_echo "$ac_cv_header_pcre_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking pcre.h usability" >&5 $as_echo_n "checking pcre.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking pcre.h presence" >&5 $as_echo_n "checking pcre.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: pcre.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: pcre.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: pcre.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pcre.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: pcre.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pcre.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: pcre.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: pcre.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pcre.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: pcre.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: pcre.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: pcre.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for pcre.h" >&5 $as_echo_n "checking for pcre.h... " >&6; } if test "${ac_cv_header_pcre_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_pcre_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pcre_h" >&5 $as_echo "$ac_cv_header_pcre_h" >&6; } fi if test "x$ac_cv_header_pcre_h" = x""yes; then : else status_pcre=no fi if test $status_pcre = yes; then { $as_echo "$as_me:$LINENO: checking for main in -lpcre" >&5 $as_echo_n "checking for main in -lpcre... " >&6; } if test "${mu_cv_lib_pcre+set}" = set; then $as_echo_n "(cached) " >&6 else mu_cv_lib_pcre=no dico_check_lib_save_LIBS=$LIBS for path in "" do if test -n "$path"; then dico_ldflags="-L$path -lpcre " else dico_ldflags="-lpcre " fi LIBS="$dico_ldflags $mu_check_lib_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then mu_cv_lib_pcre="$mu_ldflags" break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done LIBS=$dico_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $mu_cv_lib_pcre" >&5 $as_echo "$mu_cv_lib_pcre" >&6; } if test "$mu_cv_lib_pcre" != no; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPCRE 1 _ACEOF LIBS="-lpcre $LIBS" else status_pcre=no fi fi fi if test $status_pcre = yes; then PCRE_COND_TRUE= PCRE_COND_FALSE='#' else PCRE_COND_TRUE='#' PCRE_COND_FALSE= fi # # Check whether --with-autologin-file was given. if test "${with_autologin_file+set}" = set; then withval=$with_autologin_file; case $withval in yes) DEFAULT_AUTOLOGIN_FILE=".dicologin";; no) DEFAULT_AUTOLOGIN_FILE=;; *) DEFAULT_AUTOLOGIN_FILE=$withval;; esac else DEFAULT_AUTOLOGIN_FILE=".dicologin" fi if test -n "$DEFAULT_AUTOLOGIN_FILE" ; then cat >>confdefs.h <<_ACEOF #define DEFAULT_AUTOLOGIN_FILE "$DEFAULT_AUTOLOGIN_FILE" _ACEOF else cat >>confdefs.h <<_ACEOF #define DEFAULT_AUTOLOGIN_FILE NULL _ACEOF fi # Check whether --with-readline was given. if test "${with_readline+set}" = set; then withval=$with_readline; case "${withval}" in yes) status_readline=yes ;; no) status_readline=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --without-readline" >&5 $as_echo "$as_me: error: bad value ${withval} for --without-readline" >&2;} { (exit 1); exit 1; }; } ;; esac else status_readline=yes fi # Test for GNU Readline if test "$status_readline" != "no"; then CURSES_LIBS= for lib in ncurses curses termcap do as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_tputs" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for tputs in -l$lib" >&5 $as_echo_n "checking for tputs in -l$lib... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tputs (); int main () { return tputs (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then CURSES_LIBS="-l$lib"; break fi done saved_LIBS=$LIBS LIBS="$LIBS $CURSES_LIBS" { $as_echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if test "${ac_cv_lib_readline_readline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_readline_readline=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_readline_readline=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = x""yes; then mf_have_readline=yes fi LIBS=$saved_LIBS if test "$mf_have_readline" = "yes"; then for ac_header in readline/readline.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define WITH_READLINE 1 _ACEOF fi done READLINE_LIBS="-lreadline $CURSES_LIBS" saved_LIBS=$LIBS LIBS="$LIBS $READLINE_LIBS" for ac_func in rl_completion_matches do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* 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 #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS=$saved_LIBS status_readline="yes" else if test "$status_readline" = "yes"; then { $as_echo "$as_me:$LINENO: WARNING: readline requested but does not seem to be installed" >&5 $as_echo "$as_me: WARNING: readline requested but does not seem to be installed" >&2;} fi status_readline="no" fi fi # GNU SASL status_gsasl=no if test "${mu_cv_lib_gsasl+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$mu_cv_lib_gsasl" = x; then cached="" mu_cv_lib_gsasl=no # Check whether --with-gsasl was given. if test "${with_gsasl+set}" = set; then withval=$with_gsasl; case $withval in yes|no) wantgsasl=$withval;; *) { { $as_echo "$as_me:$LINENO: error: bad value for --with-gsasl: $withval" >&5 $as_echo "$as_me: error: bad value for --with-gsasl: $withval" >&2;} { (exit 1); exit 1; }; };; esac else wantgsasl=yes fi if test $wantgsasl = yes; then if test "${ac_cv_header_gsasl_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for gsasl.h" >&5 $as_echo_n "checking for gsasl.h... " >&6; } if test "${ac_cv_header_gsasl_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gsasl_h" >&5 $as_echo "$ac_cv_header_gsasl_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking gsasl.h usability" >&5 $as_echo_n "checking gsasl.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking gsasl.h presence" >&5 $as_echo_n "checking gsasl.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: gsasl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: gsasl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: gsasl.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: gsasl.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: gsasl.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: gsasl.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: gsasl.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: gsasl.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: gsasl.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for gsasl.h" >&5 $as_echo_n "checking for gsasl.h... " >&6; } if test "${ac_cv_header_gsasl_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_gsasl_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gsasl_h" >&5 $as_echo "$ac_cv_header_gsasl_h" >&6; } fi if test "x$ac_cv_header_gsasl_h" = x""yes; then : else wantgsasl=no fi if test $wantgsasl != no; then save_LIBS=$LIBS { $as_echo "$as_me:$LINENO: checking for library containing gsasl_init" >&5 $as_echo_n "checking for library containing gsasl_init... " >&6; } if test "${ac_cv_search_gsasl_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsasl_init (); int main () { return gsasl_init (); ; return 0; } _ACEOF for ac_lib in '' gsasl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_gsasl_init=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_gsasl_init+set}" = set; then break fi done if test "${ac_cv_search_gsasl_init+set}" = set; then : else ac_cv_search_gsasl_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gsasl_init" >&5 $as_echo "$ac_cv_search_gsasl_init" >&6; } ac_res=$ac_cv_search_gsasl_init if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" mu_cv_lib_gsasl=-lgsasl else mu_cv_lib_gsasl=no fi if test $mu_cv_lib_gsasl != no; then LIBS="$LIBS $mu_cv_lib_gsasl" if test "$cross_compiling" = yes; then mu_cv_lib_gsasl=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main() { return gsasl_check_version ("0.2.5") == (char*) 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) mu_cv_lib_gsasl=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi LIBS=$save_LIBS fi fi fi fi if test $mu_cv_lib_gsasl != no; then GSASL_LIBS=$mu_cv_lib_gsasl cat >>confdefs.h <<\_ACEOF #define WITH_GSASL 1 _ACEOF status_gsasl=yes BUILD_LIBDICOSASL='libdicosasl.a' LIBDICOSASL='$(top_builddir)/lib/libdicosasl.a' fi # SASL # Check whether --with-ldap was given. if test "${with_ldap+set}" = set; then withval=$with_ldap; status_ldap=$withval else status_ldap=maybe fi if test $status_ldap != no; then { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5 $as_echo_n "checking for ldap_bind in -lldap... " >&6; } if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ldap_bind (); int main () { return ldap_bind (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_ldap_ldap_bind=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ldap_ldap_bind=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; } if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then status_ldap=yes else if test $status_ldap = yes; then { { $as_echo "$as_me:$LINENO: error: required library ldap is not found" >&5 $as_echo "$as_me: error: required library ldap is not found" >&2;} { (exit 1); exit 1; }; } fi status_ldap=no fi fi if test $status_ldap = yes; then LDAP_COND_TRUE= LDAP_COND_FALSE='#' else LDAP_COND_TRUE='#' LDAP_COND_FALSE= fi # PAM status_pam=maybe # Check whether --enable-pam was given. if test "${enable_pam+set}" = set; then enableval=$enable_pam; case "${enableval}" in yes) status_pam=yes ;; no) status_pam=no ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-pam" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-pam" >&2;} { (exit 1); exit 1; }; } ;; esac else status_pam=maybe fi if test "$status_pam" != "no"; then pam=$status_pam for ac_header in security/pam_appl.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$ac_cv_header_security_pam_appl_h" = "yes"; then { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then PAM_LIBS=-ldl fi { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 $as_echo_n "checking for pam_start in -lpam... " >&6; } if test "${ac_cv_lib_pam_pam_start+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $PAM_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pam_start (); int main () { return pam_start (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_pam_pam_start=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pam_pam_start=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 $as_echo "$ac_cv_lib_pam_pam_start" >&6; } if test "x$ac_cv_lib_pam_pam_start" = x""yes; then status_pam=yes else status_pam=no fi else status_pam=no fi if test $pam = yes && test $pam != $status_pam; then { { $as_echo "$as_me:$LINENO: error: required module PAM cannot be built because of missing prerequisites" >&5 $as_echo "$as_me: error: required module PAM cannot be built because of missing prerequisites" >&2;} { (exit 1); exit 1; }; } fi fi if test $status_pam = yes; then PAM_COND_TRUE= PAM_COND_FALSE='#' else PAM_COND_TRUE='#' PAM_COND_FALSE= fi # WordNet # Check whether --with-wordnet was given. if test "${with_wordnet+set}" = set; then withval=$with_wordnet; case "${withval}" in yes) status_wordnet=req ;; no) status_wordnet=no ;; /*) status_wordnet=req WORDNET_LOPT=-L${withval}/lib WORDNET_IOPT=-I${withval}/include;; *) { { $as_echo "$as_me:$LINENO: error: argument for --with-wordnet must be an absoulute directory name" >&5 $as_echo "$as_me: error: argument for --with-wordnet must be an absoulute directory name" >&2;} { (exit 1); exit 1; }; } ;; esac else status_wordnet=maybe fi if test $status_wordnet != no; then save_LIBS=$LIBS save_CPPFLAGS=$CPPFLAGS LIBS="$LIBS $WORDNET_LOPT" CPPFLAGS="$CPPFLAGS $WORDNET_IOPT" if test "${ac_cv_header_wn_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for wn.h" >&5 $as_echo_n "checking for wn.h... " >&6; } if test "${ac_cv_header_wn_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_wn_h" >&5 $as_echo "$ac_cv_header_wn_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking wn.h usability" >&5 $as_echo_n "checking wn.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking wn.h presence" >&5 $as_echo_n "checking wn.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: wn.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: wn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: wn.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: wn.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: wn.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: wn.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: wn.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: wn.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: wn.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: wn.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: wn.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: wn.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: wn.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: wn.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: wn.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: wn.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------- ## ## Report this to bug-dico@gnu.org ## ## ------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for wn.h" >&5 $as_echo_n "checking for wn.h... " >&6; } if test "${ac_cv_header_wn_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_wn_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_wn_h" >&5 $as_echo "$ac_cv_header_wn_h" >&6; } fi if test "x$ac_cv_header_wn_h" = x""yes; then { $as_echo "$as_me:$LINENO: checking for findtheinfo in -lWN" >&5 $as_echo_n "checking for findtheinfo in -lWN... " >&6; } if test "${ac_cv_lib_WN_findtheinfo+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lWN $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char findtheinfo (); int main () { return findtheinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_WN_findtheinfo=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_WN_findtheinfo=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_WN_findtheinfo" >&5 $as_echo "$ac_cv_lib_WN_findtheinfo" >&6; } if test "x$ac_cv_lib_WN_findtheinfo" = x""yes; then status_wordnet=yes fi fi case $status_wordnet in req) { { $as_echo "$as_me:$LINENO: error: required module wordnet cannot be built because of missing prerequisites" >&5 $as_echo "$as_me: error: required module wordnet cannot be built because of missing prerequisites" >&2;} { (exit 1); exit 1; }; };; maybe) status_wordnet=no;; esac if test $status_wordnet = yes; then WORDNET_COND_TRUE= WORDNET_COND_FALSE='#' else WORDNET_COND_TRUE='#' WORDNET_COND_FALSE= fi LIBS=$save_LIBS CPPFLAGS=$save_CPPFLAGS fi # Imprimatur IMPRIMATUR_MODULE_DIR=imprimatur # Doc hints. # Select a rendition level: # DISTRIB for stable releases (at most one dot in the version number) # and maintenance releases (two dots, patchlevel < 50) # PROOF for alpha releases. # PUBLISH can only be required manually when running make in doc/ case `echo $VERSION|sed 's/[^.]//g'` in ""|".") RENDITION=DISTRIB;; "..") if test `echo $VERSION | sed 's/.*\.//'` -lt 50; then RENDITION=DISTRIB else RENDITION=PROOF fi;; *) RENDITION=PROOF;; esac IMPRIMATUR_MAKEINFOFLAGS='-I $(top_srcdir)/imprimatur -D $(RENDITION)' if false; then IMPRIMATUR_COND_MAKEDOC_TRUE= IMPRIMATUR_COND_MAKEDOC_FALSE='#' else IMPRIMATUR_COND_MAKEDOC_TRUE='#' IMPRIMATUR_COND_MAKEDOC_FALSE= fi if false; then IMPRIMATUR_COND_FRENCHSPACING_TRUE= IMPRIMATUR_COND_FRENCHSPACING_FALSE='#' else IMPRIMATUR_COND_FRENCHSPACING_TRUE='#' IMPRIMATUR_COND_FRENCHSPACING_FALSE= fi if false; then IMPRIMATUR_COND_DIST_INFO_TRUE= IMPRIMATUR_COND_DIST_INFO_FALSE='#' else IMPRIMATUR_COND_DIST_INFO_TRUE='#' IMPRIMATUR_COND_DIST_INFO_FALSE= fi ac_config_files="$ac_config_files imprimatur/Makefile" if false; then ac_config_files="$ac_config_files imprimatur/Makedoc" fi ac_config_commands="$ac_config_commands status" # Tests ac_config_commands="$ac_config_commands lib/tests/atconfig" ac_config_files="$ac_config_files lib/tests/Makefile" ac_config_files="$ac_config_files lib/tests/atlocal" ac_config_commands="$ac_config_commands dicod/tests/atconfig" ac_config_files="$ac_config_files dicod/tests/Makefile" ac_config_files="$ac_config_files dicod/tests/atlocal" ac_config_commands="$ac_config_commands modules/outline/tests/atconfig" ac_config_files="$ac_config_files modules/outline/tests/Makefile" ac_config_files="$ac_config_files modules/outline/tests/atlocal" ac_config_commands="$ac_config_commands modules/gcide/tests/atconfig" ac_config_files="$ac_config_files modules/gcide/tests/Makefile" ac_config_files="$ac_config_files modules/gcide/tests/atlocal" ac_config_commands="$ac_config_commands modules/guile/tests/atconfig" ac_config_files="$ac_config_files modules/guile/tests/Makefile" ac_config_files="$ac_config_files modules/guile/tests/atlocal" ac_config_commands="$ac_config_commands modules/python/tests/atconfig" ac_config_files="$ac_config_files modules/python/tests/Makefile" ac_config_files="$ac_config_files modules/python/tests/atlocal" ac_config_commands="$ac_config_commands modules/stratall/tests/atconfig" ac_config_files="$ac_config_files modules/stratall/tests/Makefile" ac_config_files="$ac_config_files modules/stratall/tests/atlocal" ac_config_commands="$ac_config_commands modules/word/tests/atconfig" ac_config_files="$ac_config_files modules/word/tests/Makefile" ac_config_files="$ac_config_files modules/word/tests/atlocal" ac_config_commands="$ac_config_commands modules/substr/tests/atconfig" ac_config_files="$ac_config_files modules/substr/tests/Makefile" ac_config_files="$ac_config_files modules/substr/tests/atlocal" ac_config_commands="$ac_config_commands modules/nprefix/tests/atconfig" ac_config_files="$ac_config_files modules/nprefix/tests/Makefile" ac_config_files="$ac_config_files modules/nprefix/tests/atlocal" ac_config_files="$ac_config_files Makefile include/Makefile include/dico/Makefile examples/Makefile utils/Makefile gint/Makefile gnu/Makefile lib/Makefile dicod/Makefile modules/Makefile modules/outline/Makefile modules/dict.org/Makefile modules/guile/Makefile modules/python/Makefile modules/stratall/Makefile modules/substr/Makefile modules/pcre/Makefile modules/ldap/Makefile modules/pam/Makefile modules/word/Makefile modules/gcide/Makefile modules/wordnet/Makefile modules/nprefix/Makefile dico/Makefile scripts/Makefile doc/Makefile po/Makefile.in" cat >confcache <<\_ACEOF # 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, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi LT_CONFIG_H=config.h _ltdl_libobjs= _ltdl_ltlibobjs= if test -n "$_LT_LIBOBJS"; then # Remove the extension. _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" done fi ltdl_LIBOBJS=$_ltdl_libobjs ltdl_LTLIBOBJS=$_ltdl_ltlibobjs if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs if test -z "${GRECS_COND_META1_PARSER_TRUE}" && test -z "${GRECS_COND_META1_PARSER_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GRECS_COND_META1_PARSER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GRECS_COND_META1_PARSER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GRECS_COND_BIND_PARSER_TRUE}" && test -z "${GRECS_COND_BIND_PARSER_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GRECS_COND_BIND_PARSER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GRECS_COND_BIND_PARSER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GRECS_COND_GIT_PARSER_TRUE}" && test -z "${GRECS_COND_GIT_PARSER_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GRECS_COND_GIT_PARSER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GRECS_COND_GIT_PARSER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GRECS_COND_INSTALLHEADERS_TRUE}" && test -z "${GRECS_COND_INSTALLHEADERS_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GRECS_COND_INSTALLHEADERS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GRECS_COND_INSTALLHEADERS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GINT_COND_INC_TRUE}" && test -z "${GINT_COND_INC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GINT_COND_INC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GINT_COND_INC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GINT_COND_DOC_TRUE}" && test -z "${GINT_COND_DOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GINT_COND_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GINT_COND_DOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GINT_COND_SNARF_DOC_FILTER_TRUE}" && test -z "${GINT_COND_SNARF_DOC_FILTER_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GINT_COND_SNARF_DOC_FILTER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GINT_COND_SNARF_DOC_FILTER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GUILE_COND_TRUE}" && test -z "${GUILE_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GUILE_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GUILE_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${PYTHON_COND_TRUE}" && test -z "${PYTHON_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"PYTHON_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"PYTHON_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${TK_WISH_COND_TRUE}" && test -z "${TK_WISH_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"TK_WISH_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"TK_WISH_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${PCRE_COND_TRUE}" && test -z "${PCRE_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"PCRE_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"PCRE_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${LDAP_COND_TRUE}" && test -z "${LDAP_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"LDAP_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"LDAP_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${PAM_COND_TRUE}" && test -z "${PAM_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"PAM_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"PAM_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WORDNET_COND_TRUE}" && test -z "${WORDNET_COND_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"WORDNET_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"WORDNET_COND\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${IMPRIMATUR_COND_MAKEDOC_TRUE}" && test -z "${IMPRIMATUR_COND_MAKEDOC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"IMPRIMATUR_COND_MAKEDOC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"IMPRIMATUR_COND_MAKEDOC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${IMPRIMATUR_COND_FRENCHSPACING_TRUE}" && test -z "${IMPRIMATUR_COND_FRENCHSPACING_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"IMPRIMATUR_COND_FRENCHSPACING\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"IMPRIMATUR_COND_FRENCHSPACING\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${IMPRIMATUR_COND_DIST_INFO_TRUE}" && test -z "${IMPRIMATUR_COND_DIST_INFO_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"IMPRIMATUR_COND_DIST_INFO\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"IMPRIMATUR_COND_DIST_INFO\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by GNU dico $as_me 2.2, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ GNU dico config.status 2.2 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" status_guile=$status_guile status_python=$status_python status_gsasl=$status_gsasl status_ldap=$status_ldap status_pam=$status_pam status_readline=$status_readline if test $use_ext_pp = no; then dicopp=no else dicopp="$DEFAULT_PREPROCESSOR" fi status_pcre=$status_pcre status_wordnet=$status_wordnet defserver="$DEFAULT_DICT_SERVER" autologin_file="$DEFAULT_AUTOLOGIN_FILE" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "libltdl/Makefile") CONFIG_FILES="$CONFIG_FILES libltdl/Makefile" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "include/gettext.h") CONFIG_LINKS="$CONFIG_LINKS include/gettext.h:gnu/gettext.h" ;; "grecs/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS grecs/tests/atconfig" ;; "grecs/tests/Makefile") CONFIG_FILES="$CONFIG_FILES grecs/tests/Makefile" ;; "grecs/tests/atlocal") CONFIG_FILES="$CONFIG_FILES grecs/tests/atlocal" ;; "grecs/src/Makefile") CONFIG_FILES="$CONFIG_FILES grecs/src/Makefile:grecs/src/Make-shared.in" ;; "grecs/Makefile") CONFIG_FILES="$CONFIG_FILES grecs/Makefile" ;; "imprimatur/Makefile") CONFIG_FILES="$CONFIG_FILES imprimatur/Makefile" ;; "imprimatur/Makedoc") CONFIG_FILES="$CONFIG_FILES imprimatur/Makedoc" ;; "status") CONFIG_COMMANDS="$CONFIG_COMMANDS status" ;; "lib/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/tests/atconfig" ;; "lib/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tests/Makefile" ;; "lib/tests/atlocal") CONFIG_FILES="$CONFIG_FILES lib/tests/atlocal" ;; "dicod/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS dicod/tests/atconfig" ;; "dicod/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dicod/tests/Makefile" ;; "dicod/tests/atlocal") CONFIG_FILES="$CONFIG_FILES dicod/tests/atlocal" ;; "modules/outline/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/outline/tests/atconfig" ;; "modules/outline/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/outline/tests/Makefile" ;; "modules/outline/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/outline/tests/atlocal" ;; "modules/gcide/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/gcide/tests/atconfig" ;; "modules/gcide/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/gcide/tests/Makefile" ;; "modules/gcide/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/gcide/tests/atlocal" ;; "modules/guile/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/guile/tests/atconfig" ;; "modules/guile/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/guile/tests/Makefile" ;; "modules/guile/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/guile/tests/atlocal" ;; "modules/python/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/python/tests/atconfig" ;; "modules/python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/python/tests/Makefile" ;; "modules/python/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/python/tests/atlocal" ;; "modules/stratall/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/stratall/tests/atconfig" ;; "modules/stratall/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/stratall/tests/Makefile" ;; "modules/stratall/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/stratall/tests/atlocal" ;; "modules/word/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/word/tests/atconfig" ;; "modules/word/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/word/tests/Makefile" ;; "modules/word/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/word/tests/atlocal" ;; "modules/substr/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/substr/tests/atconfig" ;; "modules/substr/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/substr/tests/Makefile" ;; "modules/substr/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/substr/tests/atlocal" ;; "modules/nprefix/tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS modules/nprefix/tests/atconfig" ;; "modules/nprefix/tests/Makefile") CONFIG_FILES="$CONFIG_FILES modules/nprefix/tests/Makefile" ;; "modules/nprefix/tests/atlocal") CONFIG_FILES="$CONFIG_FILES modules/nprefix/tests/atlocal" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/dico/Makefile") CONFIG_FILES="$CONFIG_FILES include/dico/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; "gint/Makefile") CONFIG_FILES="$CONFIG_FILES gint/Makefile" ;; "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "dicod/Makefile") CONFIG_FILES="$CONFIG_FILES dicod/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "modules/outline/Makefile") CONFIG_FILES="$CONFIG_FILES modules/outline/Makefile" ;; "modules/dict.org/Makefile") CONFIG_FILES="$CONFIG_FILES modules/dict.org/Makefile" ;; "modules/guile/Makefile") CONFIG_FILES="$CONFIG_FILES modules/guile/Makefile" ;; "modules/python/Makefile") CONFIG_FILES="$CONFIG_FILES modules/python/Makefile" ;; "modules/stratall/Makefile") CONFIG_FILES="$CONFIG_FILES modules/stratall/Makefile" ;; "modules/substr/Makefile") CONFIG_FILES="$CONFIG_FILES modules/substr/Makefile" ;; "modules/pcre/Makefile") CONFIG_FILES="$CONFIG_FILES modules/pcre/Makefile" ;; "modules/ldap/Makefile") CONFIG_FILES="$CONFIG_FILES modules/ldap/Makefile" ;; "modules/pam/Makefile") CONFIG_FILES="$CONFIG_FILES modules/pam/Makefile" ;; "modules/word/Makefile") CONFIG_FILES="$CONFIG_FILES modules/word/Makefile" ;; "modules/gcide/Makefile") CONFIG_FILES="$CONFIG_FILES modules/gcide/Makefile" ;; "modules/wordnet/Makefile") CONFIG_FILES="$CONFIG_FILES modules/wordnet/Makefile" ;; "modules/nprefix/Makefile") CONFIG_FILES="$CONFIG_FILES modules/nprefix/Makefile" ;; "dico/Makefile") CONFIG_FILES="$CONFIG_FILES dico/Makefile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5 $as_echo "$as_me: error: $ac_source: file not found" >&2;} { (exit 1); exit 1; }; } fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $srcdir in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5 $as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;} { (exit 1); exit 1; }; } fi ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # 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 # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_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=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$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 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # 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 # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_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=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # 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 _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # 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? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; "grecs/tests/atconfig":C) cat >grecs/tests/atconfig <lib/tests/atconfig <dicod/tests/atconfig <modules/outline/tests/atconfig <modules/gcide/tests/atconfig <modules/guile/tests/atconfig <modules/python/tests/atconfig <modules/stratall/tests/atconfig <modules/word/tests/atconfig <modules/substr/tests/atconfig <modules/nprefix/tests/atconfig <&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi dico-2.2/configure.ac000066400000000000000000000307541172612674100146010ustar00rootroot00000000000000dnl Process this file with -*- autoconf -*- to produce a configure script. # This file is part of GNU Dico # Copyright (C) 1998-2000, 2008-2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AC_PREREQ(2.63) AC_INIT([GNU dico], 2.2, [bug-dico@gnu.org]) AC_CONFIG_SRCDIR([dicod/main.c]) AM_CONFIG_HEADER(config.h) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR(m4) AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 dist-xz std-options]) dnl Enable silent rules by default: AM_SILENT_RULES([yes]) dnl Some variables AC_SUBST(DICO_MODDIR,'$(libdir)/$(PACKAGE)') dnl Checks for programs. AC_PROG_CC gl_EARLY AC_PROG_CPP AC_PROG_AWK AC_PROG_YACC AC_PROG_LEX LT_PREREQ(2.2.5a) LT_CONFIG_LTDL_DIR([libltdl]) LT_INIT([dlopen]) LTDL_INIT([recursive]) LT_WITH_LTDL AC_CONFIG_FILES([libltdl/Makefile]) dnl Checks for libraries. AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyaddr) AC_CHECK_LIB(rt, nanosleep) dnl Checks for header files. AC_HEADER_DIRENT dnl not needed ? AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/time.h \ sys/socket.h socket.h syslog.h unistd.h \ crypt.h readline/readline.h) dnl Checks for typedefs, structures, and compiler characteristics. gl_INIT AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_CHECK_TYPE([socklen_t],, AC_DEFINE(socklen_t, int, [Define to int if does not define]), [ #if HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif #ifdef HAVE_SOCKET_H # include #endif ]) dnl Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(gethostname select socket strdup strerror strtol \ setegid setregid setresgid seteuid setreuid \ sysconf getdtablesize) # Crypt AC_CHECK_DECLS(crypt,,,[ #include #ifdef HAVE_CRYPT_H # include #endif]) AH_BOTTOM([ #if !HAVE_DECL_CRYPT char *crypt(const char *key, const char *salt); #endif]) AC_CHECK_LIB(crypt, crypt) # Gettext. AM_ICONV AM_GNU_GETTEXT([external], [need-formatstring-macros]) AM_GNU_GETTEXT_VERSION([0.17]) AC_CONFIG_LINKS(include/gettext.h:gnu/gettext.h) # Check for zlib AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflate, [AC_DEFINE_UNQUOTED([USE_LIBZ], 1, [Define this if you have libz library]) AC_SUBST(LIBZ, -lz)])) LOG_FACILITY="LOG_DAEMON" AC_ARG_VAR([LOG_FACILITY], [Default syslog facility]) if test -n "$LOG_FACILITY"; then logfacility=`echo $LOG_FACILITY | tr a-z A-Z` case $logfacility in USER|DAEMON|AUTH|AUTHPRIV|MAIL|CRON|LOCAL[[0-7]]) LOG_FACILITY=LOG_$logfacility;; LOG_USER|LOG_DAEMON|LOG_AUTH|LOG_AUTHPRIV|LOG_MAIL|LOG_CRON|LOG_LOCAL[[0-7]]) LOG_FACILITY=$logfacility;; *) AC_MSG_ERROR([Invalid value of LOG_FACILITY]);; esac fi AC_DEFINE_UNQUOTED([LOG_FACILITY],$LOG_FACILITY, [Default syslog facility.]) AC_ARG_VAR([DEFAULT_DICT_SERVER], [Set the name of the default DICT server for dico utility]) if test -z "$DEFAULT_DICT_SERVER" ; then DEFAULT_DICT_SERVER="gnu.org.ua" fi # Grecs configuration system GRECS_SETUP(grecs, [shared tests getopt git2chg std-pp-setup]) GRECS_HOST_PROJECT_INCLUDES='-I$(top_srcdir)/gnu -I$(top_builddir)/gnu' # Check for Guile GINT_INIT([gint],[1.8 with-guile nodoc], [status_guile=yes], [status_guile=no]) AM_CONDITIONAL([GUILE_COND],[test $status_guile = yes]) # Check for Python AC_ARG_WITH([python], AC_HELP_STRING([--without-python], [do not build Python interface]), [ case "${withval}" in yes) status_python=yes ;; no) status_python=no ;; *) AC_MSG_ERROR(bad value ${withval} for --without-python) ;; esac],[status_python=yes]) if test "$status_python" = yes; then AC_ARG_VAR([PYTHON_CONFIG], [The name of python-config binary]) AC_PATH_PROG([PYTHON_CONFIG], python-config) if test -n "$PYTHON_CONFIG"; then AC_SUBST(PYTHON_LIBS,`python-config --libs`) AC_SUBST(PYTHON_INCLUDES,`python-config --includes`) else status_python=no fi fi AM_CONDITIONAL([PYTHON_COND],[test $status_python = yes]) # Tcl/tk AC_ARG_WITH([tk], AC_HELP_STRING([--with-tk], [build Tcl/Tk-based applications (GCIDER)]), [ case "${withval}" in yes) status_tk=yes ;; no) status_tk=no;; *) AC_MSG_ERROR([bad value ${withval} for --with-tk]) esac],[status_tk=yes]) if test $status_tk=yes; then AC_PATH_PROG([WISH], wish) if test -z "$WISH"; then status_tk=no fi AM_CONDITIONAL([TK_WISH_COND],[test $status_tk = yes]) fi # Check for libpcre AC_ARG_WITH([pcre], AC_HELP_STRING([--with-pcre], [compile Perl-compatible regular expressions support]), [ case "${withval}" in yes) status_pcre=yes ;; no) status_pcre=no ;; *) AC_MSG_ERROR(bad value ${withval} for --with-pcre) ;; esac],[status_pcre=yes]) if test $status_pcre = yes; then AC_CHECK_HEADER([pcre.h], [], [status_pcre=no]) if test $status_pcre = yes; then DICO_CHECK_LIB(pcre, main, [], [], [status_pcre=no]) fi fi AM_CONDITIONAL([PCRE_COND],[test $status_pcre = yes]) # AC_ARG_WITH(autologin-file, AC_HELP_STRING([--with-autologin-file@<:@=NAME@:>@], [Use the autologin file (default NAME is .dicologin)]), [case $withval in yes) DEFAULT_AUTOLOGIN_FILE=".dicologin";; no) DEFAULT_AUTOLOGIN_FILE=;; *) DEFAULT_AUTOLOGIN_FILE=$withval;; esac], [DEFAULT_AUTOLOGIN_FILE=".dicologin"]) if test -n "$DEFAULT_AUTOLOGIN_FILE" ; then AC_DEFINE_UNQUOTED(DEFAULT_AUTOLOGIN_FILE, "$DEFAULT_AUTOLOGIN_FILE", [Define to the name of a netrc-style autologin file]) else AC_DEFINE_UNQUOTED(DEFAULT_AUTOLOGIN_FILE, NULL, [Define to the name of a netrc-style autologin file]) fi AC_ARG_WITH([readline], AC_HELP_STRING([--without-readline], [do not use readline]), [ case "${withval}" in yes) status_readline=yes ;; no) status_readline=no ;; *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;; esac],[status_readline=yes]) # Test for GNU Readline AC_SUBST(READLINE_LIBS) if test "$status_readline" != "no"; then dnl FIXME This should only link in the curses libraries if it's dnl really needed! dnl Check for Curses libs. CURSES_LIBS= for lib in ncurses curses termcap do AC_CHECK_LIB($lib, tputs, [CURSES_LIBS="-l$lib"; break]) done saved_LIBS=$LIBS LIBS="$LIBS $CURSES_LIBS" AC_CHECK_LIB(readline, readline, mf_have_readline=yes) LIBS=$saved_LIBS if test "$mf_have_readline" = "yes"; then AC_CHECK_HEADERS(readline/readline.h, AC_DEFINE(WITH_READLINE,1,[Enable use of readline])) READLINE_LIBS="-lreadline $CURSES_LIBS" saved_LIBS=$LIBS LIBS="$LIBS $READLINE_LIBS" AC_CHECK_FUNCS(rl_completion_matches) LIBS=$saved_LIBS status_readline="yes" else if test "$status_readline" = "yes"; then AC_MSG_WARN(readline requested but does not seem to be installed) fi status_readline="no" fi fi AH_BOTTOM([ /* Some older versions of readline have completion_matches */ #ifndef HAVE_RL_COMPLETION_MATCHES # define rl_completion_matches completion_matches #endif]) # GNU SASL status_gsasl=no MU_CHECK_GSASL(0.2.5, [ AC_DEFINE(WITH_GSASL,1,[Define if GNU SASL is present]) status_gsasl=yes AC_SUBST(BUILD_LIBDICOSASL,'libdicosasl.a') AC_SUBST(LIBDICOSASL,'$(top_builddir)/lib/libdicosasl.a')]) # SASL AC_ARG_WITH(ldap, [AC_HELP_STRING([--with-ldap], [Configure to work with OpenLDAP])], [status_ldap=$withval], [status_ldap=maybe]) if test $status_ldap != no; then AC_CHECK_LIB(ldap, ldap_bind, [status_ldap=yes], [if test $status_ldap = yes; then AC_MSG_ERROR([required library ldap is not found]) fi status_ldap=no]) fi AM_CONDITIONAL([LDAP_COND], [test $status_ldap = yes]) # PAM status_pam=maybe AC_ARG_ENABLE([pam], AC_HELP_STRING([--enable-pam], [enable PAM]), [ case "${enableval}" in yes) status_pam=yes ;; no) status_pam=no ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-pam]) ;; esac],[status_pam=maybe]) AC_SUBST(PAM_LIBS) if test "$status_pam" != "no"; then pam=$status_pam AC_CHECK_HEADERS(security/pam_appl.h) if test "$ac_cv_header_security_pam_appl_h" = "yes"; then AC_CHECK_LIB(dl, dlopen, [PAM_LIBS=-ldl]) AC_CHECK_LIB(pam, pam_start, [status_pam=yes], [status_pam=no], $PAM_LIBS) else status_pam=no fi if test $pam = yes && test $pam != $status_pam; then AC_MSG_ERROR([required module PAM cannot be built because of missing prerequisites]) fi fi AM_CONDITIONAL([PAM_COND], [test $status_pam = yes]) # WordNet AC_SUBST(WORDNET_LOPT) AC_SUBST(WORDNET_IOPT) AC_ARG_WITH([wordnet], AC_HELP_STRING([--with-wordnet@<:@=DIR@:>@], [use wordnet]), [ case "${withval}" in yes) status_wordnet=req ;; no) status_wordnet=no ;; /*) status_wordnet=req WORDNET_LOPT=-L${withval}/lib WORDNET_IOPT=-I${withval}/include;; *) AC_MSG_ERROR([argument for --with-wordnet must be an absoulute directory name]) ;; esac],[status_wordnet=maybe]) if test $status_wordnet != no; then save_LIBS=$LIBS save_CPPFLAGS=$CPPFLAGS LIBS="$LIBS $WORDNET_LOPT" CPPFLAGS="$CPPFLAGS $WORDNET_IOPT" AC_CHECK_HEADER([wn.h], [AC_CHECK_LIB(WN, findtheinfo, status_wordnet=yes)]) case $status_wordnet in req) AC_MSG_ERROR([required module wordnet cannot be built because of missing prerequisites]);; maybe) status_wordnet=no;; esac AM_CONDITIONAL([WORDNET_COND],[test $status_wordnet = yes]) LIBS=$save_LIBS CPPFLAGS=$save_CPPFLAGS fi # Imprimatur IMPRIMATUR_INIT AC_CONFIG_COMMANDS([status],[ cat <. bin_PROGRAMS = dico dico_SOURCES = \ autologin.c\ cmdline.c\ connect.c\ dico-priv.h\ dico.c\ func.c\ lookup.c\ pager.c\ saslauth.c\ shell.c LDADD=\ ../lib/libxdico.a\ ../gnu/libgnu.a\ ../lib/libextra.a\ ../lib/libdico.la\ $(READLINE_LIBS)\ @LIBINTL@ @LIBICONV@\ @LIBDICOSASL@\ @GSASL_LIBS@\ @LIBLTDL@ AM_CPPFLAGS=-DDEFAULT_DICT_SERVER="\"$(DEFAULT_DICT_SERVER)\"" INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/gnu -I../gnu @GRECS_INCLUDES@ @LTDLINCL@ SUFFIXES=.opt .c .opt.c: $(AM_V_GEN)m4 -s $(top_srcdir)/@GRECS_SUBDIR@/build-aux/getopt.m4 $< > $@ BUILT_SOURCES=cmdline.c EXTRA_DIST=cmdline.opt dico-2.2/dico/Makefile.in000066400000000000000000001344551172612674100153010ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of GNU Dico # Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dico$(EXEEXT) subdir = dico DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dico_OBJECTS = autologin.$(OBJEXT) cmdline.$(OBJEXT) \ connect.$(OBJEXT) dico.$(OBJEXT) func.$(OBJEXT) \ lookup.$(OBJEXT) pager.$(OBJEXT) saslauth.$(OBJEXT) \ shell.$(OBJEXT) dico_OBJECTS = $(am_dico_OBJECTS) dico_LDADD = $(LDADD) am__DEPENDENCIES_1 = dico_DEPENDENCIES = ../lib/libxdico.a ../gnu/libgnu.a \ ../lib/libextra.a ../lib/libdico.la $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(dico_SOURCES) DIST_SOURCES = $(dico_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dico_SOURCES = \ autologin.c\ cmdline.c\ connect.c\ dico-priv.h\ dico.c\ func.c\ lookup.c\ pager.c\ saslauth.c\ shell.c LDADD = \ ../lib/libxdico.a\ ../gnu/libgnu.a\ ../lib/libextra.a\ ../lib/libdico.la\ $(READLINE_LIBS)\ @LIBINTL@ @LIBICONV@\ @LIBDICOSASL@\ @GSASL_LIBS@\ @LIBLTDL@ AM_CPPFLAGS = -DDEFAULT_DICT_SERVER="\"$(DEFAULT_DICT_SERVER)\"" INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/gnu -I../gnu @GRECS_INCLUDES@ @LTDLINCL@ SUFFIXES = .opt .c BUILT_SOURCES = cmdline.c EXTRA_DIST = cmdline.opt all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .opt .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits dico/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits dico/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad dico$(EXEEXT): $(dico_OBJECTS) $(dico_DEPENDENCIES) @rm -f dico$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dico_OBJECTS) $(dico_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/autologin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dico.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/func.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslauth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS .opt.c: $(AM_V_GEN)m4 -s $(top_srcdir)/@GRECS_SUBDIR@/build-aux/getopt.m4 $< > $@ # 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: dico-2.2/dico/autologin.c000066400000000000000000000177631172612674100154030ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" char * skipws(char *buf) { while (*buf && isascii(*buf) && isspace(*buf)) buf++; return buf; } /* Compare two hostnames. Return 0 if they have the same address type, address length *and* at least one of the addresses of A matches B */ int hostcmp(const char *a, const char *b) { struct hostent *hp = gethostbyname(a); char **addrlist; char *dptr; char **addr; size_t i, count; size_t entry_length; int entry_type; if (!hp) return 1; for (count = 1, addr = hp->h_addr_list; *addr; addr++) count++; addrlist = xmalloc (count * (sizeof *addrlist + hp->h_length) - hp->h_length); dptr = (char *) (addrlist + count); for (i = 0; i < count - 1; i++) { memcpy(dptr, hp->h_addr_list[i], hp->h_length); addrlist[i] = dptr; dptr += hp->h_length; } addrlist[i] = NULL; entry_length = hp->h_length; entry_type = hp->h_addrtype; hp = gethostbyname(b); if (!hp || entry_length != hp->h_length || entry_type != hp->h_addrtype) { free(addrlist); return 1; } for (addr = addrlist; *addr; addr++) { char **p; for (p = hp->h_addr_list; *p; p++) { if (memcmp(*addr, *p, entry_length) == 0) { free(addrlist); return 0; } } } free(addrlist); return 1; } static int begins_with(const char *str, const char *prefix) { size_t len = strlen (prefix); return strlen (str) >= len && strncmp (str, prefix, len) == 0 && (str[len] == 0 || str[len] == ' ' || str[len] == '\t'); } enum kw_tok { kw_login, kw_password, kw_noauth, kw_nosasl, kw_sasl, kw_mechanism, kw_realm, kw_service, kw_host }; struct keyword { char *name; int arg; enum kw_tok tok; }; static struct keyword kwtab[] = { { "login", 1, kw_login }, { "password", 1, kw_password }, { "noauth", 0, kw_noauth }, { "nosasl", 0, kw_nosasl }, { "sasl", 0, kw_sasl }, { "mechanism", 1, kw_mechanism }, { "realm", 1, kw_realm }, { "service", 1, kw_service }, { "host", 1, kw_host }, { NULL } }; static struct keyword * findkw(const char *name) { struct keyword *p; for (p = kwtab; p->name; p++) if (strcmp(p->name, name) == 0) return p; return NULL; } static int _cred_free(void *item, void *data) { free(item); return 0; } struct matches { const char *host; int def_line; int def_argc; char **def_argv; int host_argc; char **host_argv; }; static int match_line(struct wordsplit *ws, struct matches *matches, int line) { int rc = 0; if (strcmp(ws->ws_wordv[0], "machine") == 0) { if (hostcmp(ws->ws_wordv[1], matches->host) == 0) { XDICO_DEBUG_F1(1, _("Found matching line %d\n"), line); if (matches->host_argv) dico_argcv_free(matches->host_argc, matches->host_argv); matches->host_argc = ws->ws_wordc; matches->host_argv = ws->ws_wordv; matches->def_line = line; rc = 1; } } else if (strcmp(ws->ws_wordv[0], "default") == 0) { XDICO_DEBUG_F1(1, _("Found default line %d\n"), line); if (matches->def_argv) dico_argcv_free(matches->def_argc, matches->def_argv); matches->def_argc = ws->ws_wordc; matches->def_argv = ws->ws_wordv; matches->def_line = line; } ws->ws_wordc = 0; ws->ws_wordv = NULL; return rc; } /* Parse netrc-like autologin file and set up user and key accordingly. */ int parse_autologin(const char *filename, char *host, struct auth_cred *pcred, int *pflags) { FILE *fp; char *buf = NULL; size_t n = 0; struct matches matches; char **p_argv = NULL; int line = 0; int flags = 0; struct wordsplit ws; int wsflags = 0; int beg_line = 0; fp = fopen (filename, "r"); if (!fp) { if (errno != ENOENT) { dico_log(L_ERR, errno, _("Cannot open autologin file %s"), filename); } return 1; } else XDICO_DEBUG_F1(1, _("Reading autologin file %s...\n"), filename); memset(&matches, 0, sizeof matches); matches.host = host; while (getline (&buf, &n, fp) > 0 && n > 0) { char *p; line++; p = skipws(buf); if ((wsflags & WRDSF_APPEND) && (begins_with(p, "machine") || begins_with(p, "default"))) { wsflags &= ~WRDSF_APPEND; if (match_line(&ws, &matches, beg_line)) break; beg_line = line; } else if (!(wsflags & WRDSF_REUSE)) beg_line = line; ws.ws_comment = "#"; if (wordsplit(p, &ws, WRDSF_DEFFLAGS|WRDSF_COMMENT|wsflags)) { dico_log(L_ERR, 0, _("failed to parse command `%s': %s"), p, wordsplit_strerror(&ws)); fclose(fp); free(buf); if (wsflags & WRDSF_REUSE) wordsplit_free(&ws); return 1; } wsflags |= WRDSF_REUSE | WRDSF_APPEND; /* Add newline marker */ if (wordsplit("#", &ws, WRDSF_DEFFLAGS|WRDSF_NOSPLIT|wsflags)) { dico_log(L_ERR, 0, _("failed to add line marker: %s"), wordsplit_strerror(&ws)); fclose(fp); free(buf); if (wsflags & WRDSF_REUSE) wordsplit_free(&ws); return 1; } } if (wsflags & WRDSF_APPEND) match_line(&ws, &matches, line); if (wsflags & WRDSF_REUSE) wordsplit_free(&ws); fclose(fp); free(buf); if (matches.host_argv) p_argv = matches.host_argv + 2; else if (matches.def_argv) p_argv = matches.def_argv + 1; else { XDICO_DEBUG(1, _("No matching line found\n")); p_argv = NULL; } if (p_argv) { line = matches.def_line; pcred->sasl = sasl_enabled_p(); while (*p_argv) { if (**p_argv == '#') { line++; p_argv++; } else { struct keyword *kw = findkw(*p_argv); char *arg; if (!kw) { dico_log(L_ERR, 0, _("%s:%d: unknown keyword"), filename, line); p_argv++; continue; } if (kw->arg) { if (!p_argv[1]) { dico_log(L_ERR, 0, _("%s:%d: %s without argument"), filename, line, p_argv[0]); break; } arg = p_argv[1]; p_argv += 2; } else p_argv++; switch (kw->tok) { case kw_login: pcred->user = xstrdup(arg); flags |= AUTOLOGIN_USERNAME; break; case kw_password: pcred->pass = xstrdup(arg); flags |= AUTOLOGIN_PASSWORD; break; case kw_service: pcred->service = xstrdup(arg); break; case kw_realm: pcred->realm = xstrdup(arg); break; case kw_host: pcred->hostname = xstrdup(arg); break; case kw_noauth: flags |= AUTOLOGIN_NOAUTH; break; case kw_nosasl: pcred->sasl = 0; break; case kw_sasl: pcred->sasl = 1; break; case kw_mechanism: { int i; struct wordsplit mechws; if (!(flags & AUTOLOGIN_MECH)) { pcred->mech = xdico_list_create(); dico_list_set_free_item(pcred->mech, _cred_free, NULL); flags |= AUTOLOGIN_MECH; } mechws.ws_delim = ","; if (wordsplit(arg, &mechws, WRDSF_NOVAR | WRDSF_NOCMD | WRDSF_DELIM | WRDSF_WS)) { dico_log(L_ERR, 0, _("%s:%d: failed to parse line: %s"), filename, line, wordsplit_strerror (&mechws)); exit(1); } for (i = 0; i < mechws.ws_wordc; i++) xdico_list_append(pcred->mech, mechws.ws_wordv[i]); mechws.ws_wordc = 0; wordsplit_free(&mechws); break; } } } } } dico_argcv_free(matches.def_argc, matches.def_argv); dico_argcv_free(matches.host_argc, matches.host_argv); if (pflags) *pflags = flags; return 0; } dico-2.2/dico/cmdline.c000066400000000000000000000676261172612674100150200ustar00rootroot00000000000000#line 832 "../grecs/build-aux/getopt.m4" /* -*- buffer-read-only: t -*- vi: set ro: THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */ #line 1 "cmdline.opt" /* This file is part of GNU Dico. -*- c -*- Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include #line 21 "cmdline.opt" #line 21 void print_help(void); #line 21 void print_usage(void); #line 193 "cmdline.opt" #line 193 #include #line 193 /* Option codes */ #line 193 enum { #line 193 _OPTION_INIT=255, #line 193 #line 31 "cmdline.opt" #line 31 OPTION_HOST, #line 51 "cmdline.opt" #line 51 OPTION_SOURCE, #line 75 "cmdline.opt" #line 75 OPTION_LEVDIST, #line 77 "cmdline.opt" #line 77 OPTION_LEVENSHTEIN_DISTANCE, #line 130 "cmdline.opt" #line 130 OPTION_SASL, #line 136 "cmdline.opt" #line 136 OPTION_NOSASL, #line 150 "cmdline.opt" #line 150 OPTION_PASSWORD, #line 155 "cmdline.opt" #line 155 OPTION_AUTOLOGIN, #line 180 "cmdline.opt" #line 180 OPTION_TIME_STAMP, #line 187 "cmdline.opt" #line 187 OPTION_SOURCE_INFO, #line 193 "cmdline.opt" #line 193 OPTION_USAGE, #line 193 "cmdline.opt" MAX_OPTION #line 193 }; #line 193 #ifdef HAVE_GETOPT_LONG #line 193 static struct option long_options[] = { #line 193 #line 31 "cmdline.opt" #line 31 { "host", required_argument, 0, OPTION_HOST }, #line 37 "cmdline.opt" #line 37 { "port", required_argument, 0, 'p' }, #line 45 "cmdline.opt" #line 45 { "database", required_argument, 0, 'd' }, #line 51 "cmdline.opt" #line 51 { "source", required_argument, 0, OPTION_SOURCE }, #line 62 "cmdline.opt" #line 62 { "match", no_argument, 0, 'm' }, #line 68 "cmdline.opt" #line 68 { "strategy", required_argument, 0, 's' }, #line 75 "cmdline.opt" #line 75 { "levdist", required_argument, 0, OPTION_LEVDIST }, #line 77 "cmdline.opt" #line 77 { "levenshtein-distance", required_argument, 0, OPTION_LEVENSHTEIN_DISTANCE }, #line 85 "cmdline.opt" #line 85 { "dbs", no_argument, 0, 'D' }, #line 91 "cmdline.opt" #line 91 { "strategies", no_argument, 0, 'S' }, #line 97 "cmdline.opt" #line 97 { "serverhelp", no_argument, 0, 'H' }, #line 103 "cmdline.opt" #line 103 { "info", required_argument, 0, 'i' }, #line 110 "cmdline.opt" #line 110 { "serverinfo", no_argument, 0, 'I' }, #line 116 "cmdline.opt" #line 116 { "quiet", no_argument, 0, 'q' }, #line 124 "cmdline.opt" #line 124 { "noauth", no_argument, 0, 'a' }, #line 130 "cmdline.opt" #line 130 { "sasl", no_argument, 0, OPTION_SASL }, #line 136 "cmdline.opt" #line 136 { "nosasl", no_argument, 0, OPTION_NOSASL }, #line 142 "cmdline.opt" #line 142 { "user", required_argument, 0, 'u' }, #line 148 "cmdline.opt" #line 148 { "key", required_argument, 0, 'k' }, #line 150 "cmdline.opt" #line 150 { "password", required_argument, 0, OPTION_PASSWORD }, #line 155 "cmdline.opt" #line 155 { "autologin", required_argument, 0, OPTION_AUTOLOGIN }, #line 161 "cmdline.opt" #line 161 { "client", required_argument, 0, 'c' }, #line 168 "cmdline.opt" #line 168 { "transcript", no_argument, 0, 't' }, #line 174 "cmdline.opt" #line 174 { "verbose", no_argument, 0, 'v' }, #line 180 "cmdline.opt" #line 180 { "time-stamp", no_argument, 0, OPTION_TIME_STAMP }, #line 187 "cmdline.opt" #line 187 { "source-info", no_argument, 0, OPTION_SOURCE_INFO }, #line 193 "cmdline.opt" #line 193 { "help", no_argument, 0, 'h' }, #line 193 "cmdline.opt" #line 193 { "usage", no_argument, 0, OPTION_USAGE }, #line 193 "cmdline.opt" #line 193 { "version", no_argument, 0, 'V' }, #line 193 "cmdline.opt" {0, 0, 0, 0} #line 193 }; #line 193 #endif #line 193 static struct opthelp { #line 193 const char *opt; #line 193 const char *arg; #line 193 int is_optional; #line 193 const char *descr; #line 193 } opthelp[] = { #line 193 #line 29 "cmdline.opt" #line 29 { NULL, NULL, 0, N_("Server selection") }, #line 33 "cmdline.opt" #line 33 { #line 33 #ifdef HAVE_GETOPT_LONG #line 33 "--host", #line 33 #else #line 33 "", #line 33 #endif #line 33 N_("SERVER"), 0, N_("Connect to this server.") }, #line 39 "cmdline.opt" #line 39 { #line 39 #ifdef HAVE_GETOPT_LONG #line 39 "-p, --port", #line 39 #else #line 39 "-p", #line 39 #endif #line 39 N_("SERVICE"), 0, N_("Specify port to connect to.") }, #line 47 "cmdline.opt" #line 47 { #line 47 #ifdef HAVE_GETOPT_LONG #line 47 "-d, --database", #line 47 #else #line 47 "-d", #line 47 #endif #line 47 N_("NAME"), 0, N_("Select a database to search.") }, #line 53 "cmdline.opt" #line 53 { #line 53 #ifdef HAVE_GETOPT_LONG #line 53 "--source", #line 53 #else #line 53 "", #line 53 #endif #line 53 N_("ADDR"), 0, N_("Set a source address for TCP connections.") }, #line 60 "cmdline.opt" #line 60 { NULL, NULL, 0, N_("Operation modes") }, #line 64 "cmdline.opt" #line 64 { #line 64 #ifdef HAVE_GETOPT_LONG #line 64 "-m, --match", #line 64 #else #line 64 "-m", #line 64 #endif #line 64 NULL, 0, N_("Match instead of define.") }, #line 70 "cmdline.opt" #line 70 { #line 70 #ifdef HAVE_GETOPT_LONG #line 70 "-s, --strategy", #line 70 #else #line 70 "-s", #line 70 #endif #line 70 N_("NAME"), 0, N_("Select a strategy for matching. Implies --match.") }, #line 78 "cmdline.opt" #line 78 { #line 78 #ifdef HAVE_GETOPT_LONG #line 78 "--levdist, --levenshtein-distance", #line 78 #else #line 78 "", #line 78 #endif #line 78 N_("N"), 0, N_("Set maximum Levenshtein distance to N.") }, #line 87 "cmdline.opt" #line 87 { #line 87 #ifdef HAVE_GETOPT_LONG #line 87 "-D, --dbs", #line 87 #else #line 87 "-D", #line 87 #endif #line 87 NULL, 0, N_("Show available databases.") }, #line 93 "cmdline.opt" #line 93 { #line 93 #ifdef HAVE_GETOPT_LONG #line 93 "-S, --strategies", #line 93 #else #line 93 "-S", #line 93 #endif #line 93 NULL, 0, N_("Show available search strategies.") }, #line 99 "cmdline.opt" #line 99 { #line 99 #ifdef HAVE_GETOPT_LONG #line 99 "-H, --serverhelp", #line 99 #else #line 99 "-H", #line 99 #endif #line 99 NULL, 0, N_("show server help.") }, #line 105 "cmdline.opt" #line 105 { #line 105 #ifdef HAVE_GETOPT_LONG #line 105 "-i, --info", #line 105 #else #line 105 "-i", #line 105 #endif #line 105 N_("DBNAME"), 0, N_("Show information about database DBNAME.") }, #line 112 "cmdline.opt" #line 112 { #line 112 #ifdef HAVE_GETOPT_LONG #line 112 "-I, --serverinfo", #line 112 #else #line 112 "-I", #line 112 #endif #line 112 NULL, 0, N_("Show information about the server.") }, #line 118 "cmdline.opt" #line 118 { #line 118 #ifdef HAVE_GETOPT_LONG #line 118 "-q, --quiet", #line 118 #else #line 118 "-q", #line 118 #endif #line 118 NULL, 0, N_("Do not print the normal dico welcome.") }, #line 122 "cmdline.opt" #line 122 { NULL, NULL, 0, N_("Authentication") }, #line 126 "cmdline.opt" #line 126 { #line 126 #ifdef HAVE_GETOPT_LONG #line 126 "-a, --noauth", #line 126 #else #line 126 "-a", #line 126 #endif #line 126 NULL, 0, N_("Disable authentication.") }, #line 132 "cmdline.opt" #line 132 { #line 132 #ifdef HAVE_GETOPT_LONG #line 132 "--sasl", #line 132 #else #line 132 "", #line 132 #endif #line 132 NULL, 0, N_("Enable SASL authentication (default).") }, #line 138 "cmdline.opt" #line 138 { #line 138 #ifdef HAVE_GETOPT_LONG #line 138 "--nosasl", #line 138 #else #line 138 "", #line 138 #endif #line 138 NULL, 0, N_("Disable SASL authentication.") }, #line 144 "cmdline.opt" #line 144 { #line 144 #ifdef HAVE_GETOPT_LONG #line 144 "-u, --user", #line 144 #else #line 144 "-u", #line 144 #endif #line 144 N_("NAME"), 0, N_("Set user name for authentication.") }, #line 151 "cmdline.opt" #line 151 { #line 151 #ifdef HAVE_GETOPT_LONG #line 151 "-k, --key, --password", #line 151 #else #line 151 "-k", #line 151 #endif #line 151 N_("STRING"), 0, N_("Set shared secret for authentication.") }, #line 157 "cmdline.opt" #line 157 { #line 157 #ifdef HAVE_GETOPT_LONG #line 157 "--autologin", #line 157 #else #line 157 "", #line 157 #endif #line 157 N_("NAME"), 0, N_("Set the name of autologin file to use.") }, #line 163 "cmdline.opt" #line 163 { #line 163 #ifdef HAVE_GETOPT_LONG #line 163 "-c, --client", #line 163 #else #line 163 "-c", #line 163 #endif #line 163 N_("STRING"), 0, N_("Additional text for client command.") }, #line 167 "cmdline.opt" #line 167 { NULL, NULL, 0, N_("Debugging") }, #line 170 "cmdline.opt" #line 170 { #line 170 #ifdef HAVE_GETOPT_LONG #line 170 "-t, --transcript", #line 170 #else #line 170 "-t", #line 170 #endif #line 170 NULL, 0, N_("Enable session transcript.") }, #line 176 "cmdline.opt" #line 176 { #line 176 #ifdef HAVE_GETOPT_LONG #line 176 "-v, --verbose", #line 176 #else #line 176 "-v", #line 176 #endif #line 176 NULL, 0, N_("Increase debugging verbosity level.") }, #line 182 "cmdline.opt" #line 182 { #line 182 #ifdef HAVE_GETOPT_LONG #line 182 "--time-stamp", #line 182 #else #line 182 "", #line 182 #endif #line 182 NULL, 0, N_("Include time stamp in the debugging output.") }, #line 189 "cmdline.opt" #line 189 { #line 189 #ifdef HAVE_GETOPT_LONG #line 189 "--source-info", #line 189 #else #line 189 "", #line 189 #endif #line 189 NULL, 0, N_("Include source line information in the debugging output.") }, #line 193 "cmdline.opt" #line 193 { NULL, NULL, 0, N_("Other options") }, #line 193 "cmdline.opt" #line 193 { #line 193 #ifdef HAVE_GETOPT_LONG #line 193 "-h, --help", #line 193 #else #line 193 "-h", #line 193 #endif #line 193 NULL, 0, N_("Give this help list") }, #line 193 "cmdline.opt" #line 193 { #line 193 #ifdef HAVE_GETOPT_LONG #line 193 "--usage", #line 193 #else #line 193 "", #line 193 #endif #line 193 NULL, 0, N_("Give a short usage message") }, #line 193 "cmdline.opt" #line 193 { #line 193 #ifdef HAVE_GETOPT_LONG #line 193 "-V, --version", #line 193 #else #line 193 "-V", #line 193 #endif #line 193 NULL, 0, N_("Print program version") }, #line 193 "cmdline.opt" }; #line 21 "cmdline.opt" #line 21 const char *program_version = "dico" " (" PACKAGE_NAME ") " PACKAGE_VERSION; #line 21 static char doc[] = N_("GNU dictionary client program"); #line 21 static char args_doc[] = N_("[URL-or-WORD]"); #line 21 const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; #line 21 struct grecs_node *cmdline_tree; #line 21 #line 21 #define DESCRCOLUMN 30 #line 21 #define RMARGIN 79 #line 21 #define GROUPCOLUMN 2 #line 21 #define USAGECOLUMN 13 #line 21 #line 21 static void #line 21 indent (size_t start, size_t col) #line 21 { #line 21 for (; start < col; start++) #line 21 putchar (' '); #line 21 } #line 21 #line 21 static void #line 21 print_option_descr (const char *descr, size_t lmargin, size_t rmargin) #line 21 { #line 21 while (*descr) #line 21 { #line 21 size_t s = 0; #line 21 size_t i; #line 21 size_t width = rmargin - lmargin; #line 21 #line 21 for (i = 0; ; i++) #line 21 { #line 21 if (descr[i] == 0 || descr[i] == ' ' || descr[i] == '\t') #line 21 { #line 21 if (i > width) #line 21 break; #line 21 s = i; #line 21 if (descr[i] == 0) #line 21 break; #line 21 } #line 21 } #line 21 printf ("%*.*s\n", s, s, descr); #line 21 descr += s; #line 21 if (*descr) #line 21 { #line 21 indent (0, lmargin); #line 21 descr++; #line 21 } #line 21 } #line 21 } #line 21 #line 21 #define NOPTHELP (sizeof (opthelp) / sizeof (opthelp[0])) #line 21 #line 21 static int #line 21 optcmp (const void *a, const void *b) #line 21 { #line 21 struct opthelp const *ap = (struct opthelp const *)a; #line 21 struct opthelp const *bp = (struct opthelp const *)b; #line 21 const char *opta, *optb; #line 21 size_t alen, blen; #line 21 #line 21 for (opta = ap->opt; *opta == '-'; opta++) #line 21 ; #line 21 alen = strcspn (opta, ","); #line 21 #line 21 for (optb = bp->opt; *optb == '-'; optb++) #line 21 ; #line 21 blen = strcspn (optb, ","); #line 21 #line 21 if (alen > blen) #line 21 blen = alen; #line 21 #line 21 return strncmp (opta, optb, blen); #line 21 } #line 21 #line 21 static void #line 21 sort_options (int start, int count) #line 21 { #line 21 qsort (opthelp + start, count, sizeof (opthelp[0]), optcmp); #line 21 } #line 21 #line 21 static int #line 21 sort_group (int start) #line 21 { #line 21 int i; #line 21 #line 21 for (i = start; i < NOPTHELP && opthelp[i].opt; i++) #line 21 ; #line 21 sort_options (start, i - start); #line 21 return i + 1; #line 21 } #line 21 #line 21 static void #line 21 sort_opthelp (void) #line 21 { #line 21 int start; #line 21 #line 21 for (start = 0; start < NOPTHELP; ) #line 21 { #line 21 if (!opthelp[start].opt) #line 21 start = sort_group (start + 1); #line 21 else #line 21 start = sort_group (start); #line 21 } #line 21 } #line 21 #line 21 void (*print_help_hook) (FILE *stream); #line 21 #line 21 void #line 21 print_help (void) #line 21 { #line 21 unsigned i; #line 21 int argsused = 0; #line 21 #line 21 printf ("%s %s [%s]... %s\n", _("Usage:"), "dico", _("OPTION"), #line 21 args_doc[0] ? gettext (args_doc) : args_doc); #line 21 if (doc[0]) #line 21 print_option_descr(gettext (doc), 0, RMARGIN); #line 21 putchar ('\n'); #line 21 #line 21 sort_opthelp (); #line 21 for (i = 0; i < NOPTHELP; i++) #line 21 { #line 21 unsigned n; #line 21 if (opthelp[i].opt) #line 21 { #line 21 n = printf (" %s", opthelp[i].opt); #line 21 if (opthelp[i].arg) #line 21 { #line 21 char *cb, *ce; #line 21 argsused = 1; #line 21 if (strlen (opthelp[i].opt) == 2) #line 21 { #line 21 if (!opthelp[i].is_optional) #line 21 { #line 21 putchar (' '); #line 21 n++; #line 21 } #line 21 } #line 21 else #line 21 { #line 21 putchar ('='); #line 21 n++; #line 21 } #line 21 if (opthelp[i].is_optional) #line 21 { #line 21 cb = "["; #line 21 ce = "]"; #line 21 } #line 21 else #line 21 cb = ce = ""; #line 21 n += printf ("%s%s%s", cb, gettext (opthelp[i].arg), ce); #line 21 } #line 21 if (n >= DESCRCOLUMN) #line 21 { #line 21 putchar ('\n'); #line 21 n = 0; #line 21 } #line 21 indent (n, DESCRCOLUMN); #line 21 print_option_descr (gettext (opthelp[i].descr), DESCRCOLUMN, RMARGIN); #line 21 } #line 21 else #line 21 { #line 21 if (i) #line 21 putchar ('\n'); #line 21 indent (0, GROUPCOLUMN); #line 21 print_option_descr (gettext (opthelp[i].descr), #line 21 GROUPCOLUMN, RMARGIN); #line 21 putchar ('\n'); #line 21 } #line 21 } #line 21 #line 21 putchar ('\n'); #line 21 if (argsused) #line 21 { #line 21 print_option_descr (_("Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."), 0, RMARGIN); #line 21 putchar ('\n'); #line 21 } #line 21 #line 21 if (print_help_hook) #line 21 print_help_hook (stdout); #line 21 #line 21 /* TRANSLATORS: The placeholder indicates the bug-reporting address for this package. Please add _another line_ saying "Report translation bugs to <...>\n" with the address for translation bugs (typically your translation team's web or email address). */ #line 21 printf (_("Report bugs to %s.\n"), program_bug_address); #line 21 #line 21 #ifdef PACKAGE_URL #line 21 printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); #line 21 #else #line 21 printf (_("%s home page: \n"), #line 21 PACKAGE_NAME, PACKAGE); #line 21 #endif #line 21 fputs (_("General help using GNU software: \n"), #line 21 stdout); #line 21 } #line 21 #line 21 static int #line 21 cmpidx_short (const void *a, const void *b) #line 21 { #line 21 unsigned const *ai = (unsigned const *)a; #line 21 unsigned const *bi = (unsigned const *)b; #line 21 #line 21 return opthelp[*ai].opt[1] - opthelp[*bi].opt[1]; #line 21 } #line 21 #line 21 #ifdef HAVE_GETOPT_LONG #line 21 static int #line 21 cmpidx_long (const void *a, const void *b) #line 21 { #line 21 unsigned const *ai = (unsigned const *)a; #line 21 unsigned const *bi = (unsigned const *)b; #line 21 struct opthelp const *ap = opthelp + *ai; #line 21 struct opthelp const *bp = opthelp + *bi; #line 21 char const *opta, *optb; #line 21 size_t lena, lenb; #line 21 #line 21 if (ap->opt[1] == '-') #line 21 opta = ap->opt; #line 21 else #line 21 opta = ap->opt + 4; #line 21 lena = strcspn (opta, ","); #line 21 #line 21 if (bp->opt[1] == '-') #line 21 optb = bp->opt; #line 21 else #line 21 optb = bp->opt + 4; #line 21 lenb = strcspn (optb, ","); #line 21 return strncmp (opta, optb, lena > lenb ? lenb : lena); #line 21 } #line 21 #endif #line 21 #line 21 void #line 21 print_usage (void) #line 21 { #line 21 unsigned i; #line 21 unsigned n; #line 21 char buf[RMARGIN+1]; #line 21 unsigned *idxbuf; #line 21 unsigned nidx; #line 21 #line 21 #define FLUSH do { buf[n] = 0; printf ("%s\n", buf); n = USAGECOLUMN; memset (buf, ' ', n); } while (0) #line 21 #define ADDC(c) do { if (n == RMARGIN) FLUSH; buf[n++] = c; } while (0) #line 21 #line 21 idxbuf = calloc (NOPTHELP, sizeof (idxbuf[0])); #line 21 if (!idxbuf) #line 21 { #line 21 fprintf (stderr, "not enough memory"); #line 21 abort (); #line 21 } #line 21 #line 21 n = snprintf (buf, sizeof buf, "%s %s ", _("Usage:"), "dico"); #line 21 #line 21 /* Print a list of short options without arguments. */ #line 21 for (i = nidx = 0; i < NOPTHELP; i++) #line 21 if (opthelp[i].opt && opthelp[i].descr && opthelp[i].opt[1] != '-' #line 21 && opthelp[i].arg == NULL) #line 21 idxbuf[nidx++] = i; #line 21 #line 21 if (nidx) #line 21 { #line 21 qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_short); #line 21 #line 21 ADDC ('['); #line 21 ADDC ('-'); #line 21 for (i = 0; i < nidx; i++) #line 21 { #line 21 ADDC (opthelp[idxbuf[i]].opt[1]); #line 21 } #line 21 ADDC (']'); #line 21 } #line 21 #line 21 /* Print a list of short options with arguments. */ #line 21 for (i = nidx = 0; i < NOPTHELP; i++) #line 21 { #line 21 if (opthelp[i].opt && opthelp[i].descr && opthelp[i].opt[1] != '-' #line 21 && opthelp[i].arg) #line 21 idxbuf[nidx++] = i; #line 21 } #line 21 #line 21 if (nidx) #line 21 { #line 21 qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_short); #line 21 #line 21 for (i = 0; i < nidx; i++) #line 21 { #line 21 struct opthelp *opt = opthelp + idxbuf[i]; #line 21 size_t len = 5 + strlen (opt->arg) #line 21 + (opt->is_optional ? 2 : 1); #line 21 #line 21 if (n + len > RMARGIN) FLUSH; #line 21 buf[n++] = ' '; #line 21 buf[n++] = '['; #line 21 buf[n++] = '-'; #line 21 buf[n++] = opt->opt[1]; #line 21 if (opt->is_optional) #line 21 { #line 21 buf[n++] = '['; #line 21 strcpy (&buf[n], opt->arg); #line 21 n += strlen (opt->arg); #line 21 buf[n++] = ']'; #line 21 } #line 21 else #line 21 { #line 21 buf[n++] = ' '; #line 21 strcpy (&buf[n], opt->arg); #line 21 n += strlen (opt->arg); #line 21 } #line 21 buf[n++] = ']'; #line 21 } #line 21 } #line 21 #line 21 #ifdef HAVE_GETOPT_LONG #line 21 /* Print a list of long options */ #line 21 for (i = nidx = 0; i < NOPTHELP; i++) #line 21 { #line 21 if (opthelp[i].opt && opthelp[i].descr #line 21 && (opthelp[i].opt[1] == '-' || opthelp[i].opt[2] == ',')) #line 21 idxbuf[nidx++] = i; #line 21 } #line 21 #line 21 if (nidx) #line 21 { #line 21 qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_long); #line 21 #line 21 for (i = 0; i < nidx; i++) #line 21 { #line 21 struct opthelp *opt = opthelp + idxbuf[i]; #line 21 size_t len; #line 21 const char *longopt; #line 21 #line 21 if (opt->opt[1] == '-') #line 21 longopt = opt->opt; #line 21 else if (opt->opt[2] == ',') #line 21 longopt = opt->opt + 4; #line 21 else #line 21 continue; #line 21 #line 21 len = 3 + strlen (longopt) #line 21 + (opt->arg ? 1 + strlen (opt->arg) #line 21 + (opt->is_optional ? 2 : 0) : 0); #line 21 if (n + len > RMARGIN) FLUSH; #line 21 buf[n++] = ' '; #line 21 buf[n++] = '['; #line 21 strcpy (&buf[n], longopt); #line 21 n += strlen (longopt); #line 21 if (opt->arg) #line 21 { #line 21 buf[n++] = '='; #line 21 if (opt->is_optional) #line 21 { #line 21 buf[n++] = '['; #line 21 strcpy (&buf[n], opt->arg); #line 21 n += strlen (opt->arg); #line 21 buf[n++] = ']'; #line 21 } #line 21 else #line 21 { #line 21 strcpy (&buf[n], opt->arg); #line 21 n += strlen (opt->arg); #line 21 } #line 21 } #line 21 buf[n++] = ']'; #line 21 } #line 21 } #line 21 #endif #line 21 FLUSH; #line 21 free (idxbuf); #line 21 } #line 21 #line 21 const char version_etc_copyright[] = #line 21 /* Do *not* mark this string for translation. First %s is a copyright symbol suitable for this locale, and second %s are the copyright years. */ #line 21 "Copyright %s %s %s"; #line 21 #line 21 void #line 21 print_version_only(const char *program_version, FILE *stream) #line 21 { #line 21 fprintf (stream, "%s\n", program_version); #line 21 /* TRANSLATORS: Translate "(C)" to the copyright symbol (C-in-a-circle), if this symbol is available in the user's locale. Otherwise, do not translate "(C)"; leave it as-is. */ #line 21 fprintf (stream, version_etc_copyright, _("(C)"), #line 21 "2005-2012", #line 21 "Free Software Foundation, Inc."); #line 21 fputc ('\n', stream); #line 21 } #line 21 #line 21 #line 21 #line 21 void (*print_version_hook)(FILE *stream); #line 21 #line 21 void #line 21 print_version(const char *program_version, FILE *stream) #line 21 { #line 21 #line 21 print_version_only(program_version, stream); #line 21 #line 21 fputs (_("License GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n"), #line 21 stream); #line 21 if (print_version_hook) #line 21 print_version_hook (stream); #line 21 #line 21 } #line 21 #line 193 "cmdline.opt" #line 193 void get_options (int argc, char *argv[], int *index) { #line 198 { #line 198 int c; #line 198 #line 198 #ifdef HAVE_GETOPT_LONG #line 198 while ((c = getopt_long(argc, argv, "p:d:ms:DSHi:Iqau:k:c:tvhV", #line 198 long_options, NULL)) != EOF) #line 198 #else #line 198 while ((c = getopt(argc, argv, "p:d:ms:DSHi:Iqau:k:c:tvhV")) != EOF) #line 198 #endif #line 198 { #line 198 switch (c) #line 198 { #line 198 default: #line 198 exit(EX_USAGE); #line 198 #line 33 "cmdline.opt" case OPTION_HOST: #line 33 { #line 33 xdico_assign_string(&dico_url.host, optarg); #line 35 break; #line 35 } #line 39 "cmdline.opt" case 'p': #line 39 { #line 39 dico_url.port = str2port(optarg); if (dico_url.port == -1) dico_die(1, L_ERR, 0, _("Invalid port")); #line 43 break; #line 43 } #line 47 "cmdline.opt" case 'd': #line 47 { #line 47 xdico_assign_string(&dico_url.req.database, optarg); #line 49 break; #line 49 } #line 53 "cmdline.opt" case OPTION_SOURCE: #line 53 { #line 53 source_addr = get_ipaddr(optarg); if (source_addr == 0) dico_die(1, 0, L_ERR, _("%s: Invalid IP or unknown host name"), optarg); #line 58 break; #line 58 } #line 64 "cmdline.opt" case 'm': #line 64 { #line 64 mode = mode_match; #line 66 break; #line 66 } #line 70 "cmdline.opt" case 's': #line 70 { #line 70 xdico_assign_string(&dico_url.req.strategy, optarg); mode = mode_match; #line 73 break; #line 73 } #line 78 "cmdline.opt" case OPTION_LEVDIST: case OPTION_LEVENSHTEIN_DISTANCE: #line 78 { #line 78 char *p; levenshtein_threshold = strtoul(optarg, &p, 10); if (*p) dico_die(1, L_ERR, 0, _("%s: invalid number"), optarg); #line 83 break; #line 83 } #line 87 "cmdline.opt" case 'D': #line 87 { #line 87 mode = mode_dbs; #line 89 break; #line 89 } #line 93 "cmdline.opt" case 'S': #line 93 { #line 93 mode = mode_strats; #line 95 break; #line 95 } #line 99 "cmdline.opt" case 'H': #line 99 { #line 99 mode = mode_help; #line 101 break; #line 101 } #line 105 "cmdline.opt" case 'i': #line 105 { #line 105 mode = mode_info; dico_url.req.database = optarg; #line 108 break; #line 108 } #line 112 "cmdline.opt" case 'I': #line 112 { #line 112 mode = mode_server; #line 114 break; #line 114 } #line 118 "cmdline.opt" case 'q': #line 118 { #line 118 quiet_option = 1; #line 120 break; #line 120 } #line 126 "cmdline.opt" case 'a': #line 126 { #line 126 noauth_option = 1; #line 128 break; #line 128 } #line 132 "cmdline.opt" case OPTION_SASL: #line 132 { #line 132 sasl_enable(1); #line 134 break; #line 134 } #line 138 "cmdline.opt" case OPTION_NOSASL: #line 138 { #line 138 sasl_enable(0); #line 140 break; #line 140 } #line 144 "cmdline.opt" case 'u': #line 144 { #line 144 default_cred.user = optarg; #line 146 break; #line 146 } #line 151 "cmdline.opt" case 'k': case OPTION_PASSWORD: #line 151 { #line 151 default_cred.pass = optarg; #line 153 break; #line 153 } #line 157 "cmdline.opt" case OPTION_AUTOLOGIN: #line 157 { #line 157 autologin_file = optarg; #line 159 break; #line 159 } #line 163 "cmdline.opt" case 'c': #line 163 { #line 163 client = optarg; #line 165 break; #line 165 } #line 170 "cmdline.opt" case 't': #line 170 { #line 170 transcript = 1; #line 172 break; #line 172 } #line 176 "cmdline.opt" case 'v': #line 176 { #line 176 debug_level++; #line 178 break; #line 178 } #line 182 "cmdline.opt" case OPTION_TIME_STAMP: #line 182 { #line 182 int n = 1; dico_stream_ioctl(debug_stream, DICO_DBG_CTL_SET_TS, &n); #line 185 break; #line 185 } #line 189 "cmdline.opt" case OPTION_SOURCE_INFO: #line 189 { #line 189 debug_source_info = 1; #line 191 break; #line 191 } #line 193 "cmdline.opt" case 'h': #line 193 { #line 193 #line 193 print_help (); #line 193 exit (0); #line 193 #line 193 break; #line 193 } #line 193 "cmdline.opt" case OPTION_USAGE: #line 193 { #line 193 #line 193 print_usage (); #line 193 exit (0); #line 193 #line 193 break; #line 193 } #line 193 "cmdline.opt" case 'V': #line 193 { #line 193 #line 193 /* Give version */ #line 193 print_version(program_version, stdout); #line 193 exit (0); #line 193 #line 193 break; #line 193 } #line 198 "cmdline.opt" } #line 198 } #line 198 *index = optind; #line 198 if (cmdline_tree) #line 198 { #line 198 struct grecs_node *rn = grecs_node_create(grecs_node_root, NULL); #line 198 rn->down = cmdline_tree; #line 198 cmdline_tree = rn; #line 198 } #line 198 } #line 198 } dico-2.2/dico/cmdline.opt000066400000000000000000000102121172612674100153530ustar00rootroot00000000000000/* This file is part of GNU Dico. -*- c -*- Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include OPTIONS_BEGIN("dico", [], [<[URL-or-WORD]>], [], [], [], []) GROUP([]) OPTION(host,,SERVER, []) BEGIN xdico_assign_string(&dico_url.host, optarg); END OPTION(port,p,SERVICE, []) BEGIN dico_url.port = str2port(optarg); if (dico_url.port == -1) dico_die(1, L_ERR, 0, _("Invalid port")); END OPTION(database,d,NAME, []) BEGIN xdico_assign_string(&dico_url.req.strategy, optarg); mode = mode_match; END OPTION(levdist,,N, []) ALIAS(levenshtein-distance) BEGIN char *p; levenshtein_threshold = strtoul(optarg, &p, 10); if (*p) dico_die(1, L_ERR, 0, _("%s: invalid number"), optarg); END OPTION(dbs,D,, []) BEGIN mode = mode_dbs; END OPTION(strategies,S,, []) BEGIN mode = mode_strats; END OPTION(serverhelp,H,, []) BEGIN mode = mode_help; END OPTION(info,i,DBNAME, []) BEGIN mode = mode_info; dico_url.req.database = optarg; END OPTION(serverinfo,I,, []) BEGIN mode = mode_server; END OPTION(quiet, q,, []) BEGIN quiet_option = 1; END GROUP([]) OPTION(noauth,a,, []) BEGIN noauth_option = 1; END OPTION(sasl,,, []) BEGIN sasl_enable(1); END OPTION(nosasl,,, []) BEGIN sasl_enable(0); END OPTION(user,u,NAME, []) BEGIN default_cred.user = optarg; END OPTION(key, k, STRING, []) ALIAS(password) BEGIN default_cred.pass = optarg; END OPTION(autologin,, NAME, []) BEGIN autologin_file = optarg; END OPTION(client,c, STRING, []) BEGIN client = optarg; END GROUP([]) OPTION(transcript,t,, []) BEGIN transcript = 1; END OPTION(verbose,v,, []) BEGIN debug_level++; END OPTION(time-stamp,,, []) BEGIN int n = 1; dico_stream_ioctl(debug_stream, DICO_DBG_CTL_SET_TS, &n); END OPTION(source-info,,, []) BEGIN debug_source_info = 1; END OPTIONS_END void get_options (int argc, char *argv[], int *index) { GETOPT(argc, argv, *index) } dico-2.2/dico/connect.c000066400000000000000000000355721172612674100150310ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" #include #include #include #include "getpass.h" const char *xscript_prefix[] = { "S:", "C:" }; static int parse_initial_reply(struct dict_connection *conn) { char *p; size_t n = 0; size_t len; if (!dict_status_p(conn, "220")) return 1; p = strchr(conn->buf, '<'); if (!p) return 1; p++; while ((len = strcspn(p, ".>"))) { char *s; if (conn->capac == n) { if (n == 0) n = 2; conn->capav = x2nrealloc(conn->capav, &n, sizeof(conn->capav[0])); } s = xmalloc(len+1); memcpy(s, p, len); s[len] = 0; conn->capav[conn->capac++] = s; p += len + 1; if (p[-1] == '>') break; } p = strchr(p, '<'); if (!p) return 1; len = strcspn(p, ">"); if (p[len] != '>') return 1; len++; conn->msgid = xmalloc(len + 1); memcpy(conn->msgid, p, len); conn->msgid[len] = 0; return 0; } static int apop_auth(struct dict_connection *conn, struct auth_cred *cred) { int i; struct md5_ctx md5context; unsigned char md5digest[16]; char buf[sizeof(md5digest) * 2 + 1]; char *p; md5_init_ctx(&md5context); md5_process_bytes(conn->msgid, strlen(conn->msgid), &md5context); md5_process_bytes(cred->pass, strlen(cred->pass), &md5context); md5_finish_ctx(&md5context, md5digest); for (i = 0, p = buf; i < 16; i++, p += 2) sprintf(p, "%02x", md5digest[i]); *p = 0; stream_printf(conn->str, "AUTH %s %s\r\n", cred->user, buf); if (dict_read_reply(conn)) { dico_log(L_ERR, 0, _("No reply from server")); return 1; } return dict_status_p(conn, "230") == 0; } static int dict_auth(struct dict_connection *conn, dico_url_t url) { int rc = saslauth(conn, url); switch (rc) { case AUTH_OK: return 0; case AUTH_CONT: if (dict_capa(conn, "auth")) { struct auth_cred cred; switch (auth_cred_get(url->host, &cred)) { case GETCRED_OK: XDICO_DEBUG(1, _("Attempting APOP authentication\n")); rc = apop_auth(conn, &cred); auth_cred_free(&cred); return rc; case GETCRED_FAIL: dico_log(L_WARN, 0, _("Not enough credentials for authentication")); break; case GETCRED_NOAUTH: XDICO_DEBUG(1, _("Skipping authentication\n")); break; } } return 0; case AUTH_FAIL: break; } return 1; } char * get_homedir() { char *homedir = getenv("HOME"); if (!homedir) { struct passwd *pw = getpwuid(geteuid()); homedir = pw->pw_dir; } return homedir; } int ds_tilde_expand(const char *str, char **output) { char *dir; if (str[0] != '~') return 0; if (str[1] == '/') { dir = get_homedir(); str += 2; } else { char *p; size_t len; char *name; struct passwd *pw; str++; p = strchr(str, '/'); if (!p) return 0; len = p - str; name = xmalloc(len + 1); memcpy(name, str, len); name[len] = 0; pw = getpwnam(name); free(name); if (pw) { dir = pw->pw_dir; str = p + 1; } } *output = dico_full_file_name(dir, str); return 1; } static void auth_cred_dup(struct auth_cred *dst, const struct auth_cred *src) { dst->user = src->user ? xstrdup(src->user) : NULL; dst->pass = src->pass ? xstrdup(src->pass) : NULL; } void auth_cred_free(struct auth_cred *cred) { free(cred->user); free(cred->pass); dico_list_destroy(&cred->mech); free(cred->service); free(cred->realm); free(cred->hostname); } int auth_cred_get(char *host, struct auth_cred *cred) { memset(cred, 0, sizeof(cred[0])); auth_cred_dup(cred, &default_cred); if (default_cred.user && default_cred.pass) { XDICO_DEBUG(1, _("Obtained authentication credentials from the command line\n")); return GETCRED_OK; } else { int flags = 0; if (autologin_file) { if (access(autologin_file, F_OK)) dico_log(L_WARN, 0, _("File %s does not exist"), autologin_file); else parse_autologin(autologin_file, host, cred, &flags); } if (!flags && DEFAULT_AUTOLOGIN_FILE) { char *home = get_homedir(); char *filename = dico_full_file_name(home, DEFAULT_AUTOLOGIN_FILE); parse_autologin(filename, host, cred, &flags); free(filename); } if (flags & AUTOLOGIN_NOAUTH) return GETCRED_NOAUTH; } if (cred->user && !cred->pass) { char *p = getpass(_("Password:")); cred->pass = p ? xstrdup(p) : NULL; } return (cred->user && cred->pass) ? GETCRED_OK : GETCRED_FAIL; } void dict_transcript(struct dict_connection *conn, int state) { if (state == conn->transcript) return; if (state == 0) { dico_stream_t transport; if (dico_stream_ioctl(conn->str, DICO_IOCTL_GET_TRANSPORT, &transport)) { dico_log(L_CRIT, errno, _("INTERNAL ERROR at %s:%d: cannot get stream transport"), __FILE__, __LINE__); return; } if (dico_stream_ioctl(conn->str, DICO_IOCTL_SET_TRANSPORT, NULL)) { dico_log(L_CRIT, errno, _("INTERNAL ERROR at %s:%d: cannot set stream transport"), __FILE__, __LINE__); return; } dico_stream_close(conn->str); dico_stream_destroy(&conn->str); conn->str = transport; conn->transcript = state; } else { dico_stream_t logstr = dico_log_stream_create(L_DEBUG); if (!logstr) xalloc_die(); conn->str = xdico_transcript_stream_create(conn->str, logstr, xscript_prefix); conn->transcript = state; } } int dict_connect(struct dict_connection **pconn, dico_url_t url) { struct sockaddr_in s; int fd; IPADDR ip; dico_stream_t str; struct dict_connection *conn; XDICO_DEBUG_F2(1, _("Connecting to %s:%d\n"), url->host, url->port ? url->port : DICO_DICT_PORT); fd = socket(PF_INET, SOCK_STREAM, 0); if (fd == -1) { dico_log(L_ERR, errno, _("cannot create dict socket")); return 1; } s.sin_family = AF_INET; s.sin_addr.s_addr = htonl(source_addr); s.sin_port = 0; if (bind(fd, (struct sockaddr*) &s, sizeof(s)) < 0) { dico_log(L_ERR, errno, _("cannot bind AUTH socket")); } ip = get_ipaddr(url->host); if (ip == 0) { dico_log(L_ERR, 0, _("%s: Invalid IP or unknown host name"), url->host); return 1; } s.sin_addr.s_addr = htonl(ip); s.sin_port = htons(url->port ? url->port : DICO_DICT_PORT); if (connect(fd, (struct sockaddr*) &s, sizeof(s)) == -1) { dico_log(L_ERR, errno, _("cannot connect to DICT server %s:%d"), url->host, url->port ? url->port : DICO_DICT_PORT); close(fd); return 1; } if ((str = dico_fd_io_stream_create(fd, fd)) == NULL) { dico_log(L_ERR, errno, _("cannot create dict stream: %s"), strerror(errno)); return 1; } conn = xzalloc(sizeof(*conn)); conn->str = str; conn->fd = fd; dict_transcript(conn, transcript); if (dict_read_reply(conn)) { dico_log(L_ERR, 0, _("No reply from server")); return 1; } if (parse_initial_reply(conn)) { dico_log(L_ERR, 0, _("Invalid reply from server")); dict_conn_close(conn); return 1; } XDICO_DEBUG(1, _("Sending client information\n")); stream_printf(conn->str, "CLIENT \"%s\"\r\n", client); dict_read_reply(conn); if (!dict_status_p(conn, "250")) dico_log(L_WARN, 0, _("Unexpected reply to CLIENT command: `%s'"), conn->buf); obstack_init(&conn->stk); if (!noauth_option && dict_auth(conn, url)) { dico_log(L_ERR, 0, _("Authentication failed")); dict_conn_close(conn); return 1; } *pconn = conn; return 0; } int dict_read_reply(struct dict_connection *conn) { int rc; if (conn->buf) conn->buf[0] = 0; rc = dico_stream_getline(conn->str, &conn->buf, &conn->size, &conn->level); if (rc == 0) conn->level = dico_trim_nl(conn->buf); return rc; } int dict_status_p(struct dict_connection *conn, const char *status) { return conn->level > 3 && memcmp(conn->buf, status, 3) == 0 && (isspace(conn->buf[3]) || (conn->level == 5 && memcmp(conn->buf+3,"\r\n",2) == 0)); } int dict_capa(struct dict_connection *conn, char *capa) { int i; for (i = 0; i < conn->capac; i++) if (strcmp(conn->capav[i], capa) == 0) return 1; return 0; } int dict_multiline_reply(struct dict_connection *conn) { int rc; size_t nlines = 0; while ((rc = dict_read_reply(conn)) == 0) { char *ptr = conn->buf; size_t len = conn->level; if (*ptr == '.') { if (ptr[1] == 0) break; else if (ptr[1] == '.') { ptr++; len--; } } obstack_grow(&conn->stk, ptr, len); obstack_1grow(&conn->stk, '\n'); nlines++; } obstack_1grow(&conn->stk, 0); return rc; } int dict_define(struct dict_connection *conn, char *database, char *word) { int rc; XDICO_DEBUG_F2(1, _("Sending query for word \"%s\" in database \"%s\"\n"), word, database); stream_printf(conn->str, "DEFINE \"%s\" \"%s\"\r\n", quotearg_n (0, database), quotearg_n (1, word)); dict_read_reply(conn); if (dict_status_p(conn, "150")) { unsigned long i, count; char *p; count = strtoul (conn->buf + 3, &p, 10); XDICO_DEBUG_F1(1, ngettext("Reading %lu definition\n", "Reading %lu definitions\n", count), count); for (i = 0; i < count; i++) { dict_read_reply(conn); if (!dict_status_p(conn, "151")) { dico_log(L_WARN, 0, _("Unexpected reply in place of definition %lu"), i); break; } obstack_grow(&conn->stk, conn->buf, conn->level); obstack_1grow(&conn->stk, 0); dict_multiline_reply(conn); } dict_read_reply(conn); dict_result_create(conn, dict_result_define, count, obstack_finish(&conn->stk)); rc = 0; } else rc = 1; return rc; } int dict_match(struct dict_connection *conn, char *database, char *strategy, char *word) { int rc; if (levenshtein_threshold && conn->levdist != levenshtein_threshold && dict_capa(conn, "xlev")) { XDICO_DEBUG(1, _("Setting Levenshtein threshold\n")); stream_printf(conn->str, "XLEV %u\n", levenshtein_threshold); dict_read_reply(conn); if (dict_status_p(conn, "250")) conn->levdist = levenshtein_threshold; else { dico_log(L_WARN, 0, _("Server rejected XLEV command")); dico_log(L_WARN, 0, _("Server reply: %s"), conn->buf); } } XDICO_DEBUG_F3(1, _("Sending query to match word \"%s\" in " "database \"%s\", " "using \"%s\"\n"), word, database, strategy); stream_printf(conn->str, "MATCH \"%s\" \"%s\" \"%s\"\r\n", quotearg_n (0, database), quotearg_n (1, strategy), quotearg_n (2, word)); dict_read_reply(conn); if (dict_status_p(conn, "152")) { unsigned long count; char *p; count = strtoul (conn->buf + 3, &p, 10); XDICO_DEBUG_F1(1, ngettext("Reading %lu match\n", "Reading %lu matches\n", count), count); dict_multiline_reply(conn); dict_result_create(conn, dict_result_match, count, obstack_finish(&conn->stk)); dict_read_reply(conn); rc = 0; } else rc = 1; return rc; } static size_t count_lines(char *p) { size_t count = 0; while ((p = strchr(p, '\n'))) { count++; p++; } return count; } static void _result_parse_def(struct dict_result *res) { char *p; size_t i; struct define_result *def = xcalloc(res->count, sizeof(*def)); struct dico_tokbuf tb; dico_tokenize_begin(&tb); res->set.def = def; p = res->base; for (i = 0; i < res->count; i++, def++) { /* FIXME: Provide a destructive version of xdico_tokenize_string? */ xdico_tokenize_string(&tb, p); def->word = xstrdup(tb.tb_tokv[1]); def->database = xstrdup(tb.tb_tokv[2]); def->descr = xstrdup(tb.tb_tokv[3]); p += strlen(p) + 1; def->defn = p; def->nlines = count_lines(p); p += strlen(p) + 1; } dico_tokenize_end(&tb); } static void _result_free_def(struct dict_result *res) { size_t i; struct define_result *def = res->set.def; for (i = 0; i < res->count; i++, def++) { free(def->word); free(def->database); free(def->descr); } free(res->set.def); } static void _result_parse_mat(struct dict_result *res) { char *p; size_t i; struct match_result *mat = xcalloc(res->count, sizeof(*mat)); res->set.mat = mat; for (i = 0, p = strtok(res->base, "\n"); i < res->count; p = strtok(NULL, "\n"), i++, mat++) { size_t len; if (!p) { dico_log(L_NOTICE, 0, _("Not enough data in the result")); res->count = i; break; } mat->database = p; len = strcspn(p, " \t"); p[len] = 0; p += len + 1; p += strspn(p, " \t"); len = strlen(p); if (p[0] == '"' && p[len-1] == '"') { p[len-1] = 0; p++; } mat->word = p; } } static void _result_free_mat(struct dict_result *res) { free(res->set.mat); } struct dict_result * dict_result_create(struct dict_connection *conn, enum dict_result_type type, size_t count, char *base) { struct dict_result *res = xmalloc(sizeof(*res)); res->conn = conn; res->prev = conn->last_result; conn->last_result = res; res->type = type; res->count = count; res->base = base; switch (type) { case dict_result_define: _result_parse_def(res); break; case dict_result_match: _result_parse_mat(res); break; case dict_result_text: break; } return res; } void dict_result_free(struct dict_result *res) { if (!res) return; /* Detach res from the list and free obstack memory, if it was the last obtained result, */ if (res == res->conn->last_result) { obstack_free(&res->conn->stk, res->base); res->conn->last_result = res->prev; } else { struct dict_result *p; for (p = res->conn->last_result; p && p->prev != res; p = p->prev) ; if (!p) { dico_log(L_CRIT, 0, _("Freeing unlinked result")); abort(); } p->prev = res->prev; } /* Free allocated memory */ switch (res->type) { case dict_result_define: _result_free_def(res); break; case dict_result_match: _result_free_mat(res); break; case dict_result_text: break; } free(res); } /* FIXME: Split into close/destroy */ void dict_conn_close(struct dict_connection *conn) { struct dict_result *res; dico_stream_close(conn->str); dico_stream_destroy(&conn->str); free(conn->msgid); free(conn->buf); dico_argcv_free(conn->capac, conn->capav); for (res = conn->last_result; res; ) { struct dict_result *prev = res->prev; dict_result_free(res); res = prev; } obstack_free(&conn->stk, NULL); free(conn); } dico-2.2/dico/dico-priv.h000066400000000000000000000167041172612674100152750ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "wordsplit.h" #include #include #include #include #define obstack_chunk_alloc malloc #define obstack_chunk_free free #include #include #if defined(WITH_READLINE) && defined(HAVE_READLINE_READLINE_H) # include # include #endif enum dico_client_mode { mode_define, mode_match, mode_dbs, mode_strats, mode_help, mode_info, mode_server }; struct match_result { char *database; char *word; }; struct define_result { char *word; char *database; char *descr; char *defn; size_t nlines; }; enum dict_result_type { dict_result_define, dict_result_match, dict_result_text }; struct dict_result { struct dict_result *prev; /* Previous result */ struct dict_connection *conn; /* Associated connection */ enum dict_result_type type; /* Result type */ size_t count; /* Number of elements in the set */ char *base; /* Base data pointer */ union { struct define_result *def; struct match_result *mat; } set; /* Result set */ }; struct dict_connection { int fd; dico_stream_t str; /* Communication stream */ int transcript; /* True if transcript is enabled */ int capac; /* Number of reported server capabilities */ char **capav; /* Array of capabilities */ char *msgid; /* msg-id */ char *buf; /* Input buffer */ size_t size; /* Buffer size */ size_t level; /* Buffer fill level */ size_t levdist; /* Configured Levenshtein distance */ struct obstack stk; /* Obstack for input data */ struct dict_result *last_result; /* Last result */ struct dict_result *db_result; struct dict_result *strat_result; struct dict_result *match_result; }; struct auth_cred { char *user; char *pass; int sasl; dico_list_t mech; char *service; char *realm; char *hostname; }; struct funtab { char *name; /* Keyword */ int argmin; /* Minimal number of arguments */ int argmax; /* Maximal number of arguments */ char *argdoc; /* Argument docstring */ char *docstring; /* Documentation string */ void (*fun) (int argc, char **argv); /* Handler */ char **(*compl) (int argc, char **argv, int ws); }; #define DICO_CLIENT_ID PACKAGE_STRING extern struct dico_url dico_url; extern struct auth_cred default_cred; extern char *client; extern enum dico_client_mode mode; extern int transcript; extern IPADDR source_addr; extern int noauth_option; extern unsigned levenshtein_threshold; extern char *autologin_file; extern int quiet_option; void get_options (int argc, char *argv[], int *index); /* connect.c */ void dict_transcript(struct dict_connection *conn, int state); int dict_connect(struct dict_connection **pconn, dico_url_t url); void dict_conn_close(struct dict_connection *conn); int dict_read_reply(struct dict_connection *conn); int dict_status_p(struct dict_connection *conn, const char *status); int dict_capa(struct dict_connection *conn, char *capa); int dict_multiline_reply(struct dict_connection *conn); struct dict_result *dict_result_create(struct dict_connection *conn, enum dict_result_type type, size_t count, char *base); void dict_result_free(struct dict_result *res); #define dict_conn_last_result(c) ((c)->last_result) int dict_define(struct dict_connection *conn, char *database, char *word); int dict_match(struct dict_connection *conn, char *database, char *strategy, char *word); char *get_homedir(void); int ds_tilde_expand(const char *str, char **output); #define GETCRED_OK 0 #define GETCRED_FAIL 1 #define GETCRED_NOAUTH 2 int auth_cred_get(char *host, struct auth_cred *cred); void auth_cred_free(struct auth_cred *cred); /* lookup.c */ int dict_lookup_url(dico_url_t url); int dict_word(char *word); int dict_lookup(struct dict_connection *conn, dico_url_t url); int dict_single_command(char *cmd, char *arg, char *code); void dict_run_single_command(struct dict_connection *conn, const char *cmd, const char *arg, const char *code); void print_result(struct dict_result *res); void print_match_result(struct dict_result *res); void print_reply(struct dict_connection *conn); /* netrc.c */ char *skipws(char *buf); #define AUTOLOGIN_USERNAME 0x1 #define AUTOLOGIN_PASSWORD 0x2 #define AUTOLOGIN_NOAUTH 0x4 #define AUTOLOGIN_MECH 0x8 int parse_autologin(const char *filename, char *host, struct auth_cred *pcred, int *pflags); /* shell.c */ struct funtab *find_funtab(const char *name); void parse_init_scripts(void); void dico_shell(void); void script_warning(const char *fmt, ...); void script_error(const char *fmt, ...); char **dict_completion_matches(int argc, char **argv, int ws, char *(*generator)(const char *, int)); /* func.c */ int ensure_connection(void); int set_bool(int *pval, char *str); void ds_silent_close(void); void ds_open(int argc, char **argv); void ds_close(int argc, char **argv); void ds_autologin(int argc, char **argv); void ds_database(int argc, char **argv); void ds_define_nth(size_t num); void ds_strategy(int argc, char **argv); void ds_transcript(int argc, char **argv); void ds_define(int argc, char **argv); void ds_match(int argc, char **argv); void ds_distance(int argc, char **argv); void ds_version(int argc, char **argv); void ds_warranty(int argc, char **argv); void ds_show_db(int argc, char **argv); void ds_show_strat(int argc, char **argv); void ds_show_info(int argc, char **argv); void ds_sasl(int argc, char **argv); void ds_verbose(int argc, char **argv); char **ds_compl_database(int argc, char **argv, int ws); char **ds_compl_strategy(int argc, char **argv, int ws); /* pager.c */ void ds_pager(int argc, char **argv); dico_stream_t create_pager_stream(size_t nlines); /* saslauth.c */ #define AUTH_OK 0 #define AUTH_FAIL 1 #define AUTH_CONT 2 int saslauth(struct dict_connection *conn, dico_url_t url); void sasl_enable(int val); int sasl_enabled_p(void); /* cmdline.c */ void print_version(const char *program_version, FILE *stream); void print_version_only(const char *program_version, FILE *stream); dico-2.2/dico/dico.c000066400000000000000000000054461172612674100143130ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" struct dico_url dico_url; struct auth_cred default_cred; char *client = DICO_CLIENT_ID; enum dico_client_mode mode = mode_define; int transcript; IPADDR source_addr = INADDR_ANY; int noauth_option; unsigned levenshtein_threshold; char *autologin_file; int quiet_option; int debug_level; int debug_source_info; dico_stream_t debug_stream; void fixup_url() { xdico_assign_string(&dico_url.proto, "dict"); if (!dico_url.host) xdico_assign_string(&dico_url.host, DEFAULT_DICT_SERVER); if (!dico_url.req.database) xdico_assign_string(&dico_url.req.database, "!"); if (!dico_url.req.strategy) xdico_assign_string(&dico_url.req.strategy, "."); if (mode == mode_match) dico_url.req.type = DICO_REQUEST_MATCH; } int main(int argc, char **argv) { int index, rc = 0; appi18n_init(); dico_set_program_name(argv[0]); debug_stream = dico_dbg_stream_create(); parse_init_scripts(); get_options(argc, argv, &index); fixup_url(); set_quoting_style(NULL, escape_quoting_style); signal(SIGPIPE, SIG_IGN); argc -= index; argv += index; switch (mode) { case mode_define: case mode_match: if (!argc) { dico_shell(); exit(0); } break; default: if (argc) dico_log(L_WARN, 0, _("extra command line arguments ignored")); } switch (mode) { case mode_define: case mode_match: if (!argc) dico_die(1, L_ERR, 0, _("you should give a word to look for or an URL")); while (argc--) rc |= dict_word((*argv)++) != 0; break; case mode_dbs: rc = dict_single_command("SHOW DATABASES", NULL, "110"); break; case mode_strats: rc = dict_single_command("SHOW STRATEGIES", NULL, "111"); break; case mode_help: rc = dict_single_command("HELP", NULL, "113"); break; case mode_info: if (!dico_url.req.database) dico_die(1, L_ERR, 0, _("Database name not specified")); rc = dict_single_command("SHOW INFO", dico_url.req.database, "112"); break; case mode_server: rc = dict_single_command("SHOW SERVER", NULL, "114"); break; } return rc; } dico-2.2/dico/func.c000066400000000000000000000230371172612674100143240ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" static struct dict_connection *conn; int set_bool(int *pval, char *str) { if (strcmp(str, "yes") == 0 || strcmp(str, "on") == 0 || strcmp(str, "true") == 0) *pval = 1; else if (strcmp(str, "no") == 0 || strcmp(str, "off") == 0 || strcmp(str, "false") == 0) *pval = 0; else { script_error(_("Expected boolean value")); return 1; } return 0; } void ds_silent_close() { if (conn) { stream_printf(conn->str, "QUIT\r\n"); dict_read_reply(conn); dict_conn_close(conn); conn = NULL; } } static int get_list(struct dict_result **pres, char *cmd, char *code) { if (conn && *pres == NULL) { stream_printf(conn->str, "%s\r\n", cmd); dict_read_reply(conn); if (dict_status_p(conn, code)) { unsigned long count; char *p; count = strtoul (conn->buf + 3, &p, 10); dict_multiline_reply(conn); dict_result_create(conn, dict_result_match, count, obstack_finish(&conn->stk)); dict_read_reply(conn); *pres = dict_conn_last_result(conn); } else { script_error(_("Cannot get listing: %s"), conn->buf); return 1; } } return 0; } void check_disconnect() { if (conn) { int rc; fd_set rd, wr, ex; FD_ZERO(&rd); FD_SET(conn->fd, &rd); FD_ZERO(&wr); FD_SET(conn->fd, &wr); FD_ZERO(&ex); FD_SET(conn->fd, &ex); do rc = select(conn->fd + 1, &rd, &wr, &ex, NULL); while (rc == -1 && errno == EINTR); if (rc < 0 || FD_ISSET(conn->fd, &rd)) { dict_conn_close(conn); conn = NULL; } } } int ensure_connection() { check_disconnect(); if (!conn) { if (!dico_url.host) { script_error(_("Please specify server name or IP address")); return 1; } if (dict_connect(&conn, &dico_url)) { script_error(_("Cannot connect to the server")); return 1; } XDICO_DEBUG(1, _("Getting list of databases\n")); get_list(&conn->db_result, "SHOW DATABASES", "110"); XDICO_DEBUG(1, _("Getting list of strategies\n")); get_list(&conn->strat_result, "SHOW STRATEGIES", "111"); XDICO_DEBUG(1, _("Finished getting server information\n")); } return 0; } void ds_open(int argc, char **argv) { if (argc > 1) { if (argc == 3) { int n = str2port(argv[2]); if (n == -1) { script_error(_("Invalid port number or service name")); return; } dico_url.port = n; } xdico_assign_string(&dico_url.host, argv[1]); } if (!dico_url.host) { script_error(_("Please specify server name or IP address")); return; } ds_silent_close(); ensure_connection(); } void ds_close(int argc, char **argv) { if (!conn) script_error(_("Nothing to close")); else ds_silent_close(); } void ds_autologin(int argc, char **argv) { if (argc == 1) { if (!autologin_file) printf("%s\n", _("No autologin file.")); else printf("%s\n", autologin_file); } else { char *str; if (ds_tilde_expand(argv[1], &str)) { free(autologin_file); autologin_file = str; } else xdico_assign_string(&autologin_file, argv[1]); } } void ds_sasl(int argc, char **argv) { if (argc == 1) { printf("%s\n", sasl_enabled_p() ? _("on") : _("off")); } else { int val; if (set_bool(&val, argv[1]) == 0) sasl_enable(val); } } void ds_database(int argc, char **argv) { if (argc == 1) { printf("%s\n", dico_url.req.database ? dico_url.req.database : "!"); } else /* FIXME: Check if such database is available?*/ xdico_assign_string(&dico_url.req.database, argv[1]); } static char * result_generator(struct dict_result *res, const char *text, int state) { static int i, len; if (!state) { i = 0; len = strlen(text); } while (i < res->count) { char *s = res->set.mat[i].database; i++; if (strncmp(s, text, len) == 0) return strdup(s); } return NULL; } static char * db_generator(const char *text, int state) { return result_generator(conn->db_result, text, state); } char ** ds_compl_database(int argc, char **argv, int ws) { return dict_completion_matches(argc, argv, ws, db_generator); } void ds_strategy(int argc, char **argv) { if (argc == 1) { printf("%s\n", dico_url.req.strategy); } else /* FIXME: Check if such strategy is available?*/ xdico_assign_string(&dico_url.req.strategy, argv[1]); } static char * strat_generator(const char *text, int state) { return result_generator(conn->strat_result, text, state); } char ** ds_compl_strategy(int argc, char **argv, int ws) { return dict_completion_matches (argc, argv, ws, strat_generator); } void ds_verbose(int argc, char **argv) { if (argc == 1) printf("%d\n", debug_level); else { char *p; int n = strtoul(argv[1], &p, 10); if (*p) script_error(_("invalid number")); else debug_level = n; } } void ds_transcript(int argc, char **argv) { if (argc == 1) printf(_("transcript is %s\n"), transcript ? _("on") : _("off")); else { set_bool(&transcript, argv[1]); if (conn) dict_transcript(conn, transcript); } } void ds_define(int argc, char **argv) { if (ensure_connection()) return; dico_url.req.type = DICO_REQUEST_DEFINE; xdico_assign_string(&dico_url.req.word, argv[1]); dict_lookup(conn, &dico_url); } void ds_match(int argc, char **argv) { int rc; if (ensure_connection()) return; if (argc == 2 && argv[1][0]) { dict_result_free(conn->match_result); conn->match_result = NULL; dico_url.req.type = DICO_REQUEST_MATCH; xdico_assign_string(&dico_url.req.word, argv[1]); rc = dict_match(conn, quotearg_n (0, dico_url.req.database), quotearg_n (1, dico_url.req.strategy), quotearg_n (2, dico_url.req.word)); if (rc == 0) conn->match_result = dict_conn_last_result(conn); else { print_reply(conn); return; } } else if (!conn->match_result) { script_error(_("No previous match")); return; } print_match_result(conn->match_result); } /* Display a definition for the Nth result from a previous match. */ void ds_define_nth(size_t num) { struct dico_url url = dico_url; if (ensure_connection()) return; if (!conn->match_result) { script_error(_("No previous match")); return; } if (num >= conn->match_result->count) { script_error(_("Invalid match number. Type / to see the matches.")); return; } url.req.type = DICO_REQUEST_DEFINE; url.req.database = conn->match_result->set.mat[num].database; url.req.word = conn->match_result->set.mat[num].word; dict_lookup(conn, &url); } void ds_distance(int argc, char **argv) { if (argc == 1) { if (conn) { if (!dict_capa(conn, "xlev")) { printf(_("Server does not support XLEV extension")); return; } stream_printf(conn->str, "XLEV TELL\r\n"); dict_read_reply(conn); if (dict_status_p(conn, "280")) printf(_("Reported Levenshtein distance:%s\n"), conn->buf+3); else { printf("%s\n", _("Cannot query Levenshtein distance. Server responded:")); printf("%s\n", conn->buf); } } if (levenshtein_threshold == 0) printf(_("No distance configured\n")); else printf(_("Configured Levenshtein distance: %u\n"), levenshtein_threshold); } else { char *p; levenshtein_threshold = strtoul(argv[1], &p, 10); if (*p) script_error(_("invalid number")); } } void ds_show_db(int argc, char **argv) { if (ensure_connection()) return; print_result(conn->db_result); } void ds_show_strat(int argc, char **argv) { if (ensure_connection()) return; print_result(conn->strat_result); } void ds_show_info(int argc, char **argv) { const char *dbname; if (argc == 1) dbname = dico_url.req.database ? dico_url.req.database : "!"; else dbname = argv[1]; if (strcmp(dbname, "!") == 0) printf(_("Search all of the databases until a match is found,\n" "and display all matches in that database.\n")); else if (strcmp(dbname, "*") == 0) printf(_("Search all of the databases and display all matches.")); else { if (ensure_connection()) return; dict_run_single_command(conn, "SHOW INFO", dbname, "112"); } } void ds_version(int argc, char **argv) { printf("%s\n", PACKAGE_STRING); } static char gplv3_text[] = "\ GNU Dico is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation; either version 3, or (at your option)\n\ any later version.\n\ \n\ GNU Dico is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ along with GNU Dico. If not, see .\n"; void ds_warranty(int argc, char **argv) { print_version_only(PACKAGE_STRING, stdout); putchar('\n'); printf("%s", gplv3_text); } dico-2.2/dico/lookup.c000066400000000000000000000155241172612674100147040ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" void print_reply(struct dict_connection *conn) { if (strncmp(conn->buf, "552", 3) == 0) printf("%s\n", _("No match")); else printf("Error: %s\n", conn->buf); } static size_t utf8_count_newlines(char *str) { size_t count = 0; struct utf8_iterator itr; for (utf8_iter_first(&itr, (char *)str); !utf8_iter_end_p(&itr); utf8_iter_next(&itr)) { if (utf8_iter_isascii(itr) && *itr.curptr == '\n') count++; } return count; } size_t result_count_lines(struct dict_result *res) { size_t i, count = 0; switch (res->type) { case dict_result_define: for (i = 0; i < res->count; i++) count += res->set.def[i].nlines + 3; break; case dict_result_match: count = res->count; break; case dict_result_text: count = utf8_count_newlines(res->base); } return count; } static void format_defn(dico_stream_t str, struct define_result *def) { stream_printf(str, _("From %s, %s:\n"), def->database, def->descr); stream_writez(str, def->defn); dico_stream_write(str, "\n", 1); } static void format_match(dico_stream_t str, struct match_result *mat) { stream_printf(str, "%s \"%s\"\n", mat->database, mat->word); } void print_result(struct dict_result *res) { unsigned long i; dico_stream_t str; str = create_pager_stream(result_count_lines(res)); switch (res->type) { case dict_result_define: for (i = 0; i < res->count; i++) format_defn(str, &res->set.def[i]); break; case dict_result_match: for (i = 0; i < res->count; i++) format_match(str, &res->set.mat[i]); break; case dict_result_text: stream_writez(str, res->base); break; } dico_stream_close(str); dico_stream_destroy(&str); } struct result_display { struct result_display *next; char *database; int count; char **matches; }; struct result_display * alloc_display(struct dict_result *res, size_t from, size_t to) { struct result_display *disp = xmalloc(sizeof(*disp)); size_t i; disp->next = NULL; disp->database = res->set.mat[from].database; disp->count = to - from; disp->matches = xcalloc(to - from, sizeof(disp->matches[0])); for (i = 0; from < to; i++, from++) disp->matches[i] = res->set.mat[from].word; return disp; } static char * find_descr(struct dict_connection *conn, const char *name) { if (conn->db_result) { size_t i; for (i = 0; i < conn->db_result->count; i++) { if (strcmp(conn->db_result->set.mat[i].database, name) == 0) return conn->db_result->set.mat[i].word; } } return _("(no description available)"); } void print_match_result(struct dict_result *res) { struct result_display *head = NULL, *tail = NULL; char *dbname = NULL; size_t i, j = 0; struct dict_connection *conn = res->conn; size_t ndb = 0; dico_stream_t str; struct result_display *p; #define ALLOC_DISPLAY() do { \ struct result_display *p = alloc_display(res, j, i); \ if (!tail) \ head = p; \ else \ tail->next = p; \ tail = p; \ ndb++; \ j = i; \ dbname = res->set.mat[i].database; \ } while (0) dbname = res->set.mat[0].database; for (i = 1; i < res->count; i++) { if (strcmp(res->set.mat[i].database, dbname)) ALLOC_DISPLAY(); } ALLOC_DISPLAY(); str = create_pager_stream(ndb + result_count_lines(res)); j = 0; for (p = head; p; ) { struct result_display *next = p->next; stream_printf(str, _("From %s, %s:\n"), p->database, find_descr(conn, p->database)); for (i = 0; i < p->count; i++, j++) stream_printf(str, "%4d) \"%s\"\n", j, p->matches[i]); free(p->matches); free(p); p = next; } dico_stream_close(str); dico_stream_destroy(&str); } int dict_lookup(struct dict_connection *conn, dico_url_t url) { int rc; switch (url->req.type) { case DICO_REQUEST_DEFINE: rc = dict_define(conn, quotearg_n (0, url->req.database), quotearg_n (1, url->req.word)); break; case DICO_REQUEST_MATCH: rc = dict_match(conn, quotearg_n (0, url->req.database), quotearg_n (1, url->req.strategy), quotearg_n (2, url->req.word)); break; default: dico_log(L_CRIT, 0, _("%s:%d: INTERNAL ERROR: unexpected request type"), __FILE__, __LINE__); } if (rc == 0) { struct dict_result *res = dict_conn_last_result(conn); print_result(res); dict_result_free(res); } else print_reply(conn); return 0; } int dict_lookup_url(dico_url_t url) { struct dict_connection *conn; if (!url->host) { dico_log(L_ERR, 0, _("Server name or IP not specified")); return 1; } if (dict_connect(&conn, url)) return 1; dict_lookup(conn, url); XDICO_DEBUG(1, _("Quitting\n")); stream_printf(conn->str, "QUIT\r\n"); dict_read_reply(conn); dict_conn_close(conn); /* FIXME */ return 0; } int dict_word(char *word) { int rc; dico_url_t url; if (memcmp (word, "dict://", 7) == 0) { if (dico_url_parse(&url, word)) return 1; rc = dict_lookup_url(url); dico_url_destroy(&url); } else { dico_url.req.word = word; rc = dict_lookup_url(&dico_url); } return rc; } void dict_run_single_command(struct dict_connection *conn, const char *cmd, const char *arg, const char *code) { if (arg) stream_printf(conn->str, "%s \"%s\"\r\n", cmd, arg); else stream_printf(conn->str, "%s\r\n", cmd); dict_read_reply(conn); if (!dict_status_p(conn, code)) print_reply(conn); else { struct dict_result *res; dict_multiline_reply(conn); dict_read_reply(conn); dict_result_create(conn, dict_result_text, 1, obstack_finish(&conn->stk)); res = dict_conn_last_result(conn); print_result(res); dict_result_free(res); } } int dict_single_command(char *cmd, char *arg, char *code) { struct dict_connection *conn; if (!dico_url.host) { dico_log(L_ERR, 0, _("Server name or IP not specified")); return 1; } if (dict_connect(&conn, &dico_url)) return 1; dict_run_single_command(conn, cmd, arg, code); dict_conn_close(conn); return 0; } dico-2.2/dico/pager.c000066400000000000000000000050171172612674100144650ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" #include static char *pager; static char * get_pager_name() { if (pager) { if (strcmp(pager, "-") == 0) return NULL; return pager; } return getenv("PAGER"); } void ds_pager(int argc, char **argv) { if (argc == 1) { char *p = get_pager_name(); if (p) { printf("%s\n", p); if (!pager) printf("%s\n", _("(Pager set from environment)")); } } else xdico_assign_string(&pager, argv[1]); } dico_stream_t create_output_stream() { return dico_fd_stream_create(fileno(stdout), DICO_STREAM_WRITE, 1); } static int get_screen_lines(void) { struct winsize ws; ws.ws_col = ws.ws_row = 0; if ((ioctl(1, TIOCGWINSZ, (char *) &ws) < 0) || ws.ws_row == 0) { const char *lines = getenv("LINES"); if (lines) ws.ws_row = strtol(lines, NULL, 10); } return ws.ws_row; } struct pfile_stream { FILE *fp; }; static int fp_write(void *data, const char *buf, size_t size, size_t *pret) { struct pfile_stream *p = data; *pret = fwrite(buf, 1, size, p->fp); return ferror(p->fp); } static int fp_close(void *data) { struct pfile_stream *p = data; pclose(p->fp); return 0; } static dico_stream_t create_pfile_stream(FILE *fp) { dico_stream_t str; struct pfile_stream *s; s = xmalloc(sizeof(*s)); s->fp = fp; if (dico_stream_create(&str, DICO_STREAM_WRITE, s)) xalloc_die(); dico_stream_set_write(str, fp_write); dico_stream_set_close(str, fp_close); return str; } dico_stream_t create_pager_stream(size_t nlines) { char *pager = get_pager_name(); FILE *fp; if (!pager || !pager[0] || !isatty(fileno(stdout)) || nlines < get_screen_lines()) return create_output_stream(); fp = popen(pager, "w"); if (!fp) return create_output_stream(); return create_pfile_stream(fp); } dico-2.2/dico/saslauth.c000066400000000000000000000177361172612674100152260ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" #ifdef WITH_GSASL #include static int _free_el(void *item, void *data DICO_ARG_UNUSED) { free(item); return 0; } static dico_list_t get_implemented_mechs(Gsasl *ctx) { char *listmech; dico_list_t supp = NULL; int rc; struct wordsplit ws; rc = gsasl_server_mechlist(ctx, &listmech); if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("cannot get list of available SASL mechanisms: " "%s"), gsasl_strerror (rc)); return NULL; } if (wordsplit(listmech, &ws, WRDSF_DEFFLAGS) == 0) { int i; supp = xdico_list_create(); dico_list_set_free_item(supp, _free_el, NULL); for (i = 0; i < ws.ws_wordc; i++) xdico_list_append(supp, ws.ws_wordv[i]); ws.ws_wordc = 0; wordsplit_free(&ws); } free(listmech); return supp; } static int str_str_cmp(const void *item, void *data) { return c_strcasecmp(item, data); } static void upcase(char *str) { for (; *str; str++) *str = toupper(*str); } #define CRED_HOSTNAME(c) ((c)->hostname ? (c)->hostname : \ ((c)->hostname = xdico_local_hostname())) static int callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop) { int rc = GSASL_OK; struct auth_cred *cred = gsasl_callback_hook_get(ctx); switch (prop) { case GSASL_PASSWORD: gsasl_property_set(sctx, prop, cred->pass); break; case GSASL_AUTHID: case GSASL_ANONYMOUS_TOKEN: gsasl_property_set(sctx, prop, cred->user); break; case GSASL_AUTHZID: gsasl_property_set(sctx, prop, NULL); break; case GSASL_SERVICE: gsasl_property_set(sctx, prop, cred->service ? cred->service : "dico"); break; case GSASL_REALM: gsasl_property_set(sctx, prop, cred->realm ? cred->realm : CRED_HOSTNAME(cred)); break; case GSASL_HOSTNAME: gsasl_property_set(sctx, prop, CRED_HOSTNAME(cred)); break; default: rc = GSASL_NO_CALLBACK; dico_log(L_NOTICE, 0, _("Unknown callback property %d"), prop); break; } return rc; } static int sasl_read_response(struct dict_connection *conn, char **data) { if (dict_read_reply(conn)) { dico_log(L_ERR, 0, _("GSASL handshake aborted")); return 1; } if (dict_status_p(conn, "130")) { if (dict_multiline_reply(conn) || dict_read_reply(conn)) { dico_log(L_ERR, 0, _("GSASL handshake aborted")); return 1; } *data = obstack_finish(&conn->stk); dico_trim_nl(*data); } else *data = NULL; return 0; } static void sasl_free_data(struct dict_connection *conn, char **pdata) { if (*pdata) { obstack_free(&conn->stk, *pdata); *pdata = NULL; } } int do_gsasl_auth(Gsasl *ctx, struct dict_connection *conn, char *mech) { Gsasl_session *sess; int rc; char *output = NULL; char *input = NULL; rc = gsasl_client_start(ctx, mech, &sess); if (rc != GSASL_OK) { dico_log(L_ERR, 0, "SASL gsasl_client_start: %s", gsasl_strerror(rc)); return 1; } stream_printf(conn->str, "SASLAUTH %s\r\n", mech); if (sasl_read_response(conn, &input)) return 1; do { if (!dict_status_p(conn, "330")) { dico_log(L_ERR, 0, _("GSASL handshake aborted: unexpected reply: %s"), conn->buf); return 1; } rc = gsasl_step64(sess, input, &output); sasl_free_data(conn, &input); if (rc != GSASL_NEEDS_MORE && rc != GSASL_OK) break; stream_printf(conn->str, "SASLRESP %s\r\n", output[0] ? output : "\"\""); free(output); output = NULL; if (sasl_read_response(conn, &input)) return 1; } while (rc == GSASL_NEEDS_MORE); free(output); if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("GSASL error: %s"), gsasl_strerror(rc)); return 1; } if (dict_status_p(conn, "330")) { /* Additional data are ignored. */ sasl_free_data(conn, &input); if (sasl_read_response(conn, &input)) return 1; } if (dict_status_p(conn, "230")) { /* Authentication successful */ insert_gsasl_stream(sess, &conn->str); return 0; } print_reply(conn); return 1; } struct authctx { Gsasl *ctx; dico_list_t mech; }; static int match_capa(struct dict_connection *conn, const char *p) { int i; for (i = 0; i < conn->capac; i++) if (xdico_sasl_capa_match_p(p, conn->capav[i])) return 1; return 0; } static int getauthcontext(struct dict_connection *conn, struct authctx *authctx) { Gsasl *ctx; int rc; dico_list_t mechs; dico_iterator_t itr; char *p; XDICO_DEBUG(1, _("Initializing SASL\n")); rc = gsasl_init(&ctx); if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("Cannot initialize libgsasl: %s"), gsasl_strerror(rc)); return 1; } mechs = get_implemented_mechs(ctx); if (!mechs) { gsasl_done(ctx); return 1; } itr = xdico_list_iterator(mechs); for (p = dico_iterator_first(itr); p; p = dico_iterator_next(itr)) { if (!match_capa(conn, p)) dico_iterator_remove_current(itr, NULL); } dico_iterator_destroy(&itr); if (dico_list_count(mechs) == 0) { dico_list_destroy(&mechs); gsasl_done(ctx); return 1; } authctx->ctx = ctx; authctx->mech = mechs; return 0; } static void freeauthcontext(struct authctx *authctx) { gsasl_done(authctx->ctx); dico_list_destroy(&authctx->mech); } int saslauth0(struct dict_connection *conn, struct auth_cred *cred, struct authctx *authctx) { int rc; char *mech; dico_list_t mechlist; XDICO_DEBUG(1, _("Trying SASL\n")); gsasl_callback_hook_set(authctx->ctx, cred); gsasl_callback_set(authctx->ctx, callback); if (cred->mech) mechlist = dico_list_intersect(cred->mech, authctx->mech, str_str_cmp); else mechlist = cred->mech; if (!mechlist || dico_list_count(mechlist) == 0) { dico_log(L_ERR, 0, _("No suitable SASL mechanism found")); if (mechlist && mechlist != cred->mech) dico_list_destroy(&mechlist); return AUTH_CONT; } mech = dico_list_item(mechlist, 0); upcase(mech); dico_log(L_DEBUG, 0, _("Selected authentication mechanism %s"), mech); rc = do_gsasl_auth(authctx->ctx, conn, mech); if (mechlist != cred->mech) dico_list_destroy(&mechlist); XDICO_DEBUG_F1(1, "%s\n", rc == 0 ? _("SASL authentication succeeded") : _("SASL authentication failed")); /* FIXME */ return rc == 0 ? AUTH_OK : AUTH_FAIL; } int saslauth(struct dict_connection *conn, dico_url_t url) { struct authctx authctx; int rc = AUTH_FAIL; struct auth_cred cred; if (getauthcontext(conn, &authctx)) return AUTH_CONT; switch (auth_cred_get(url->host, &cred)) { case GETCRED_OK: if (cred.sasl) { rc = saslauth0(conn, &cred, &authctx); auth_cred_free(&cred); } else rc = AUTH_CONT; break; case GETCRED_FAIL: dico_log(L_WARN, 0, _("Not enough credentials for authentication")); rc = AUTH_FAIL; break; case GETCRED_NOAUTH: XDICO_DEBUG(1, _("Skipping authentication\n")); rc = AUTH_OK; } freeauthcontext(&authctx); return rc; } static int sasl_enable_state = 1; void sasl_enable(int val) { sasl_enable_state = 1; } int sasl_enabled_p() { return sasl_enable_state; } #else int saslauth(struct dict_connection *conn, dico_url_t url) { return AUTH_CONT; } void sasl_enable(int val) { dico_log(L_WARN, 0, _("Dico compiled without SASL support")); } int sasl_enabled_p() { return 0; } #endif dico-2.2/dico/shell.c000066400000000000000000000324441172612674100145020ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include "dico-priv.h" int interactive; char *prompt; #define DICO_PROMPT "dico> " static void ds_prefix(int argc, char **argv); static void ds_help(int argc, char **argv); static void ds_quiet(int argc, char **argv); static void ds_prompt(int argc, char **argv); static char **no_compl(int argc, char **argv, int ws); #ifdef WITH_READLINE static void ds_history(int argc, char **argv); static int retrieve_history(char *str); #endif char *helptext[][2] = { { N_("WORD"), N_("Define WORD.") }, { N_("/WORD"), N_("Match WORD.") }, { "/", N_("Redisplay previous matches.") }, { N_("NUMBER"), N_("Define NUMBERth match.") }, #ifdef WITH_READLINE { "!NUMBER", N_("Edit NUMBERth previous command.") }, #endif }; struct funtab funtab[] = { { "open", 1, 3, N_("[HOST [PORT]]"), N_("Connect to a DICT server."), ds_open, no_compl }, { "close", 1, 1, NULL, N_("Close the connection."), ds_close, }, { "database", 1, 2, N_("[NAME]"), N_("Set or display current database name."), ds_database, ds_compl_database }, { "strategy", 1, 2, N_("[NAME]"), N_("Set or display current strategy."), ds_strategy, ds_compl_strategy }, { "distance", 1, 2, N_("[NUM]"), N_("Set or query Levenshtein distance (server-dependent)."), ds_distance, no_compl }, { "ls", 1, 1, NULL, N_("List available matching strategies"), ds_show_strat, }, { "ld", 1, 1, NULL, N_("List all accessible databases"), ds_show_db, }, { "info", 1, 2, N_("[DB]"), N_("Display the information about the database."), ds_show_info, ds_compl_database }, { "prefix", 1, 2, N_("[CHAR]"), N_("Set or display command prefix."), ds_prefix, }, { "transcript", 1, 2, N_("[BOOL]"), N_("Set or display session transcript mode."), ds_transcript, no_compl }, { "verbose", 1, 2, N_("[NUMBER]"), N_("Set or display verbosity level."), ds_verbose, no_compl }, { "prompt", 2, 2, N_("STRING"), N_("Change command line prompt."), ds_prompt, no_compl }, { "pager", 1, 2, N_("STRING"), N_("Change or display pager settings."), ds_pager, no_compl }, { "autologin", 1, 2, N_("[FILE]"), N_("Set or display autologin file name."), ds_autologin,}, { "sasl", 1, 2, N_("[BOOL]"), N_("Enable SASL authentication."), ds_sasl, no_compl }, #ifdef WITH_READLINE { "history", 1, 1, NULL, N_("Display command history."), ds_history, no_compl }, #endif { "help", 1, 1, NULL, N_("Display this help text."), ds_help, }, { "version", 1, 1, NULL, N_("Print program version."), ds_version, }, { "warranty", 1, 1, NULL, N_("Print copyright statement."), ds_warranty, }, { "quiet", 2, 2, NULL, NULL, ds_quiet }, { "quit", 1, 1, NULL, N_("Quit the shell.") }, { NULL } }; struct funtab * find_funtab(const char *name) { struct funtab *p; for (p = funtab; p->name; p++) if (strcmp(p->name, name) == 0) return p; return NULL; } int cmdprefix; char special_prefixes[2]; static void ds_prefix(int argc, char **argv) { if (argc == 1) printf(_("Command prefix is %c\n"), cmdprefix); else if (!(!argv[1][1] && argv[1][0] != '#' && ispunct(argv[1][0]))) script_error(_("Expected a single punctuation character")); else { cmdprefix = argv[1][0]; strcpy(special_prefixes, argv[1]); #ifdef WITH_READLINE rl_special_prefixes = special_prefixes; #endif } } static void ds_help(int argc, char **argv) { static size_t nlines; dico_stream_t str; struct funtab *ft; size_t i; if (nlines == 0) { nlines = DICO_ARRAY_SIZE(helptext) + 1; for (ft = funtab; ft->name; ft++) { if (ft->docstring) nlines++; } } str = create_pager_stream(nlines); for (i = 0; i < DICO_ARRAY_SIZE(helptext); i++) { stream_printf(str, "%-24s %s\n", gettext(helptext[i][0]), gettext(helptext[i][1])); } dico_stream_write(str, "\n", 1); for (ft = funtab; ft->name; ft++) { int len = 0; const char *args; if (ft->docstring == NULL) continue; if (cmdprefix) { stream_printf(str, "%c", cmdprefix); len++; } stream_printf(str, "%s ", ft->name); len += strlen(ft->name) + 1; if (ft->argdoc) args = gettext(ft->argdoc); else args = ""; if (len < 24) len = 24 - len; else len = 0; stream_printf(str, "%-*s %s\n", len, args, gettext(ft->docstring)); } dico_stream_close(str); dico_stream_destroy(&str); } static void ds_quiet(int argc, char **argv) { set_bool(&quiet_option, argv[1]); } typedef int (*script_getln_fn)(void *data, char **buf); int line = 0; const char *filename; void script_diag(int category, int errcode, const char *fmt, va_list ap) { const char *pfx; char *newfmt; if (category == L_WARN) pfx = _("warning: "); else pfx = NULL; if (!filename) asprintf(&newfmt, "%s%s", pfx ? pfx : "", fmt); else { asprintf(&newfmt, "%s:%d: %s%s", filename, line, pfx ? pfx : "", fmt); } dico_vlog(category, errcode, newfmt, ap); free (newfmt); } void script_warning(const char *fmt, ...) { va_list ap; va_start(ap, fmt); script_diag(L_WARN, 0, fmt, ap); va_end(ap); } void script_error(const char *fmt, ...) { va_list ap; va_start(ap, fmt); script_diag(L_ERR, 0, fmt, ap); va_end(ap); } static int is_command(char **ptr) { if (!cmdprefix) return 1; if ((*ptr)[0] == cmdprefix) { ++*ptr; return 1; } return 0; } void parse_script_file(const char *fname, script_getln_fn getln, void *data) { char *buf = NULL; struct dico_tokbuf tb; int argc; char **argv; filename = fname; line = 0; dico_tokenize_begin(&tb); while (getln(data, &buf)) { char *p, *start; char *xargv[3]; line++; start = skipws(buf); dico_trim_nl(start); if (*start == 0 || *start == '#') continue; xdico_tokenize_string(&tb, start); argc = tb.tb_tokc; argv = tb.tb_tokv; if (argc == 0) continue; p = argv[0]; #ifdef WITH_READLINE if (interactive) { if (retrieve_history(buf)) continue; add_history(buf); } #endif switch (p[0]) { case '/': xargv[0] = "match"; xargv[1] = skipws(start + 1); xargv[2] = NULL; ds_match(2, xargv); continue; case '?': ds_help(0, NULL); continue; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (argc == 1) { char *q; size_t num = strtoul(argv[0], &q, 10); if (*q == 0) { ds_define_nth(num); continue; } } } if (is_command(&p)) { struct funtab *ft = find_funtab(p); if (!ft) { script_error(_("unknown command")); continue; } if (ft->argmin == 0) { argc = 2; xargv[0] = argv[0]; xargv[1] = skipws(buf + strlen(xargv[0])); xargv[2] = NULL; argv = xargv; } else if (argc < ft->argmin) { script_error(_("not enough arguments")); continue; } else if (argc > ft->argmax) { script_error(_("too many arguments")); continue; } if (ft->fun) ft->fun(argc, argv); else { ds_silent_close(); break; } } else { xargv[0] = "define"; xargv[1] = start; xargv[2] = NULL; ds_define(2, xargv); } } dico_tokenize_end(&tb); } struct init_script { FILE *fp; char *buf; size_t size; }; int script_getline(void *data, char **buf) { struct init_script *p = data; int rc = getline(&p->buf, &p->size, p->fp); *buf = p->buf; return rc > 0; } void parse_init_script(const char *name) { struct init_script scr; scr.fp = fopen(name, "r"); if (!scr.fp) { if (errno != ENOENT) dico_log(L_ERR, errno, _("Cannot open init file %s"), name); return; } scr.buf = NULL; scr.size = 0; parse_script_file(name, script_getline, &scr); fclose(scr.fp); free(scr.buf); } void parse_init_scripts() { char *name = dico_full_file_name(get_homedir(), ".dico"); parse_init_script(name); free(name); parse_init_script(".dico"); } static void ds_prompt(int argc, char **argv) { xdico_assign_string(&prompt, argv[1]); } #ifdef WITH_READLINE static char * _command_generator(const char *text, int state) { static int i, len; const char *name; if (!state) { i = 0; len = strlen (text); if (cmdprefix) len--; } if (cmdprefix) text++; while ((name = funtab[i].name)) { i++; if (funtab[i-1].docstring && strncmp(name, text, len) == 0) { if (!cmdprefix) return strdup (name); else { char *p = xmalloc(strlen(name) + 2); *p = cmdprefix; strcpy(p+1, name); return p; } } } return NULL; } static char ** _command_completion(char *cmd, int start, int end) { char **ret; struct wordsplit ws; /* FIXME: Use tokenizer */ if (wordsplit_len (rl_line_buffer, end, &ws, WRDSF_DEFFLAGS)) return NULL; rl_completion_append_character = ' '; if (ws.ws_wordc == 0 || (ws.ws_wordc == 1 && strlen (ws.ws_wordv[0]) <= end - start)) { ret = rl_completion_matches (cmd, _command_generator); rl_attempted_completion_over = 1; } else { struct funtab *ft = find_funtab(ws.ws_wordv[0] + (cmdprefix ? 1 : 0)); if (ft) { if (ft->compl) ret = ft->compl(ws.ws_wordc, ws.ws_wordv, start == end); else if (ft->argmax == 1) { rl_attempted_completion_over = 1; ret = NULL; } else ret = NULL; } else { rl_attempted_completion_over = 1; ret = NULL; } } wordsplit_free(&ws); return ret; } #define HISTFILE_SUFFIX "_history" static char * get_history_file_name() { static char *filename = NULL; if (!filename) { char *hname; hname = xmalloc(1 + strlen (rl_readline_name) + sizeof HISTFILE_SUFFIX); strcpy(hname, "."); strcat(hname, rl_readline_name); strcat(hname, HISTFILE_SUFFIX); filename = dico_full_file_name(get_homedir(), hname); free(hname); } return filename; } static void ds_history(int argc, char **argv) { dico_stream_t str; HIST_ENTRY **hlist; int i; str = create_pager_stream(history_length); hlist = history_list(); for (i = 0; i < history_length; i++) stream_printf(str, "%4d) %s\n", i + 1, hlist[i]->line); dico_stream_close(str); dico_stream_destroy(&str); } static char *pre_input_line; static int pre_input (void) { rl_insert_text(pre_input_line); free(pre_input_line); rl_pre_input_hook = NULL; rl_redisplay(); return 0; } static int retrieve_history(char *str) { char *out; int rc; rc = history_expand(str, &out); switch (rc) { case -1: script_error("%s", out); free(out); return 1; case 0: break; case 1: pre_input_line = out; rl_pre_input_hook = pre_input; return 1; case 2: printf("%s\n", out); free(out); return 1; } return 0; } #endif char ** dict_completion_matches(int argc, char **argv, int ws, char *(*generator)(const char *, int)) { #ifdef WITH_READLINE rl_attempted_completion_over = 1; if (ensure_connection()) return NULL; return rl_completion_matches (ws ? "" : argv[argc-1], generator); #endif } static char ** no_compl (int argc DICO_ARG_UNUSED, char **argv DICO_ARG_UNUSED, int ws DICO_ARG_UNUSED) { #ifdef WITH_READLINE rl_attempted_completion_over = 1; #endif return NULL; } void shell_init(struct init_script *p) { interactive = isatty(fileno(stdin)); #ifdef WITH_READLINE if (interactive) { rl_readline_name = dico_program_name; rl_attempted_completion_function = (CPPFunction*) _command_completion; read_history (get_history_file_name()); } #endif p->fp = stdin; p->buf = NULL; p->size = 0; } void shell_finish(struct init_script *p) { #ifdef WITH_READLINE if (interactive) write_history (get_history_file_name()); #endif free(p->buf); } int shell_getline(void *data, char **buf) { if (interactive) { #ifdef WITH_READLINE char *p = readline(prompt); if (!p) return 0; *buf = p; return 1; #else fprintf(stdout, "%s", prompt); fflush(stdout); #endif } return script_getline(data, buf); } void shell_banner() { print_version(PACKAGE_STRING, stdout); printf("%s\n\n", _("Type ? for help summary")); } void dico_shell() { struct init_script dat; shell_init(&dat); if (interactive) { xdico_assign_string(&prompt, DICO_PROMPT); if (!quiet_option) shell_banner(); } if (!cmdprefix) cmdprefix = '.'; parse_script_file(NULL, shell_getline, &dat); shell_finish(&dat); } dico-2.2/dicod/000077500000000000000000000000001172612674100133645ustar00rootroot00000000000000dico-2.2/dicod/Makefile.am000066400000000000000000000034321172612674100154220ustar00rootroot00000000000000# This file is part of GNU Dico # Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . SUBDIRS=. tests bin_PROGRAMS=dicod dicod_SOURCES=\ accesslog.c\ acl.c\ alias.c\ auth.c\ capa.c\ ckpass.c\ cmdline.c\ commands.c\ dbtext.c\ dicod.c\ gsasl.c\ ident.c\ lang.c\ lev.c\ lint.c\ loader.c\ main.c\ markup.c\ mime.c\ ostream.c\ regex.c\ server.c\ stat.c\ stratcl.c\ xidle.c\ xversion.c noinst_HEADERS=dicod.h incdir=$(pkgdatadir)/$(VERSION)/include AM_CFLAGS = \ -DSYSCONFIG=\"$(sysconfdir)\"\ -DLOCALSTATEDIR=\"$(localstatedir)\"\ -DDICO_MODDIR=\"$(DICO_MODDIR)\"\ -DDEFAULT_VERSION_INCLUDE_DIR=\"$(incdir)\"\ -DDEFAULT_INCLUDE_DIR=\"$(pkgdatadir)/include\"\ -DDEFAULT_PREPROCESSOR="$(DEFAULT_PREPROCESSOR)" AM_YFLAGS = -dtv AM_LFLAGS = -dvp LDADD=\ ../lib/libxdico.a\ ../gnu/libgnu.a\ ../lib/libextra.a\ ../lib/libdico.la\ @LIBINTL@ @LIBICONV@\ @LIBDICOSASL@\ @GSASL_LIBS@\ @LIBLTDL@ INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/gnu -I../gnu @GRECS_INCLUDES@ @LTDLINCL@ # dicod_DEPENDENCIES=@LTDLDEPS@ SUFFIXES=.opt .c .opt.c: $(AM_V_GEN)m4 -s $(top_srcdir)/@GRECS_SUBDIR@/build-aux/getopt.m4 $< > $@ BUILT_SOURCES=cmdline.c EXTRA_DIST=cmdline.opt dico-2.2/dicod/Makefile.in000066400000000000000000001531041172612674100154350ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of GNU Dico # Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dicod$(EXEEXT) subdir = dicod DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dicod_OBJECTS = accesslog.$(OBJEXT) acl.$(OBJEXT) alias.$(OBJEXT) \ auth.$(OBJEXT) capa.$(OBJEXT) ckpass.$(OBJEXT) \ cmdline.$(OBJEXT) commands.$(OBJEXT) dbtext.$(OBJEXT) \ dicod.$(OBJEXT) gsasl.$(OBJEXT) ident.$(OBJEXT) lang.$(OBJEXT) \ lev.$(OBJEXT) lint.$(OBJEXT) loader.$(OBJEXT) main.$(OBJEXT) \ markup.$(OBJEXT) mime.$(OBJEXT) ostream.$(OBJEXT) \ regex.$(OBJEXT) server.$(OBJEXT) stat.$(OBJEXT) \ stratcl.$(OBJEXT) xidle.$(OBJEXT) xversion.$(OBJEXT) dicod_OBJECTS = $(am_dicod_OBJECTS) dicod_LDADD = $(LDADD) dicod_DEPENDENCIES = ../lib/libxdico.a ../gnu/libgnu.a \ ../lib/libextra.a ../lib/libdico.la AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(dicod_SOURCES) DIST_SOURCES = $(dicod_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = . tests dicod_SOURCES = \ accesslog.c\ acl.c\ alias.c\ auth.c\ capa.c\ ckpass.c\ cmdline.c\ commands.c\ dbtext.c\ dicod.c\ gsasl.c\ ident.c\ lang.c\ lev.c\ lint.c\ loader.c\ main.c\ markup.c\ mime.c\ ostream.c\ regex.c\ server.c\ stat.c\ stratcl.c\ xidle.c\ xversion.c noinst_HEADERS = dicod.h incdir = $(pkgdatadir)/$(VERSION)/include AM_CFLAGS = \ -DSYSCONFIG=\"$(sysconfdir)\"\ -DLOCALSTATEDIR=\"$(localstatedir)\"\ -DDICO_MODDIR=\"$(DICO_MODDIR)\"\ -DDEFAULT_VERSION_INCLUDE_DIR=\"$(incdir)\"\ -DDEFAULT_INCLUDE_DIR=\"$(pkgdatadir)/include\"\ -DDEFAULT_PREPROCESSOR="$(DEFAULT_PREPROCESSOR)" AM_YFLAGS = -dtv AM_LFLAGS = -dvp LDADD = \ ../lib/libxdico.a\ ../gnu/libgnu.a\ ../lib/libextra.a\ ../lib/libdico.la\ @LIBINTL@ @LIBICONV@\ @LIBDICOSASL@\ @GSASL_LIBS@\ @LIBLTDL@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/gnu -I../gnu @GRECS_INCLUDES@ @LTDLINCL@ # dicod_DEPENDENCIES=@LTDLDEPS@ SUFFIXES = .opt .c BUILT_SOURCES = cmdline.c EXTRA_DIST = cmdline.opt all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .opt .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits dicod/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits dicod/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad dicod$(EXEEXT): $(dicod_OBJECTS) $(dicod_DEPENDENCIES) @rm -f dicod$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dicod_OBJECTS) $(dicod_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accesslog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alias.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capa.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckpass.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commands.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbtext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dicod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsasl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ident.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/markup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ostream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stratcl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xidle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xversion.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installcheck-binPROGRAMS installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-binPROGRAMS .opt.c: $(AM_V_GEN)m4 -s $(top_srcdir)/@GRECS_SUBDIR@/build-aux/getopt.m4 $< > $@ # 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: dico-2.2/dicod/accesslog.c000066400000000000000000000340401172612674100154740ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include static char status[2][4]; void access_log_status(const char *first, const char *last) { memcpy(status[0], first, 3); status[0][3] = 0; if (last[0] == '.') last += 2; memcpy(status[1], last, 3); status[1][3] = 0; } /* access-log-format "%h %l %u %t \"%r\" %>s %b" %% The percent sign %a Remote IP-address %A Local IP-address %B Size of response in bytes. %b Size of response in bytes in CLF format, i.e. a '-' rather than a 0 when no bytes are sent. %C *Remote client (from CLIENT command). %d *Abbreviated request command verb ('d' or 'm'). %D The time taken to serve the request, in microseconds. %h Remote host %H *Request command verb (DEFINE or MATCH) %l Remote logname (from identd, if supplied). This will return a dash unless identity-check is set to true. %m *The search strategy %p The canonical port of the server serving the request %P The process ID of the child that serviced the request. %q *The database from the request. %r Full request %{N}R *Nth token from the request. N is 0-based. %s Status. %>s is also accepted. %t Time the request was received (standard english format) %{format}t The time, in the form given by format, which should be in strftime(3) format. (potentially localized) %T The time taken to serve the request, in seconds. %u Remote user from AUTH. %v The host name of the server serving the request. %V *Actual host name of the server (in case it was overridden in conffile). %I Bytes received, including request and headers. Cannot be zero. %O Bytes sent, including headers. Cannot be zero. %W *The word from the request */ char *access_log_format = "%h %l %u %t \"%r\" %>s %b"; char *access_log_file; struct alog_instr; typedef void (*alog_printer_fn) (FILE *fp, struct alog_instr *instr, int argc, char **argv); struct alog_instr { alog_printer_fn prt; char *arg; char *cache; }; dico_list_t access_log_prog; struct alog_tab { int ch; alog_printer_fn prt; int allow_fmt; }; static void add_instr(alog_printer_fn prt, const char *fmt, size_t fmtsize) { struct alog_instr *p; if (fmt == NULL) fmtsize = 0; p = xzalloc(sizeof(*p) + (fmtsize ? (fmtsize + 1) : 0)); p->prt = prt; if (fmtsize) { p->arg = (char*) (p + 1); memcpy(p->arg, fmt, fmtsize); p->arg[fmtsize] = 0; } else p->arg = NULL; xdico_list_append(access_log_prog, p); } static void print_str(FILE *fp, const char *arg) { size_t len; if (!arg) { arg = "-"; len = 1; } else len = strlen(arg); fwrite(arg, len, 1, fp); } static void alog_print(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, instr->arg); } #define _S_UN_NAME(sa, salen) \ ((salen < offsetof (struct sockaddr_un,sun_path)) ? "" : (sa)->sun_path) static char * sockaddr_to_hostname(struct sockaddr *sa, int resolve) { struct sockaddr_in *s_in; char *ret; switch (sa->sa_family) { case AF_INET: s_in = (struct sockaddr_in*)sa; if (resolve) { struct hostent *hp; hp = gethostbyaddr((char*) &s_in->sin_addr, sizeof(s_in->sin_addr), AF_INET); if (hp) return xstrdup(hp->h_name); } ret = xstrdup(inet_ntoa(s_in->sin_addr)); break; case AF_UNIX: ret = xstrdup("localhost"); break; default: ret = xstrdup("{unsupported family}"); } return ret; } static char * sockaddr_to_portname(struct sockaddr *sa, int salen) { struct sockaddr_in *s_in; struct sockaddr_un *s_un; char buf[UINTMAX_STRSIZE_BOUND]; char *ret; switch (sa->sa_family) { case AF_UNIX: s_un = (struct sockaddr_un*)sa; if (_S_UN_NAME(s_un, salen)[0] == 0) ret = xstrdup("{AF_UNIX}"); else ret = xstrdup(s_un->sun_path); break; case AF_INET: s_in = (struct sockaddr_in*)sa; ret = xstrdup(umaxtostr(ntohs(s_in->sin_port), buf)); break; default: ret = xstrdup("{unsupported family}"); } return ret; } static void alog_remote_ip(FILE *fp, struct alog_instr *instr, int argc, char **argv) { if (!instr->cache) { if (client_addrlen == 0) instr->cache = xstrdup("stdin"); else instr->cache = sockaddr_to_hostname(&client_addr, 0); } print_str(fp, instr->cache); } static void alog_local_ip(FILE *fp, struct alog_instr *instr, int argc, char **argv) { if (!instr->cache) { if (server_addrlen == 0) instr->cache = xstrdup("stdin"); else instr->cache = sockaddr_to_hostname(&server_addr, 0); } print_str(fp, instr->cache); } static void alog_response_size(FILE *fp, struct alog_instr *instr, int argc, char **argv) { char buf[UINTMAX_STRSIZE_BOUND]; print_str(fp, umaxtostr(total_bytes_out, buf)); } static void alog_response_size_clf(FILE *fp, struct alog_instr *instr, int argc, char **argv) { char buf[UINTMAX_STRSIZE_BOUND]; if (total_bytes_out) print_str(fp, umaxtostr(total_bytes_out, buf)); else print_str(fp, "-"); } static void alog_client(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, client_id); } static void alog_time_ms(FILE *fp, struct alog_instr *instr, int argc, char **argv) { char buf[UINTMAX_STRSIZE_BOUND]; xdico_timer_t t = timer_get(argv[0]); double s = timer_get_real(t); print_str(fp, umaxtostr((uintmax_t)(s * 1e6), buf)); } static void alog_remote_host(FILE *fp, struct alog_instr *instr, int argc, char **argv) { if (!instr->cache) { if (client_addrlen == 0) instr->cache = xstrdup("stdin"); else instr->cache = sockaddr_to_hostname(&client_addr, 1); } print_str(fp, instr->cache); } static void alog_command_verb(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, argv[0]); } static void alog_command_verb_abbr(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, strcasecmp(argv[0], "DEFINE") == 0 ? "d" : strcasecmp(argv[0], "MATCH") == 0 ? "m" : "?"); } static void alog_logname(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, identity_name); } static void alog_strategy(FILE *fp, struct alog_instr *instr, int argc, char **argv) { if (argc == 4) /* A match request */ print_str(fp, argv[2]); else print_str(fp, "-"); } static void alog_server_port(FILE *fp, struct alog_instr *instr, int argc, char **argv) { if (server_addrlen == 0) print_str(fp, "-"); else if (!instr->cache) instr->cache = sockaddr_to_portname(&server_addr, server_addrlen); print_str(fp, instr->cache); } static void alog_pid(FILE *fp, struct alog_instr *instr, int argc, char **argv) { fprintf(fp, "%lu", (unsigned long) getpid()); } static void alog_database(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, argv[1]); } static void alog_request(FILE *fp, struct alog_instr *instr, int argc, char **argv) { char *str; if (dico_argcv_string(argc, (const char**)argv, &str)) print_str(fp, "-"); else { print_str(fp, str); free(str); } } static void alog_token(FILE *fp, struct alog_instr *instr, int argc, char **argv) { unsigned n = instr->arg ? atoi(instr->arg) : 0; if (n > argc) n = 0; print_str(fp, argv[n]); } static void alog_status(FILE *fp, struct alog_instr *instr, int argc, char **argv) { unsigned n = instr->arg ? atoi(instr->arg) : 0; if (n > argc) n = 0; print_str(fp, status[n]); } static void alog_time(FILE *fp, struct alog_instr *instr, int argc, char **argv) { struct tm tm; time_t t = time(NULL); localtime_r(&t, &tm); fprintftime(fp, instr->arg ? instr->arg : "[%d/%b/%Y:%H:%M:%S %z]", &tm, 0, 0); } static void alog_process_time(FILE *fp, struct alog_instr *instr, int argc, char **argv) { char buf[UINTMAX_STRSIZE_BOUND]; xdico_timer_t t = timer_get(argv[0]); print_str(fp, umaxtostr((uintmax_t)timer_get_real(t), buf)); } static void alog_remote_user(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, user_name); } static void alog_conf_hostname(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, hostname); } static void alog_hostname(FILE *fp, struct alog_instr *instr, int argc, char **argv) { if (!instr->cache) { if (server_addrlen == 0) instr->cache = xstrdup("stdin"); else instr->cache = sockaddr_to_hostname(&server_addr, 0); } print_str(fp, instr->cache); } static void alog_word(FILE *fp, struct alog_instr *instr, int argc, char **argv) { print_str(fp, argv[argc-1]); } static struct alog_tab alog_tab[] = { /* The percent sign */ { '%', alog_print, 0 }, /* Remote IP-address */ { 'a', alog_remote_ip }, /* Local IP-address */ { 'A', alog_local_ip }, /* Size of response in bytes. */ { 'B', alog_response_size }, /* Size of response in bytes in CLF format, i.e. a '-' rather than a 0 when no bytes are sent. */ { 'b', alog_response_size_clf }, /* * Remote client (from CLIENT command). */ { 'C', alog_client }, /* * Abbreviated request command verb ('d' or 'm'). */ { 'd', alog_command_verb_abbr }, /* The time taken to serve the request, in microseconds. */ { 'D', alog_time_ms }, /* Remote host */ { 'h', alog_remote_host }, /* * Request command verb (DEFINE or MATCH) */ { 'H', alog_command_verb }, /* Remote logname (from identd, if supplied). This will return a dash unless identity-check is set to true. */ { 'l', alog_logname }, /* * The search strategy */ { 'm', alog_strategy }, /* The canonical port of the server serving the request */ { 'p', alog_server_port }, /* The process ID of the child that serviced the request. */ { 'P', alog_pid }, /* * The database from the request. */ { 'q', alog_database }, /* Full request */ { 'r', alog_request }, /* * Nth token from the request. N is 0-based. */ { 'R', alog_token, 1 }, /* Status. %>s is also accepted. */ { 's', alog_status, 1 }, /* %t Time the request was received (standard english format) %{format}t The time, in the form given by format, which should be in strftime(3) format. (potentially localized) */ { 't', alog_time, 1 }, /* The time taken to serve the request, in seconds. */ { 'T', alog_process_time }, /* Remote user from AUTH. */ { 'u', alog_remote_user }, /* The configured host name of the server serving the request. */ { 'v', alog_conf_hostname }, /* The host name of the server serving the request. */ { 'V', alog_hostname }, #if 0 /* FIXME: */ { 'I', alog_inbytes }, { 'O', alog_outbytes }, #endif /* *The word from the request */ { 'W', alog_word }, { 0 } }; static struct alog_tab * find_alog_entry(int c) { struct alog_tab *p; for (p = alog_tab; p->ch; p++) if (p->ch == c) return p; return NULL; } void compile_access_log() { char *p; const char *fmt = access_log_format; size_t len; access_log_prog = xdico_list_create(); while ((p = strchr(fmt, '%'))) { char *arg = NULL; size_t arglen; struct alog_tab *tptr; len = p - fmt; if (len) add_instr(alog_print, fmt, len); p++; if (*p == '>' && p[1] == 's') { arg = "1"; arglen = 1; p++; } else if (*p == '{') { char *q = strchr(p + 1, '}'); if (!q) { dico_log(L_ERR, 0, _("log format error (near char %d): " "missing terminating `}'"), p - access_log_format); add_instr(alog_print, p - 1, 2); fmt = p + 1; continue; } arglen = q - p - 1; arg = p + 1; p = q + 1; } tptr = find_alog_entry(*p); if (!tptr) { dico_log(L_ERR, 0, _("log format error (near char %d): " "unknown format char `%c'"), p - access_log_format, *p); add_instr(alog_print, fmt, p - fmt + 1); } else { if (arg && !tptr->allow_fmt) { dico_log(L_ERR, 0, _("log format warning (near char %d): " "format char `%c' does not " "take arguments"), p - access_log_format, *p); arg = NULL; } if (tptr->ch == '%') { /* Special case */ arg = "%"; arglen = 1; } add_instr(tptr->prt, arg, arglen); } fmt = p + 1; } len = strlen(fmt); if (len) add_instr(alog_print, fmt, len); } void format_access_log(FILE *fp, int argc, char **argv) { dico_iterator_t itr = xdico_list_iterator(access_log_prog); struct alog_instr *p; for (p = dico_iterator_first(itr); p; p = dico_iterator_next(itr)) p->prt(fp, p, argc, argv); fputc('\n', fp); dico_iterator_destroy(&itr); } void access_log(int argc, char **argv) { FILE *fp; if (!access_log_file) return; fp = fopen(access_log_file, "a"); if (!fp) { dico_log(L_ERR, errno, _("cannot open access log file `%s'"), access_log_file); return; } format_access_log(fp, argc, argv); fclose(fp); } static int free_cache(void *item, void *data) { struct alog_instr *p = item; if (p->cache) { free(p->cache); p->cache = NULL; } return 0; } void access_log_free_cache() { dico_list_iterate(access_log_prog, free_cache, NULL); } dico-2.2/dicod/acl.c000066400000000000000000000271561172612674100143020ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008-2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include #include #include #include #include #include #include struct dicod_sockaddr { unsigned netmask; int salen; struct sockaddr sa; }; struct acl_entry { grecs_locus_t locus; int allow; int authenticated; int dflt; dicod_acl_t acl; dico_list_t groups; dico_list_t sockaddrs; }; struct dicod_acl { char *name; grecs_locus_t locus; dico_list_t list; }; dico_list_t dicod_string_list_from_grecs(struct grecs_list *inlist) { struct grecs_list_entry *ep; dico_list_t list = xdico_list_create(); dico_list_set_free_item(list, dicod_free_item, NULL); for (ep = inlist->head; ep; ep = ep->next) { grecs_value_t *vp = ep->data; if (vp->type != GRECS_TYPE_STRING) { grecs_error(&vp->locus, 0, _("expected string")); break; } xdico_list_append(list, xstrdup(vp->v.string)); } return list; } /* ACL creation */ dicod_acl_t dicod_acl_create(const char *name, grecs_locus_t *locus) { dicod_acl_t acl = xmalloc(sizeof(acl[0])); acl->name = xstrdup(name); acl->locus = *locus; acl->locus.beg.file = strdup(acl->locus.beg.file); acl->locus.end.file = strdup(acl->locus.end.file); acl->list = dico_list_create(); return acl; } static struct dicod_sockaddr * create_acl_sockaddr(int family, int len) { struct dicod_sockaddr *p = xzalloc(sizeof(*p)); p->salen = len; p->sa.sa_family = family; return p; } /* allow|deny [all|authenticated|group ] [acl ] [from ] */ static int _parse_token (struct acl_entry *entry, grecs_value_t *value) { if (strcmp(value->v.string, "all") == 0 || strcmp(value->v.string, "any") == 0) /* FIXME: Nothing? */; else if (strcmp(value->v.string, "auth") == 0 || strcmp(value->v.string, "authenticated") == 0) entry->authenticated = 1; else return 1; return 0; } static int _parse_sockaddr(struct acl_entry *entry, grecs_value_t *value) { struct dicod_sockaddr *sptr; const char *string; if (value->type != GRECS_TYPE_STRING) { grecs_error(&entry->locus, 0, _("expected string but found list")); return 1; } string = value->v.string; if (string[0] == '/') { size_t len; struct sockaddr_un *s_un; len = strlen (string); if (len >= sizeof(s_un->sun_path)) { grecs_error(&entry->locus, 0, _("socket name too long: `%s'"), string); return 1; } sptr = create_acl_sockaddr(AF_UNIX, sizeof(s_un)); s_un = (struct sockaddr_un *) &sptr->sa; memcpy(s_un->sun_path, string, len); s_un->sun_path[len] = 0; } else { struct in_addr addr; struct sockaddr_in *s_in; char *p = strchr(string, '/'); if (p) *p = 0; if (inet_aton(string, &addr) == 0) { struct hostent *hp = gethostbyname(string); if (!hp) { grecs_error(&entry->locus, 0, _("cannot resolve host name: `%s'"), string); if (p) *p = '/'; return 1; } memcpy(&addr.s_addr, hp->h_addr, sizeof(addr.s_addr)); } addr.s_addr = ntohl(addr.s_addr); sptr = create_acl_sockaddr(AF_INET, sizeof(s_in)); s_in = (struct sockaddr_in *) &sptr->sa; s_in->sin_addr = addr; if (p) { *p++ = '/'; char *q; unsigned netlen; netlen = strtoul(p, &q, 10); if (*q == 0) { if (netlen == 0) sptr->netmask = 0; else { sptr->netmask = 0xfffffffful >> (32 - netlen); sptr->netmask <<= (32 - netlen); } } else if (*q == '.') { struct in_addr addr; if (inet_aton(p, &addr) == 0) { grecs_error(&entry->locus, 0, _("invalid netmask: `%s'"), p); return 1; } sptr->netmask = addr.s_addr; } else { grecs_error(&entry->locus, 0, _("invalid netmask: `%s'"), p); return 1; } } else sptr->netmask = 0xfffffffful; } xdico_list_append(entry->sockaddrs, sptr); return 0; } static int _parse_from(struct acl_entry *entry, size_t argc, grecs_value_t **argv) { if (argc == 0) return 0; else if (argv[0]->type == GRECS_TYPE_LIST) { grecs_error(&argv[0]->locus, 0, _("expected `from', but found list")); return 1; } else if (strcmp (argv[0]->v.string, "from")) { grecs_error(&argv[0]->locus, 0, _("expected `from', but found `%s'"), argv[0]->v.string); return 1; } argc--; argv++; if (argc == 0) { grecs_error(&entry->locus, 0, _("unexpected end of statement after `from'")); return 1; } if (argv[0]->type == GRECS_TYPE_STRING && strcmp(argv[0]->v.string, "any") == 0) { entry->dflt = 1; } else { entry->sockaddrs = xdico_list_create(); if (argv[0]->type == GRECS_TYPE_STRING) { if (_parse_sockaddr(entry, argv[0])) return 1; } else { int rc = 0; struct grecs_list_entry *ep; for (ep = argv[0]->v.list->head; ep; ep = ep->next) { grecs_value_t *p = ep->data; rc += _parse_sockaddr(entry, p); } if (rc) return rc; } } if (argc - 1) { grecs_warning(&entry->locus, 0, _("junk after `from' list")); return 1; } return 0; } static int _parse_sub_acl(struct acl_entry *entry, size_t argc, grecs_value_t **argv) { if (argc == 0) return 0; if (strcmp (argv[0]->v.string, "acl") == 0) { argc--; argv++; if (argc == 0) { grecs_error(&entry->locus, 0, _("expected ACL name, but found end of statement")); return 1; } if (argv[0]->type != GRECS_TYPE_STRING) { grecs_error(&argv[0]->locus, 0, _("expected string, but found list")); return 1; } entry->acl = dicod_acl_lookup(argv[0]->v.string); if (!entry->acl) { grecs_error(&entry->locus, 0, _("ACL not defined: `%s'"), argv[0]->v.string); return 1; } argc--; argv++; } return _parse_from(entry, argc, argv); } static int _parse_group(struct acl_entry *entry, size_t argc, grecs_value_t **argv) { if (strcmp (argv[0]->v.string, "group") == 0) { argc--; argv++; if (argc == 0) { grecs_error(&entry->locus, 0, _("expected group list, but found end of statement")); return 1; } switch (argv[0]->type) { case GRECS_TYPE_STRING: entry->groups = xdico_list_create(); xdico_list_append(entry->groups, xstrdup(argv[0]->v.string)); break; case GRECS_TYPE_LIST: entry->groups = dicod_string_list_from_grecs(argv[0]->v.list); break; default: grecs_error(&argv[0]->locus, 0, _("expected group list, but found array")); return 1; } argc--; argv++; } return _parse_sub_acl(entry, argc, argv); } static int _parse_acl(struct acl_entry *entry, size_t argc, grecs_value_t **argv) { if (argv[0]->type != GRECS_TYPE_STRING) { grecs_error(&argv[0]->locus, 0, _("expected string value")); return 1; } else if (_parse_token(entry, argv[0]) == 0) return _parse_sub_acl(entry, argc - 1, argv + 1); else return _parse_group (entry, argc, argv); } int parse_acl_line(grecs_locus_t *locus, int allow, dicod_acl_t acl, grecs_value_t *value) { struct acl_entry *entry = xzalloc(sizeof(*entry)); entry->locus = *locus; entry->locus.beg.file = strdup(entry->locus.beg.file); entry->locus.end.file = strdup(entry->locus.end.file); entry->allow = allow; switch (value->type) { case GRECS_TYPE_STRING: if (_parse_token (entry, value)) { grecs_error(&entry->locus, 0, _("unknown word `%s'"), value->v.string); return 1; } break; case GRECS_TYPE_ARRAY: if (_parse_acl(entry, value->v.arg.c, value->v.arg.v)) return 1; break; case GRECS_TYPE_LIST: grecs_error(locus, 0, _("unexpected list")); return 1; } xdico_list_append(acl->list, entry); return 0; } /* ACL verification */ static int cmp_group_name(const void *item, void *data) { return strcmp((char*)item, (char*)data); } #define S_UN_NAME(sa, salen) \ ((salen < offsetof (struct sockaddr_un,sun_path)) ? "" : (sa)->sun_path) static int _check_sockaddr(void *item, void *data) { struct dicod_sockaddr *sptr = item; int *pres = data; if (sptr->sa.sa_family != client_addr.sa_family) return 0; switch (sptr->sa.sa_family) { case AF_INET: { struct sockaddr_in *sin_clt = (struct sockaddr_in *)&client_addr; struct sockaddr_in *sin_item = (struct sockaddr_in *)&sptr->sa; if (sin_item->sin_addr.s_addr == (ntohl (sin_clt->sin_addr.s_addr) & sptr->netmask)) { *pres = 1; return 1; } break; } case AF_UNIX: { struct sockaddr_un *sun_clt = (struct sockaddr_un *)&client_addr; struct sockaddr_un *sun_item = (struct sockaddr_un *)&sptr->sa; if (S_UN_NAME (sun_clt, client_addrlen)[0] && S_UN_NAME (sun_item, sptr->salen)[0] && strcmp (sun_clt->sun_path, sun_item->sun_path) == 0) { *pres = 1; return 1; } } } return 0; } static int _acl_check(struct acl_entry *ent) { int result = 1; if (ent->authenticated) { result = user_name != NULL; if (!result) return 0; } if (ent->groups) { result = dico_list_intersect_p(ent->groups, user_groups, cmp_group_name); if (!result) return 0; } result = dicod_acl_check(ent->acl, 1); if (!result) return 0; if (ent->dflt) result = 1; else if (ent->sockaddrs) { result = 0; dico_list_iterate(ent->sockaddrs, _check_sockaddr, &result); } return result; } static int _acl_check_cb(void *item, void *data) { struct acl_entry *ent = item; int *pres = data; int result = _acl_check(ent); if (debug_level > 10) { dico_log(L_DEBUG, 0, "%s:%d: %s", /* FIXME: beg:end */ ent->locus.beg.file, ent->locus.beg.line, /* TRANSLATIONS: `MATCHES' is the verb `match' in 2nd person. E.g., in French: CONCORD AVEC */ result ? _("MATCHES") : _("does not match")); } if (result) { *pres = ent->allow; return 1; } return 0; } int dicod_acl_check(dicod_acl_t acl, int result) { if (acl) dico_list_iterate(acl->list, _acl_check_cb, &result); return result; } /* Hash table */ static Hash_table *acl_table; /* Calculate the hash of a string. */ static size_t acl_hasher(void const *data, unsigned n_buckets) { const struct dicod_acl *p = data; return hash_string(p->name, n_buckets); } /* Compare two strings for equality. */ static bool acl_compare(void const *data1, void const *data2) { const struct dicod_acl *p1 = data1; const struct dicod_acl *p2 = data2; return strcasecmp(p1->name, p2->name) == 0; } int dicod_acl_install(dicod_acl_t acl, grecs_locus_t *locus) { dicod_acl_t ret; if (! ((acl_table || (acl_table = hash_initialize(0, 0, acl_hasher, acl_compare, 0))) && (ret = hash_insert(acl_table, acl)))) xalloc_die(); if (ret != acl) { if (locus) *locus = ret->locus; return 1; } return 0; } dicod_acl_t dicod_acl_lookup(const char *name) { struct dicod_acl samp; if (!acl_table) return NULL; samp.name = (char*) name; return hash_lookup(acl_table, &samp); } dico-2.2/dicod/alias.c000066400000000000000000000064331172612674100146270ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include struct alias { char *kw; /* Keyword */ int argc; char **argv; grecs_locus_t locus; }; static Hash_table *alias_table; /* Calculate the hash of a struct input_file_ident. */ static size_t alias_hasher(void const *data, unsigned n_buckets) { const struct alias *ap = data; return hash_string(ap->kw, n_buckets); } /* Compare two input_file_idents for equality. */ static bool alias_compare(void const *data1, void const *data2) { const struct alias *ap1 = data1; const struct alias *ap2 = data2; return strcmp(ap1->kw, ap2->kw) == 0; } int alias_install(const char *kw, int argc, char **argv, grecs_locus_t *ploc) { struct alias *sample = xmalloc(sizeof(*sample)), *ap; sample->kw = xstrdup(kw); sample->argc = argc; sample->argv = argv; sample->locus = *ploc; if (! ((alias_table || (alias_table = hash_initialize(0, 0, alias_hasher, alias_compare, NULL))) && (ap = hash_insert(alias_table, sample)))) xalloc_die(); if (ap != sample) { free(sample->kw); free(sample); grecs_error(ploc, 0, _("alias `%s' already defined"), kw); grecs_error(&ap->locus, 0, _("this is the location of the previous definition")); return 1; /* Found */ } return 0; } static int list_alias_cmp(const void *a, void *b) { const struct alias *ap1 = a; const struct alias *ap2 = b; return strcmp(ap1->kw, ap2->kw); } int alias_expand(int argc, char **argv, int *pargc, char ***pargv) { struct alias sample, *ap; dico_list_t alist = NULL; if (!alias_table) return 1; for (sample.kw = argv[0]; (ap = hash_lookup(alias_table, &sample));) { if (alist && dico_list_locate(alist, ap)) break; sample.kw = (char*) ap->argv[0]; if (!alist) { alist = xdico_list_create(); dico_list_set_comparator (alist, list_alias_cmp); } xdico_list_append(alist, ap); } if (alist) { int pos; int nargc; char **nargv; dico_iterator_t itr = xdico_list_iterator(alist); char *kw; nargc = 1; for (ap = dico_iterator_first(itr); ap; ap = dico_iterator_next(itr)) nargc += ap->argc - 1; pos = nargc; nargc += argc - 1; nargv = xcalloc(nargc + 1, sizeof(nargv[0])); memcpy(nargv + pos, argv + 1, argc * sizeof(argv[0])); pos--; for (ap = dico_iterator_first(itr); ap; ap = dico_iterator_next(itr)) { int i; for (i = ap->argc-1; i > 0; i--) nargv[pos--] = ap->argv[i]; kw = ap->argv[0]; } nargv[pos] = kw; *pargc = nargc; *pargv = nargv; dico_list_destroy(&alist); return 0; } return 1; } dico-2.2/dicod/auth.c000066400000000000000000000057511172612674100145010ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include static int verify_apop(const char *password, const char *user_digest) { int i; struct md5_ctx md5context; unsigned char md5digest[16]; char buf[sizeof(md5digest) * 2 + 1]; char *p; md5_init_ctx(&md5context); md5_process_bytes(msg_id, strlen(msg_id), &md5context); md5_process_bytes(password, strlen(password), &md5context); md5_finish_ctx(&md5context, md5digest); for (i = 0, p = buf; i < 16; i++, p += 2) sprintf(p, "%02x", md5digest[i]); return strcmp(user_digest, buf); } static int auth(const char *username, const char *authstr) { int rc = 1; char *password; if (dico_udb_open(user_db)) { dico_log(L_ERR, 0, _("failed to open user database")); return 1; } if (dico_udb_get_password(user_db, username, &password)) { dico_log(L_ERR, 0, _("failed to get password for `%s' from the database"), username); } else { if (!password) { dico_log(L_ERR, 0, _("no such user `%s'"), username); rc = 1; } else { rc = verify_apop(password, authstr); if (rc) dico_log(L_ERR, 0, _("authentication failed for `%s'"), username); else { user_name = xstrdup(username); dico_udb_get_groups(user_db, username, &user_groups); } free(password); } } dico_udb_close(user_db); return rc; } void dicod_auth(dico_stream_t str, int argc, char **argv) { if (auth(argv[1], argv[2]) == 0) { stream_writez(str, "230 Authentication successful"); check_db_visibility(); } else stream_writez(str, "531 Access denied, " "use \"SHOW INFO\" for server information"); dico_stream_write(str, "\n", 1); } static int auth_init(void *ptr) { if (user_db == NULL) { dico_log(L_ERR, 0, "auth capability required but user database is " "not configured"); return 1; } return 0; } void register_auth() { static struct dicod_command cmd[] = { { "AUTH", 3, 3, "user string", "provide authentication information", dicod_auth }, { NULL } }; dicod_capa_register("auth", cmd, auth_init, NULL); } void init_auth_data() { free(user_name); user_name = NULL; free(client_id); client_id = NULL; free(identity_name); identity_name = NULL; dico_list_destroy(&user_groups); reset_db_visibility(); } dico-2.2/dicod/capa.c000066400000000000000000000050701172612674100144360ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include struct dicod_capa { const char *name; struct dicod_command *cmd; int (*init)(void *); void *closure; int enabled; }; /* List of supported capabilities: */ static dico_list_t /* of struct dicod_capa */ capa_list; static int _cmp_capa_name(const void *item, void *data) { const struct dicod_capa *cp = item; return strcmp(cp->name, (char*)data); } void dicod_capa_register(const char *name, struct dicod_command *cmd, int (*init)(void*), void *closure) { struct dicod_capa *cp = xmalloc(sizeof(*cp)); cp->name = name; cp->cmd = cmd; cp->init = init; cp->closure = closure; cp->enabled = 0; if (!capa_list) { capa_list = xdico_list_create(); dico_list_set_comparator(capa_list, _cmp_capa_name); } xdico_list_append(capa_list, cp); } int dicod_capa_add(const char *name) { struct dicod_capa *cp = dico_list_locate(capa_list, (void*)name); if (cp == NULL) return 1; cp->enabled = 1; return 0; } int dicod_capa_flush() { dico_iterator_t itr; struct dicod_capa *cp; itr = xdico_list_iterator(capa_list); for (cp = dico_iterator_first(itr); cp; cp = dico_iterator_next(itr)) { if (cp->enabled) { if (cp->init && cp->init(cp->closure)) return 1; if (cp->cmd) { struct dicod_command *cmd; for (cmd = cp->cmd; cmd->keyword; cmd++) dicod_add_command(cmd); } } } return 0; } struct iter_data { int (*fun)(const char*, int, void *); void *closure; }; static int _iter_helper(void *item, void *data) { struct dicod_capa *cp = item; struct iter_data *dp = data; return dp->fun(cp->name, cp->enabled, dp->closure); } void dicod_capa_iterate(int (*fun)(const char*, int, void *), void *closure) { struct iter_data dat; dat.fun = fun; dat.closure = closure; dico_list_iterate(capa_list, _iter_helper, &dat); } dico-2.2/dicod/ckpass.c000066400000000000000000000113261172612674100150170ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #if defined(HAVE_CRYPT_H) # include #endif #include "md5.h" #include "sha1.h" static int my_strncasecmp(const char *p, const char *q, size_t len) { for ( ;len; len--, p++, q++) { if (*p != toupper (*q)) return 1; } return 0; } typedef int (*pwcheck_fp)(const char *, const char *); static int chk_crypt(const char *db_pass, const char *pass) { return strcmp(db_pass, crypt(pass, db_pass)); } static int chk_md5(const char *db_pass, const char *pass) { unsigned char md5digest[16]; struct md5_ctx md5context; size_t size = 0; unsigned char *buf = NULL; int rc; md5_init_ctx(&md5context); md5_process_bytes(pass, strlen(pass), &md5context); md5_finish_ctx(&md5context, md5digest); if (dico_base64_decode((unsigned char*)db_pass, strlen(db_pass), &buf, &size)) return -1; if (size != 16) { free(buf); return -1; } rc = memcmp(md5digest, buf, sizeof md5digest); free(buf); return rc; } static int chk_smd5(const char *db_pass, const char *pass) { int rc; unsigned char md5digest[16]; struct md5_ctx md5context; size_t size = 0; unsigned char *buf = NULL; if (dico_base64_decode((unsigned char*)db_pass, strlen(db_pass), &buf, &size)) return -1; if (size <= 16) { dico_log(L_ERR, 0, "malformed SMD5 password: %s", db_pass); free(buf); return -1; } md5_init_ctx(&md5context); md5_process_bytes(pass, strlen(pass), &md5context); md5_process_bytes(buf + 16, size - 16, &md5context); md5_finish_ctx(&md5context, md5digest); rc = memcmp(md5digest, buf, sizeof md5digest); free(buf); return rc; } static int chk_sha(const char *db_pass, const char *pass) { int rc; unsigned char sha1digest[20]; struct sha1_ctx sha1context; size_t size = 0; unsigned char *buf = NULL; sha1_init_ctx(&sha1context); sha1_process_bytes(pass, strlen(pass), &sha1context); sha1_finish_ctx(&sha1context, sha1digest); if (dico_base64_decode((unsigned char *)db_pass, strlen(db_pass), &buf, &size)) return -1; if (size != 20) { free(buf); return -1; } rc = memcmp(sha1digest, buf, sizeof sha1digest); free(buf); return rc; } static int chk_ssha(const char *db_pass, const char *pass) { int rc; unsigned char sha1digest[20]; struct sha1_ctx sha1context; size_t size = 0; unsigned char *buf = NULL; if (dico_base64_decode((unsigned char *)db_pass, strlen(db_pass), &buf, &size)) return -1; if (size <= 16) { dico_log(L_ERR, 0, "malformed SSHA1 password: %s", db_pass); free(buf); return -1; } sha1_init_ctx(&sha1context); sha1_process_bytes(pass, strlen(pass), &sha1context); sha1_process_bytes(buf + 20, size - 20, &sha1context); sha1_finish_ctx(&sha1context, sha1digest); rc = memcmp(sha1digest, buf, sizeof sha1digest); free(buf); return rc; } static struct passwd_algo { char *algo; size_t len; pwcheck_fp pwcheck; } pwtab[] = { #define DP(s, f) { #s, sizeof (#s) - 1, f } DP (CRYPT, chk_crypt), DP (MD5, chk_md5), DP (SMD5, chk_smd5), DP (SHA, chk_sha), DP (SSHA, chk_ssha), { NULL } #undef DP }; static pwcheck_fp find_pwcheck(const char *algo, int len) { struct passwd_algo *p; for (p = pwtab; p->algo; p++) if (len == p->len && my_strncasecmp(p->algo, algo, len) == 0) return p->pwcheck; return NULL; } int dicod_check_password(const char *db_pass, const char *pass) { if (db_pass[0] == '{') { int len; const char *algo; pwcheck_fp pwcheck; algo = db_pass + 1; for (len = 0; algo[len] != '}'; len++) if (algo[len] == 0) { /* Possibly malformed password */ return -1; } db_pass = algo + len + 1; pwcheck = find_pwcheck(algo, len); if (pwcheck) return pwcheck(db_pass, pass); else { dico_log(L_ERR, 0, "unsupported password algorithm scheme: %.*s", len, algo); return -1; } } else if (strcmp(crypt(pass, db_pass), db_pass) == 0) return 0; return strcmp(pass, db_pass); } dico-2.2/dicod/cmdline.c000066400000000000000000000642711172612674100151550ustar00rootroot00000000000000#line 832 "../grecs/build-aux/getopt.m4" /* -*- buffer-read-only: t -*- vi: set ro: THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */ #line 1 "cmdline.opt" /* This file is part of GNU Dico. -*- c -*- Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include #include #include #include #include static struct grecs_txtacc *pp_cmd_acc; #line 27 "cmdline.opt" #line 27 void print_help(void); #line 27 void print_usage(void); #line 171 "cmdline.opt" #line 171 #include #line 171 /* Option codes */ #line 171 enum { #line 171 _OPTION_INIT=255, #line 171 #line 56 "cmdline.opt" #line 56 OPTION_CONFIG, #line 68 "cmdline.opt" #line 68 OPTION_STDERR, #line 74 "cmdline.opt" #line 74 OPTION_SYSLOG, #line 94 "cmdline.opt" #line 94 OPTION_NO_TRANSCRIPT, #line 107 "cmdline.opt" #line 107 OPTION_SOURCE_INFO, #line 113 "cmdline.opt" #line 113 OPTION_TRACE_GRAMMAR, #line 119 "cmdline.opt" #line 119 OPTION_TRACE_LEX, #line 127 "cmdline.opt" #line 127 OPTION_CONFIG_HELP, #line 136 "cmdline.opt" #line 136 OPTION_PREPROCESSOR, #line 142 "cmdline.opt" #line 142 OPTION_NO_PREPROCESSOR, #line 171 "cmdline.opt" #line 171 OPTION_USAGE, #line 171 "cmdline.opt" MAX_OPTION #line 171 }; #line 171 #ifdef HAVE_GETOPT_LONG #line 171 static struct option long_options[] = { #line 171 #line 42 "cmdline.opt" #line 42 { "lint", no_argument, 0, 't' }, #line 48 "cmdline.opt" #line 48 { "inetd", no_argument, 0, 'i' }, #line 56 "cmdline.opt" #line 56 { "config", required_argument, 0, OPTION_CONFIG }, #line 62 "cmdline.opt" #line 62 { "foreground", no_argument, 0, 'f' }, #line 68 "cmdline.opt" #line 68 { "stderr", no_argument, 0, OPTION_STDERR }, #line 74 "cmdline.opt" #line 74 { "syslog", no_argument, 0, OPTION_SYSLOG }, #line 80 "cmdline.opt" #line 80 { "single-process", no_argument, 0, 's' }, #line 88 "cmdline.opt" #line 88 { "transcript", no_argument, 0, 'T' }, #line 94 "cmdline.opt" #line 94 { "no-transcript", no_argument, 0, OPTION_NO_TRANSCRIPT }, #line 100 "cmdline.opt" #line 100 { "debug", required_argument, 0, 'x' }, #line 107 "cmdline.opt" #line 107 { "source-info", no_argument, 0, OPTION_SOURCE_INFO }, #line 113 "cmdline.opt" #line 113 { "trace-grammar", no_argument, 0, OPTION_TRACE_GRAMMAR }, #line 119 "cmdline.opt" #line 119 { "trace-lex", no_argument, 0, OPTION_TRACE_LEX }, #line 127 "cmdline.opt" #line 127 { "config-help", no_argument, 0, OPTION_CONFIG_HELP }, #line 136 "cmdline.opt" #line 136 { "preprocessor", required_argument, 0, OPTION_PREPROCESSOR }, #line 142 "cmdline.opt" #line 142 { "no-preprocessor", no_argument, 0, OPTION_NO_PREPROCESSOR }, #line 148 "cmdline.opt" #line 148 { "include-dir", required_argument, 0, 'I' }, #line 154 "cmdline.opt" #line 154 { "define", required_argument, 0, 'D' }, #line 171 "cmdline.opt" #line 171 { "help", no_argument, 0, 'h' }, #line 171 "cmdline.opt" #line 171 { "usage", no_argument, 0, OPTION_USAGE }, #line 171 "cmdline.opt" #line 171 { "version", no_argument, 0, 'V' }, #line 171 "cmdline.opt" {0, 0, 0, 0} #line 171 }; #line 171 #endif #line 171 static struct opthelp { #line 171 const char *opt; #line 171 const char *arg; #line 171 int is_optional; #line 171 const char *descr; #line 171 } opthelp[] = { #line 171 #line 35 "cmdline.opt" #line 35 { NULL, NULL, 0, N_("Select program mode") }, #line 38 "cmdline.opt" #line 38 { #line 38 #ifdef HAVE_GETOPT_LONG #line 38 "-E", #line 38 #else #line 38 "-E", #line 38 #endif #line 38 NULL, 0, N_("Preprocess configuration file and exit") }, #line 44 "cmdline.opt" #line 44 { #line 44 #ifdef HAVE_GETOPT_LONG #line 44 "-t, --lint", #line 44 #else #line 44 "-t", #line 44 #endif #line 44 NULL, 0, N_("Check configuration file syntax and exit.") }, #line 50 "cmdline.opt" #line 50 { #line 50 #ifdef HAVE_GETOPT_LONG #line 50 "-i, --inetd", #line 50 #else #line 50 "-i", #line 50 #endif #line 50 NULL, 0, N_("Inetd mode.") }, #line 54 "cmdline.opt" #line 54 { NULL, NULL, 0, N_("Modifiers") }, #line 58 "cmdline.opt" #line 58 { #line 58 #ifdef HAVE_GETOPT_LONG #line 58 "--config", #line 58 #else #line 58 "", #line 58 #endif #line 58 N_("FILE"), 0, N_("Read this configuration file.") }, #line 64 "cmdline.opt" #line 64 { #line 64 #ifdef HAVE_GETOPT_LONG #line 64 "-f, --foreground", #line 64 #else #line 64 "-f", #line 64 #endif #line 64 NULL, 0, N_("Operate in foreground.") }, #line 70 "cmdline.opt" #line 70 { #line 70 #ifdef HAVE_GETOPT_LONG #line 70 "--stderr", #line 70 #else #line 70 "", #line 70 #endif #line 70 NULL, 0, N_("Output diagnostic to stderr.") }, #line 76 "cmdline.opt" #line 76 { #line 76 #ifdef HAVE_GETOPT_LONG #line 76 "--syslog", #line 76 #else #line 76 "", #line 76 #endif #line 76 NULL, 0, N_("Output diagnostic to syslog (default).") }, #line 82 "cmdline.opt" #line 82 { #line 82 #ifdef HAVE_GETOPT_LONG #line 82 "-s, --single-process", #line 82 #else #line 82 "-s", #line 82 #endif #line 82 NULL, 0, N_("Single-process mode.") }, #line 86 "cmdline.opt" #line 86 { NULL, NULL, 0, N_("Debugging") }, #line 90 "cmdline.opt" #line 90 { #line 90 #ifdef HAVE_GETOPT_LONG #line 90 "-T, --transcript", #line 90 #else #line 90 "-T", #line 90 #endif #line 90 NULL, 0, N_("Enable session transcript.") }, #line 96 "cmdline.opt" #line 96 { #line 96 #ifdef HAVE_GETOPT_LONG #line 96 "--no-transcript", #line 96 #else #line 96 "", #line 96 #endif #line 96 NULL, 0, N_("Disable session transcript.") }, #line 102 "cmdline.opt" #line 102 { #line 102 #ifdef HAVE_GETOPT_LONG #line 102 "-x, --debug", #line 102 #else #line 102 "-x", #line 102 #endif #line 102 N_("LEVEL-SPEC"), 0, N_("Set debug verbosity level.") }, #line 109 "cmdline.opt" #line 109 { #line 109 #ifdef HAVE_GETOPT_LONG #line 109 "--source-info", #line 109 #else #line 109 "", #line 109 #endif #line 109 NULL, 0, N_("Include source line information in the debugging output.") }, #line 115 "cmdline.opt" #line 115 { #line 115 #ifdef HAVE_GETOPT_LONG #line 115 "--trace-grammar", #line 115 #else #line 115 "", #line 115 #endif #line 115 NULL, 0, N_("Trace parsing of configuration file.") }, #line 121 "cmdline.opt" #line 121 { #line 121 #ifdef HAVE_GETOPT_LONG #line 121 "--trace-lex", #line 121 #else #line 121 "", #line 121 #endif #line 121 NULL, 0, N_("Trace config file lexer.") }, #line 125 "cmdline.opt" #line 125 { NULL, NULL, 0, N_("Additional help") }, #line 129 "cmdline.opt" #line 129 { #line 129 #ifdef HAVE_GETOPT_LONG #line 129 "--config-help", #line 129 #else #line 129 "", #line 129 #endif #line 129 NULL, 0, N_("Show configuration file summary.") }, #line 134 "cmdline.opt" #line 134 { NULL, NULL, 0, N_("Preprocessor control") }, #line 138 "cmdline.opt" #line 138 { #line 138 #ifdef HAVE_GETOPT_LONG #line 138 "--preprocessor", #line 138 #else #line 138 "", #line 138 #endif #line 138 N_("PROG"), 0, N_("Use PROG as a preprocessor for config file.") }, #line 144 "cmdline.opt" #line 144 { #line 144 #ifdef HAVE_GETOPT_LONG #line 144 "--no-preprocessor", #line 144 #else #line 144 "", #line 144 #endif #line 144 NULL, 0, N_("Do not use external preprocessor.") }, #line 150 "cmdline.opt" #line 150 { #line 150 #ifdef HAVE_GETOPT_LONG #line 150 "-I, --include-dir", #line 150 #else #line 150 "-I", #line 150 #endif #line 150 N_("DIR"), 0, N_("Add the directory DIR to the list of directories to be searched for preprocessor include files") }, #line 156 "cmdline.opt" #line 156 { #line 156 #ifdef HAVE_GETOPT_LONG #line 156 "-D, --define", #line 156 #else #line 156 "-D", #line 156 #endif #line 156 N_("SYMBOL[=VALUE]"), 0, N_("define a preprocessor symbol") }, #line 171 "cmdline.opt" #line 171 { NULL, NULL, 0, N_("Other options") }, #line 171 "cmdline.opt" #line 171 { #line 171 #ifdef HAVE_GETOPT_LONG #line 171 "-h, --help", #line 171 #else #line 171 "-h", #line 171 #endif #line 171 NULL, 0, N_("Give this help list") }, #line 171 "cmdline.opt" #line 171 { #line 171 #ifdef HAVE_GETOPT_LONG #line 171 "--usage", #line 171 #else #line 171 "", #line 171 #endif #line 171 NULL, 0, N_("Give a short usage message") }, #line 171 "cmdline.opt" #line 171 { #line 171 #ifdef HAVE_GETOPT_LONG #line 171 "-V, --version", #line 171 #else #line 171 "-V", #line 171 #endif #line 171 NULL, 0, N_("Print program version") }, #line 171 "cmdline.opt" }; #line 27 "cmdline.opt" #line 27 const char *program_version = "dicod" " (" PACKAGE_NAME ") " PACKAGE_VERSION; #line 27 static char doc[] = N_("GNU dictionary server"); #line 27 static char args_doc[] = ""; #line 27 const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; #line 27 struct grecs_node *cmdline_tree; #line 27 #line 27 #define DESCRCOLUMN 30 #line 27 #define RMARGIN 79 #line 27 #define GROUPCOLUMN 2 #line 27 #define USAGECOLUMN 13 #line 27 #line 27 static void #line 27 indent (size_t start, size_t col) #line 27 { #line 27 for (; start < col; start++) #line 27 putchar (' '); #line 27 } #line 27 #line 27 static void #line 27 print_option_descr (const char *descr, size_t lmargin, size_t rmargin) #line 27 { #line 27 while (*descr) #line 27 { #line 27 size_t s = 0; #line 27 size_t i; #line 27 size_t width = rmargin - lmargin; #line 27 #line 27 for (i = 0; ; i++) #line 27 { #line 27 if (descr[i] == 0 || descr[i] == ' ' || descr[i] == '\t') #line 27 { #line 27 if (i > width) #line 27 break; #line 27 s = i; #line 27 if (descr[i] == 0) #line 27 break; #line 27 } #line 27 } #line 27 printf ("%*.*s\n", s, s, descr); #line 27 descr += s; #line 27 if (*descr) #line 27 { #line 27 indent (0, lmargin); #line 27 descr++; #line 27 } #line 27 } #line 27 } #line 27 #line 27 #define NOPTHELP (sizeof (opthelp) / sizeof (opthelp[0])) #line 27 #line 27 static int #line 27 optcmp (const void *a, const void *b) #line 27 { #line 27 struct opthelp const *ap = (struct opthelp const *)a; #line 27 struct opthelp const *bp = (struct opthelp const *)b; #line 27 const char *opta, *optb; #line 27 size_t alen, blen; #line 27 #line 27 for (opta = ap->opt; *opta == '-'; opta++) #line 27 ; #line 27 alen = strcspn (opta, ","); #line 27 #line 27 for (optb = bp->opt; *optb == '-'; optb++) #line 27 ; #line 27 blen = strcspn (optb, ","); #line 27 #line 27 if (alen > blen) #line 27 blen = alen; #line 27 #line 27 return strncmp (opta, optb, blen); #line 27 } #line 27 #line 27 static void #line 27 sort_options (int start, int count) #line 27 { #line 27 qsort (opthelp + start, count, sizeof (opthelp[0]), optcmp); #line 27 } #line 27 #line 27 static int #line 27 sort_group (int start) #line 27 { #line 27 int i; #line 27 #line 27 for (i = start; i < NOPTHELP && opthelp[i].opt; i++) #line 27 ; #line 27 sort_options (start, i - start); #line 27 return i + 1; #line 27 } #line 27 #line 27 static void #line 27 sort_opthelp (void) #line 27 { #line 27 int start; #line 27 #line 27 for (start = 0; start < NOPTHELP; ) #line 27 { #line 27 if (!opthelp[start].opt) #line 27 start = sort_group (start + 1); #line 27 else #line 27 start = sort_group (start); #line 27 } #line 27 } #line 27 #line 27 void (*print_help_hook) (FILE *stream); #line 27 #line 27 void #line 27 print_help (void) #line 27 { #line 27 unsigned i; #line 27 int argsused = 0; #line 27 #line 27 printf ("%s %s [%s]... %s\n", _("Usage:"), "dicod", _("OPTION"), #line 27 args_doc[0] ? gettext (args_doc) : args_doc); #line 27 if (doc[0]) #line 27 print_option_descr(gettext (doc), 0, RMARGIN); #line 27 putchar ('\n'); #line 27 #line 27 sort_opthelp (); #line 27 for (i = 0; i < NOPTHELP; i++) #line 27 { #line 27 unsigned n; #line 27 if (opthelp[i].opt) #line 27 { #line 27 n = printf (" %s", opthelp[i].opt); #line 27 if (opthelp[i].arg) #line 27 { #line 27 char *cb, *ce; #line 27 argsused = 1; #line 27 if (strlen (opthelp[i].opt) == 2) #line 27 { #line 27 if (!opthelp[i].is_optional) #line 27 { #line 27 putchar (' '); #line 27 n++; #line 27 } #line 27 } #line 27 else #line 27 { #line 27 putchar ('='); #line 27 n++; #line 27 } #line 27 if (opthelp[i].is_optional) #line 27 { #line 27 cb = "["; #line 27 ce = "]"; #line 27 } #line 27 else #line 27 cb = ce = ""; #line 27 n += printf ("%s%s%s", cb, gettext (opthelp[i].arg), ce); #line 27 } #line 27 if (n >= DESCRCOLUMN) #line 27 { #line 27 putchar ('\n'); #line 27 n = 0; #line 27 } #line 27 indent (n, DESCRCOLUMN); #line 27 print_option_descr (gettext (opthelp[i].descr), DESCRCOLUMN, RMARGIN); #line 27 } #line 27 else #line 27 { #line 27 if (i) #line 27 putchar ('\n'); #line 27 indent (0, GROUPCOLUMN); #line 27 print_option_descr (gettext (opthelp[i].descr), #line 27 GROUPCOLUMN, RMARGIN); #line 27 putchar ('\n'); #line 27 } #line 27 } #line 27 #line 27 putchar ('\n'); #line 27 if (argsused) #line 27 { #line 27 print_option_descr (_("Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."), 0, RMARGIN); #line 27 putchar ('\n'); #line 27 } #line 27 #line 27 if (print_help_hook) #line 27 print_help_hook (stdout); #line 27 #line 27 /* TRANSLATORS: The placeholder indicates the bug-reporting address for this package. Please add _another line_ saying "Report translation bugs to <...>\n" with the address for translation bugs (typically your translation team's web or email address). */ #line 27 printf (_("Report bugs to %s.\n"), program_bug_address); #line 27 #line 27 #ifdef PACKAGE_URL #line 27 printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); #line 27 #else #line 27 printf (_("%s home page: \n"), #line 27 PACKAGE_NAME, PACKAGE); #line 27 #endif #line 27 fputs (_("General help using GNU software: \n"), #line 27 stdout); #line 27 } #line 27 #line 27 static int #line 27 cmpidx_short (const void *a, const void *b) #line 27 { #line 27 unsigned const *ai = (unsigned const *)a; #line 27 unsigned const *bi = (unsigned const *)b; #line 27 #line 27 return opthelp[*ai].opt[1] - opthelp[*bi].opt[1]; #line 27 } #line 27 #line 27 #ifdef HAVE_GETOPT_LONG #line 27 static int #line 27 cmpidx_long (const void *a, const void *b) #line 27 { #line 27 unsigned const *ai = (unsigned const *)a; #line 27 unsigned const *bi = (unsigned const *)b; #line 27 struct opthelp const *ap = opthelp + *ai; #line 27 struct opthelp const *bp = opthelp + *bi; #line 27 char const *opta, *optb; #line 27 size_t lena, lenb; #line 27 #line 27 if (ap->opt[1] == '-') #line 27 opta = ap->opt; #line 27 else #line 27 opta = ap->opt + 4; #line 27 lena = strcspn (opta, ","); #line 27 #line 27 if (bp->opt[1] == '-') #line 27 optb = bp->opt; #line 27 else #line 27 optb = bp->opt + 4; #line 27 lenb = strcspn (optb, ","); #line 27 return strncmp (opta, optb, lena > lenb ? lenb : lena); #line 27 } #line 27 #endif #line 27 #line 27 void #line 27 print_usage (void) #line 27 { #line 27 unsigned i; #line 27 unsigned n; #line 27 char buf[RMARGIN+1]; #line 27 unsigned *idxbuf; #line 27 unsigned nidx; #line 27 #line 27 #define FLUSH do { buf[n] = 0; printf ("%s\n", buf); n = USAGECOLUMN; memset (buf, ' ', n); } while (0) #line 27 #define ADDC(c) do { if (n == RMARGIN) FLUSH; buf[n++] = c; } while (0) #line 27 #line 27 idxbuf = calloc (NOPTHELP, sizeof (idxbuf[0])); #line 27 if (!idxbuf) #line 27 { #line 27 fprintf (stderr, "not enough memory"); #line 27 abort (); #line 27 } #line 27 #line 27 n = snprintf (buf, sizeof buf, "%s %s ", _("Usage:"), "dicod"); #line 27 #line 27 /* Print a list of short options without arguments. */ #line 27 for (i = nidx = 0; i < NOPTHELP; i++) #line 27 if (opthelp[i].opt && opthelp[i].descr && opthelp[i].opt[1] != '-' #line 27 && opthelp[i].arg == NULL) #line 27 idxbuf[nidx++] = i; #line 27 #line 27 if (nidx) #line 27 { #line 27 qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_short); #line 27 #line 27 ADDC ('['); #line 27 ADDC ('-'); #line 27 for (i = 0; i < nidx; i++) #line 27 { #line 27 ADDC (opthelp[idxbuf[i]].opt[1]); #line 27 } #line 27 ADDC (']'); #line 27 } #line 27 #line 27 /* Print a list of short options with arguments. */ #line 27 for (i = nidx = 0; i < NOPTHELP; i++) #line 27 { #line 27 if (opthelp[i].opt && opthelp[i].descr && opthelp[i].opt[1] != '-' #line 27 && opthelp[i].arg) #line 27 idxbuf[nidx++] = i; #line 27 } #line 27 #line 27 if (nidx) #line 27 { #line 27 qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_short); #line 27 #line 27 for (i = 0; i < nidx; i++) #line 27 { #line 27 struct opthelp *opt = opthelp + idxbuf[i]; #line 27 size_t len = 5 + strlen (opt->arg) #line 27 + (opt->is_optional ? 2 : 1); #line 27 #line 27 if (n + len > RMARGIN) FLUSH; #line 27 buf[n++] = ' '; #line 27 buf[n++] = '['; #line 27 buf[n++] = '-'; #line 27 buf[n++] = opt->opt[1]; #line 27 if (opt->is_optional) #line 27 { #line 27 buf[n++] = '['; #line 27 strcpy (&buf[n], opt->arg); #line 27 n += strlen (opt->arg); #line 27 buf[n++] = ']'; #line 27 } #line 27 else #line 27 { #line 27 buf[n++] = ' '; #line 27 strcpy (&buf[n], opt->arg); #line 27 n += strlen (opt->arg); #line 27 } #line 27 buf[n++] = ']'; #line 27 } #line 27 } #line 27 #line 27 #ifdef HAVE_GETOPT_LONG #line 27 /* Print a list of long options */ #line 27 for (i = nidx = 0; i < NOPTHELP; i++) #line 27 { #line 27 if (opthelp[i].opt && opthelp[i].descr #line 27 && (opthelp[i].opt[1] == '-' || opthelp[i].opt[2] == ',')) #line 27 idxbuf[nidx++] = i; #line 27 } #line 27 #line 27 if (nidx) #line 27 { #line 27 qsort (idxbuf, nidx, sizeof (idxbuf[0]), cmpidx_long); #line 27 #line 27 for (i = 0; i < nidx; i++) #line 27 { #line 27 struct opthelp *opt = opthelp + idxbuf[i]; #line 27 size_t len; #line 27 const char *longopt; #line 27 #line 27 if (opt->opt[1] == '-') #line 27 longopt = opt->opt; #line 27 else if (opt->opt[2] == ',') #line 27 longopt = opt->opt + 4; #line 27 else #line 27 continue; #line 27 #line 27 len = 3 + strlen (longopt) #line 27 + (opt->arg ? 1 + strlen (opt->arg) #line 27 + (opt->is_optional ? 2 : 0) : 0); #line 27 if (n + len > RMARGIN) FLUSH; #line 27 buf[n++] = ' '; #line 27 buf[n++] = '['; #line 27 strcpy (&buf[n], longopt); #line 27 n += strlen (longopt); #line 27 if (opt->arg) #line 27 { #line 27 buf[n++] = '='; #line 27 if (opt->is_optional) #line 27 { #line 27 buf[n++] = '['; #line 27 strcpy (&buf[n], opt->arg); #line 27 n += strlen (opt->arg); #line 27 buf[n++] = ']'; #line 27 } #line 27 else #line 27 { #line 27 strcpy (&buf[n], opt->arg); #line 27 n += strlen (opt->arg); #line 27 } #line 27 } #line 27 buf[n++] = ']'; #line 27 } #line 27 } #line 27 #endif #line 27 FLUSH; #line 27 free (idxbuf); #line 27 } #line 27 #line 27 const char version_etc_copyright[] = #line 27 /* Do *not* mark this string for translation. First %s is a copyright symbol suitable for this locale, and second %s are the copyright years. */ #line 27 "Copyright %s %s %s"; #line 27 #line 27 void #line 27 print_version_only(const char *program_version, FILE *stream) #line 27 { #line 27 fprintf (stream, "%s\n", program_version); #line 27 /* TRANSLATORS: Translate "(C)" to the copyright symbol (C-in-a-circle), if this symbol is available in the user's locale. Otherwise, do not translate "(C)"; leave it as-is. */ #line 27 fprintf (stream, version_etc_copyright, _("(C)"), #line 27 "2005-2012", #line 27 "Free Software Foundation, Inc."); #line 27 fputc ('\n', stream); #line 27 } #line 27 #line 27 #line 27 #line 27 void (*print_version_hook)(FILE *stream); #line 27 #line 27 void #line 27 print_version(const char *program_version, FILE *stream) #line 27 { #line 27 #line 27 print_version_only(program_version, stream); #line 27 #line 27 fputs (_("License GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n"), #line 27 stream); #line 27 if (print_version_hook) #line 27 print_version_hook (stream); #line 27 #line 27 } #line 27 #line 171 "cmdline.opt" #line 171 void get_options(int argc, char *argv[], struct dicod_conf_override *conf) { #line 176 { #line 176 int c; #line 176 #line 176 #ifdef HAVE_GETOPT_LONG #line 176 while ((c = getopt_long(argc, argv, "EtifsTx:I:D:hV", #line 176 long_options, NULL)) != EOF) #line 176 #else #line 176 while ((c = getopt(argc, argv, "EtifsTx:I:D:hV")) != EOF) #line 176 #endif #line 176 { #line 176 switch (c) #line 176 { #line 176 default: #line 176 exit(EX_USAGE); exit(EX_USAGE); #line 176 #line 38 "cmdline.opt" case 'E': #line 38 { #line 38 mode = MODE_PREPROC; #line 40 break; #line 40 } #line 44 "cmdline.opt" case 't': #line 44 { #line 44 config_lint_option = 1; #line 46 break; #line 46 } #line 50 "cmdline.opt" case 'i': #line 50 { #line 50 mode = MODE_INETD; #line 52 break; #line 52 } #line 58 "cmdline.opt" case OPTION_CONFIG: #line 58 { #line 58 config_file = optarg; #line 60 break; #line 60 } #line 64 "cmdline.opt" case 'f': #line 64 { #line 64 foreground = 1; #line 66 break; #line 66 } #line 70 "cmdline.opt" case OPTION_STDERR: #line 70 { #line 70 log_to_stderr = 1; #line 72 break; #line 72 } #line 76 "cmdline.opt" case OPTION_SYSLOG: #line 76 { #line 76 log_to_stderr = 0; #line 78 break; #line 78 } #line 82 "cmdline.opt" case 's': #line 82 { #line 82 single_process = 1; #line 84 break; #line 84 } #line 90 "cmdline.opt" case 'T': #line 90 { #line 90 conf->transcript = 1; #line 92 break; #line 92 } #line 96 "cmdline.opt" case OPTION_NO_TRANSCRIPT: #line 96 { #line 96 conf->transcript = 0; #line 98 break; #line 98 } #line 102 "cmdline.opt" case 'x': #line 102 { #line 102 debug_level_str = optarg; debug_level = atoi(optarg); #line 105 break; #line 105 } #line 109 "cmdline.opt" case OPTION_SOURCE_INFO: #line 109 { #line 109 debug_source_info = 1; #line 111 break; #line 111 } #line 115 "cmdline.opt" case OPTION_TRACE_GRAMMAR: #line 115 { #line 115 grecs_gram_trace(1); #line 117 break; #line 117 } #line 121 "cmdline.opt" case OPTION_TRACE_LEX: #line 121 { #line 121 grecs_lex_trace(1); #line 123 break; #line 123 } #line 129 "cmdline.opt" case OPTION_CONFIG_HELP: #line 129 { #line 129 config_help(); exit(0); #line 132 break; #line 132 } #line 138 "cmdline.opt" case OPTION_PREPROCESSOR: #line 138 { #line 138 grecs_preprocessor = optarg; #line 140 break; #line 140 } #line 144 "cmdline.opt" case OPTION_NO_PREPROCESSOR: #line 144 { #line 144 grecs_preprocessor = NULL; #line 146 break; #line 146 } #line 150 "cmdline.opt" case 'I': #line 150 { #line 150 grecs_preproc_add_include_dir(optarg); #line 152 break; #line 152 } #line 156 "cmdline.opt" case 'D': #line 156 { #line 156 char *p; if (!pp_cmd_acc) pp_cmd_acc = grecs_txtacc_create(); grecs_txtacc_grow(pp_cmd_acc, " \"-D", 4); for (p = optarg; *p; p++) { if (*p == '\\' || *p == '"') grecs_txtacc_grow_char(pp_cmd_acc, '\\'); grecs_txtacc_grow_char(pp_cmd_acc, *p); } grecs_txtacc_grow_char(pp_cmd_acc, '"'); #line 168 break; #line 168 } #line 171 "cmdline.opt" case 'h': #line 171 { #line 171 #line 171 print_help (); #line 171 exit (0); #line 171 #line 171 break; #line 171 } #line 171 "cmdline.opt" case OPTION_USAGE: #line 171 { #line 171 #line 171 print_usage (); #line 171 exit (0); #line 171 #line 171 break; #line 171 } #line 171 "cmdline.opt" case 'V': #line 171 { #line 171 #line 171 /* Give version */ #line 171 print_version(program_version, stdout); #line 171 exit (0); #line 171 #line 171 break; #line 171 } #line 176 "cmdline.opt" } #line 176 } #line 176 #line 176 if (optind < argc) { #line 176 fprintf(stderr, "%s: unexpected arguments\n", argv[0]); #line 176 exit(EX_USAGE); #line 176 } #line 176 #line 176 if (cmdline_tree) #line 176 { #line 176 struct grecs_node *rn = grecs_node_create(grecs_node_root, NULL); #line 176 rn->down = cmdline_tree; #line 176 cmdline_tree = rn; #line 176 } #line 176 } #line 176 if (pp_cmd_acc && grecs_preprocessor) { char *args, *cmd; grecs_txtacc_grow_char(pp_cmd_acc, 0); args = grecs_txtacc_finish(pp_cmd_acc, 0); cmd = grecs_malloc(strlen(grecs_preprocessor) + strlen(args) + 1); strcpy(cmd, grecs_preprocessor); strcat(cmd, args); grecs_preprocessor = cmd; } grecs_txtacc_free(pp_cmd_acc); } dico-2.2/dicod/cmdline.opt000066400000000000000000000100101172612674100155130ustar00rootroot00000000000000/* This file is part of GNU Dico. -*- c -*- Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include #include #include #include #include static struct grecs_txtacc *pp_cmd_acc; OPTIONS_BEGIN("dicod", [], [<>], [], [], [], []) GROUP(Select program mode) OPTION(,E,, []) BEGIN mode = MODE_PREPROC; END OPTION(lint,t,, []) BEGIN config_lint_option = 1; END OPTION(inetd, i,, []) BEGIN mode = MODE_INETD; END GROUP(Modifiers) OPTION(config,,FILE, []) BEGIN config_file = optarg; END OPTION(foreground, f,, []) BEGIN foreground = 1; END OPTION(stderr,,, []) BEGIN log_to_stderr = 1; END OPTION(syslog,,, []) BEGIN log_to_stderr = 0; END OPTION(single-process, s,, []) BEGIN single_process = 1; END GROUP(Debugging) OPTION(transcript, T,, []) BEGIN conf->transcript = 1; END OPTION(no-transcript,,, []) BEGIN conf->transcript = 0; END OPTION(debug, x, LEVEL-SPEC, []) BEGIN debug_level_str = optarg; debug_level = atoi(optarg); END OPTION(source-info,,, []) BEGIN debug_source_info = 1; END OPTION(trace-grammar,,, []) BEGIN grecs_gram_trace(1); END OPTION(trace-lex,,, []) BEGIN grecs_lex_trace(1); END GROUP([]) OPTION(config-help,,, []) BEGIN config_help(); exit(0); END GROUP(Preprocessor control) OPTION(preprocessor,,PROG, []) BEGIN grecs_preprocessor = optarg; END OPTION(no-preprocessor,,, []) BEGIN grecs_preprocessor = NULL; END OPTION(include-dir,I,DIR, []) BEGIN grecs_preproc_add_include_dir(optarg); END OPTION(define,D,SYMBOL[=VALUE], []) BEGIN char *p; if (!pp_cmd_acc) pp_cmd_acc = grecs_txtacc_create(); grecs_txtacc_grow(pp_cmd_acc, " \"-D", 4); for (p = optarg; *p; p++) { if (*p == '\\' || *p == '"') grecs_txtacc_grow_char(pp_cmd_acc, '\\'); grecs_txtacc_grow_char(pp_cmd_acc, *p); } grecs_txtacc_grow_char(pp_cmd_acc, '"'); END OPTIONS_END void get_options(int argc, char *argv[], struct dicod_conf_override *conf) { GETOPT(argc, argv,, exit(EX_USAGE)) if (pp_cmd_acc && grecs_preprocessor) { char *args, *cmd; grecs_txtacc_grow_char(pp_cmd_acc, 0); args = grecs_txtacc_finish(pp_cmd_acc, 0); cmd = grecs_malloc(strlen(grecs_preprocessor) + strlen(args) + 1); strcpy(cmd, grecs_preprocessor); strcat(cmd, args); grecs_preprocessor = cmd; } grecs_txtacc_free(pp_cmd_acc); } dico-2.2/dicod/commands.c000066400000000000000000000247761172612674100153510ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include int got_quit; void dicod_quit(dico_stream_t str, int argc, char **argv) { got_quit = 1; stream_writez(str, "221 bye"); report_current_timing(str, "dicod"); stream_writez(str, "\n"); } void dicod_show_std_help(dico_stream_t str); void dicod_help(dico_stream_t str, int argc, char **argv) { const char *text = help_text; dico_stream_t ostr; stream_writez(str, "113 help text follows\n"); ostr = dicod_ostream_create(str, NULL); if (text) { if (text[0] == '+') { dicod_show_std_help(ostr); text++; } stream_write_multiline(ostr, text); } else dicod_show_std_help(ostr); stream_writez(ostr, "\n"); dico_stream_close(ostr); dico_stream_destroy(&ostr); stream_writez(str, ".\n"); stream_writez(str, "250 ok\n"); } void dicod_show_info(dico_stream_t str, int argc, char **argv) { char *dbname = argv[2]; dicod_database_t *dict = find_database(dbname); if (!dict) stream_writez(str, "550 invalid database, use SHOW DB for a list\n"); else { dico_stream_t ostr; char *info = dicod_get_database_info(dict); stream_printf(str, "112 information for %s\n", dbname); ostr = dicod_ostream_create(str, NULL); if (info) { stream_write_multiline(ostr, info); dicod_free_database_info(dict, info); } else stream_writez(ostr, "No information available.\n"); stream_writez(ostr, "\n"); dico_stream_close(ostr); dico_stream_destroy(&ostr); stream_writez(str, ".\n"); stream_writez(str, "250 ok\n"); } } static int _show_database(void *item, void *data) { dicod_database_t *dict = item; dico_stream_t str = data; char *descr = dicod_get_database_descr(dict); char *pdescr; if (utf8_quote(descr ? descr : "", &pdescr)) xalloc_die(); stream_printf(str, "%s \"%s\"\n", dict->name, pdescr); dicod_free_database_descr(dict, descr); free(pdescr); return 0; } void dicod_show_databases(dico_stream_t str, int argc, char **argv) { size_t count = database_count(); if (count == 0) stream_printf(str, "554 No databases present\n"); else { dico_stream_t ostr; stream_printf(str, "110 %lu databases present\n", (unsigned long) count); ostr = dicod_ostream_create(str, NULL); database_iterate(_show_database, ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); stream_writez(str, ".\n"); stream_writez(str, "250 ok\n"); } } static int _show_strategy(void *item, void *data) { dico_strategy_t sp = item; dico_stream_t str = data; stream_printf(str, "%s \"%s\"\n", sp->name, quotearg(sp->descr)); return 0; } void dicod_show_strategies(dico_stream_t str, int argc, char **argv) { size_t count = dico_strategy_count(); if (count == 0) stream_printf(str, "555 No strategies available\n"); else { dico_stream_t ostr; stream_printf(str, "111 %lu strategies present: list follows\n", (unsigned long) count); ostr = dicod_ostream_create(str, NULL); dico_strategy_iterate(_show_strategy, ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); stream_writez(str, ".\n"); stream_writez(str, "250 ok\n"); } } void dicod_show_server(dico_stream_t str, int argc, char **argv) { dico_stream_t ostr; stream_writez(str, "114 server information\n"); ostr = dicod_ostream_create(str, NULL); stream_writez(str, "dicod "); if (show_sys_info_p()) { struct utsname uts; uname(&uts); stream_printf(str, "(%s) on %s %s, ", PACKAGE_STRING, uts.sysname, uts.release); } else stream_writez(str, "server on "); stream_writez(str, hostname); if (timing_option && show_sys_info_p()) { xdico_timer_t t; double x, fph; stream_writez(str, " up "); t = timer_stop("server"); x = timer_get_real(t); timer_format_time(str, x); if (mode == MODE_DAEMON && !single_process) { x /= 3600; if (x < 0.0001) fph = 0; else fph = (total_forks + 1) / x; stream_printf(str, ", %lu forks (%.1f/hour)", total_forks, fph); } } stream_writez(str, "\n"); if (server_info) { stream_write_multiline(ostr, server_info); stream_writez(ostr, "\n"); } dico_stream_close(ostr); dico_stream_destroy(&ostr); stream_writez(str, ".\n"); stream_writez(str, "250 ok\n"); } void dicod_status(dico_stream_t str, int argc, char **argv) { stream_writez(str, "210"); if (timing_option) report_timing(str, timer_stop("dicod"), &total_stat); else stream_writez(str, " No timing data available"); stream_writez(str, "\n"); } void dicod_client(dico_stream_t str, int argc, char **argv) { free(client_id); if (argc > 1) { int rc = dico_argcv_string (argc - 1, (char const **)(argv + 1), &client_id); if (rc) dico_log(L_ERR, rc, "dicod_client"); else dico_log(L_INFO, 0, "Client info: %s", client_id); } stream_writez(str, "250 ok\n"); } void dicod_match(dico_stream_t str, int argc, char **argv) { const char *dbname = argv[1]; const char *word = argv[3]; const dico_strategy_t strat = dico_strategy_find(argv[2]); total_bytes_out = 0; if (!strat) stream_writez(str, "551 Invalid strategy, use SHOW STRAT for a list\n"); else if (strcmp(dbname, "!") == 0) dicod_match_word_first(str, strat, word); else if (strcmp(dbname, "*") == 0) dicod_match_word_all(str, strat, word); else { dicod_database_t *db = find_database(dbname); if (!db) stream_writez(str, "550 invalid database, use SHOW DB for a list\n"); else dicod_match_word_db(db, str, strat, word); } access_log(argc, argv); } void dicod_define(dico_stream_t str, int argc, char **argv) { char *dbname = argv[1]; char *word = argv[2]; total_bytes_out = 0; if (strcmp(dbname, "!") == 0) { dicod_define_word_first(str, word); } else if (strcmp(dbname, "*") == 0) { dicod_define_word_all(str, word); } else { dicod_database_t *db = find_database(dbname); if (!db) stream_writez(str, "550 invalid database, use SHOW DB for a list\n"); else dicod_define_word_db(db, str, word); } access_log(argc, argv); } struct dicod_command command_tab[] = { { "DEFINE", 3, 3, "database word", "look up word in database", dicod_define }, { "MATCH", 4, 4, "database strategy word", "match word in database using strategy", dicod_match }, { "SHOW DB", 2, 2, NULL, "list all accessible databases", dicod_show_databases, }, { "SHOW DATABASES", 2, 2, NULL, "list all accessible databases", dicod_show_databases, }, { "SHOW STRAT", 2, 2, NULL, "list available matching strategies", dicod_show_strategies }, { "SHOW STRATEGIES", 2, 2, NULL, "list available matching strategies", dicod_show_strategies }, { "SHOW INFO", 3, 3, "database", "provide information about the database", dicod_show_info }, { "SHOW SERVER", 2, 2, NULL, "provide site-specific information", dicod_show_server }, { "CLIENT", 1, DICOD_MAXPARAM_INF, "info", "identify client to server", dicod_client }, { "STATUS", 1, 1, NULL, "display timing information", dicod_status }, { "HELP", 1, 1, NULL, "display this help information", dicod_help }, { "QUIT", 1, 1, NULL, "terminate connection", dicod_quit }, { NULL } }; struct locate_data { int argc; char **argv; }; static int _cmd_arg_cmp(const void *item, void *data) { const struct dicod_command *p = item; const struct locate_data *datptr = data; int i, off = 0; for (i = 0; i < datptr->argc; i++) { int len = strlen(datptr->argv[i]); if (c_strncasecmp(p->keyword + off, datptr->argv[i], len) == 0) { off += len; if (p->keyword[off] == 0) return 0; if (p->keyword[off] == ' ') { off++; continue; } } break; } return 1; } dico_list_t /* of struct dicod_command */ command_list; void dicod_add_command(struct dicod_command *cmd) { if (!command_list) { command_list = xdico_list_create(); dico_list_set_comparator(command_list, _cmd_arg_cmp); } xdico_list_append(command_list, cmd); } static int cmd_comp(const void *a, void *b) { const struct dicod_command *ca = a; const struct dicod_command *cb = b; return c_strcasecmp (ca->keyword, cb->keyword); } void dicod_remove_command(const char *name) { struct dicod_command cmd; cmd.keyword = name; _dico_list_remove(command_list, &cmd, cmd_comp, NULL); } void dicod_init_command_tab() { struct dicod_command *p; for (p = command_tab; p->keyword; p++) dicod_add_command(p); } static int _print_help(void *item, void *data) { struct dicod_command *p = item; dico_stream_t str = data; int len = strlen(p->keyword); stream_writez(str, p->keyword); if (p->param) { stream_printf(str, " %s", p->param); len += strlen(p->param) + 1; } if (len < 31) len = 31 - len; else len = 0; stream_printf(str, "%*.*s -- %s\n", len, len, "", p->help); return 0; } void dicod_show_std_help(dico_stream_t str) { dico_list_iterate(command_list, _print_help, str); } struct dicod_command * locate_command(int argc, char **argv) { struct locate_data ld; ld.argc = argc; ld.argv = argv; return dico_list_locate(command_list, &ld); } void dicod_handle_command(dico_stream_t str, int argc, char **argv) { struct dicod_command *cmd; int nargc = 0; char **nargv = NULL; if (alias_expand(argc, argv, &nargc, &nargv) == 0) { argc = nargc; argv = nargv; } cmd = locate_command(argc, argv); if (!cmd) stream_writez(str, "500 unknown command\n"); else if (argc < cmd->minparam || (cmd->maxparam != DICOD_MAXPARAM_INF && argc > cmd->maxparam)) stream_writez(str, "501 wrong number of arguments\n"); else if (!cmd->handler) stream_writez(str, "502 command is not yet implemented, sorry\n"); else cmd->handler(str, argc, argv); free(nargv); } dico-2.2/dicod/dbtext.c000066400000000000000000000070521172612674100150260ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include #include static int dbtext_open(void **handle, dico_url_t url, const char *unused) { char *dirname = dico_url_full_path(url); struct stat st; if (!dirname) { dico_log(L_ERR, 0, _("cannot get path from URL `%s'"), url->string); return 1; } if (stat(dirname, &st)) { dico_log(L_ERR, errno, _("cannot stat directory `%s'"), dirname); free(dirname); return 1; } if (!S_ISDIR(st.st_mode)) { dico_log(L_ERR, 0, _("%s: not a directory"), dirname); free(dirname); return 1; } free(dirname); *handle = url; return 0; } static FILE * open_file(const char *dir, const char *file, char **pfname) { char *full_name = make_full_file_name(dir, file); FILE *fp = fopen(full_name, "r"); if (!fp) { dico_log(L_ERR, errno, _("cannot open file `%s'"), full_name); free(full_name); } else *pfname = full_name; return fp; } static char * find_key(FILE *fp, const char *key, char **pbuf, size_t *psize) { ssize_t size; size_t keylen = strlen(key); while ((size = getline(pbuf, psize, fp)) > 0) { char *p = *pbuf; trimnl(p, size); while (*p && isspace(*p)) p++; if (!*p || *p == '#' || strlen(p) < keylen) continue; if (memcmp(p, key, keylen) == 0) { if (p[keylen] == 0) return p + keylen; else if (isspace(p[keylen])) { for (p += keylen; *p && isspace(*p); p++) ; return p; } } } return NULL; } static int dbtext_get_password(void *handle, const char *qpw, const char *key, char **ppass) { dico_url_t url = handle; char *dir = dico_url_full_path(url); char *full_name; FILE *fp = open_file(dir, qpw, &full_name); int rc; if (fp) { char *buf = NULL; size_t size = 0; char *val = find_key(fp, key, &buf, &size); if (val) *ppass = xstrdup(val); else *ppass = NULL; fclose(fp); free(full_name); free(buf); rc = 0; } else rc = 1; free(dir); return rc; } static int _free_group(void *item, void *data) { free(item); return 0; } static int dbtext_get_groups(void *handle, const char *qgr, const char *key, dico_list_t *pgroups) { dico_url_t url = handle; char *dir = dico_url_full_path(url); char *full_name; FILE *fp = open_file(dir, qgr, &full_name); int rc; dico_list_t groups = NULL; if (fp) { char *buf = NULL; size_t size = 0; char *val; while ((val = find_key(fp, key, &buf, &size))) { if (!groups) { groups = xdico_list_create(); dico_list_set_free_item(groups, _free_group, NULL); } xdico_list_append(groups, xstrdup(val)); } *pgroups = groups; fclose(fp); free(full_name); free(buf); rc = 0; } else rc = 1; return rc; } struct dico_udb_def text_udb_def = { "text", dbtext_open, NULL, dbtext_get_password, dbtext_get_groups }; dico-2.2/dicod/dicod.c000066400000000000000000000223631172612674100146200ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include char *msg_id; struct capa_print { size_t num; dico_stream_t stream; }; static int print_capa(const char *name, int enabled, void *data) { struct capa_print *cp = data; if (enabled) { if (cp->num++) dico_stream_write(cp->stream, ".", 1); stream_writez(cp->stream, (char*)name); } return 0; } static void output_capabilities(dico_stream_t str) { struct capa_print cp; cp.num = 0; cp.stream = str; dico_stream_write(str, "<", 1); dicod_capa_iterate(print_capa, &cp); dico_stream_write(str, ">", 1); } /* 3.1. Initial Connection When a client initially connects to a DICT server, a code 220 is sent if the client's IP is allowed to connect: 220 text capabilities msg-id */ static void initial_banner(dico_stream_t str) { dico_stream_write(str, "220 ", 4); stream_writez(str, hostname); dico_stream_write(str, " ", 1); if (initial_banner_text) stream_writez(str, initial_banner_text); else stream_writez(str, (char*) program_version); dico_stream_write(str, " ", 1); output_capabilities(str); dico_stream_write(str, " ", 1); asprintf(&msg_id, "<%lu.%lu@%s>", (unsigned long) getpid(), (unsigned long) time(NULL), hostname); stream_writez(str, msg_id); dico_stream_write(str, "\n", 1); } int get_input_line(dico_stream_t str, char **buf, size_t *size, size_t *rdbytes) { int rc; alarm(inactivity_timeout); rc = dico_stream_getline(str, buf, size, rdbytes); alarm(0); return rc; } RETSIGTYPE sig_alarm(int sig) { exit(EXIT_TIMEOUT); } static void load_modules() { dico_iterator_t itr = xdico_list_iterator(modinst_list); dicod_module_instance_t *inst; for (inst = dico_iterator_first(itr); inst; inst = dico_iterator_next(itr)) { if (dicod_load_module(inst)) { database_remove_dependent(inst); dico_iterator_remove_current(itr, NULL); } } dico_iterator_destroy(&itr); } static void init_databases() { dico_iterator_t itr = xdico_list_iterator(database_list); dicod_database_t *dp; for (dp = dico_iterator_first(itr); dp; dp = dico_iterator_next(itr)) { if (dicod_init_database(dp)) { dico_log(L_NOTICE, 0, _("removing database %s"), dp->name); dico_iterator_remove_current(itr, NULL); dicod_database_free(dp); } } dico_iterator_destroy(&itr); } static void open_databases() { dico_iterator_t itr = xdico_list_iterator(database_list); dicod_database_t *dp; for (dp = dico_iterator_first(itr); dp; dp = dico_iterator_next(itr)) { if (dicod_open_database(dp)) { dico_log(L_NOTICE, 0, _("removing database %s"), dp->name); dico_iterator_remove_current(itr, NULL); dicod_database_free(dp); } } dico_iterator_destroy(&itr); } static void close_databases() { dico_iterator_t itr = xdico_list_iterator(database_list); dicod_database_t *dp; for (dp = dico_iterator_first(itr); dp; dp = dico_iterator_next(itr)) { if (dicod_close_database(dp)) dico_log(L_NOTICE, 0, _("error closing database %s"), dp->name); } dico_iterator_destroy(&itr); } /* Default selectors for some commonly used methods. Modules should override these. */ int exact_sel(int cmd, dico_key_t key, const char *dict_word) { switch (cmd) { case DICO_SELECT_BEGIN: break; case DICO_SELECT_RUN: return utf8_strcasecmp(key->word, (char*)dict_word) == 0; case DICO_SELECT_END: break; } return 0; } int prefix_sel(int cmd, dico_key_t key, const char *dict_word) { size_t wordlen, keylen; switch (cmd) { case DICO_SELECT_BEGIN: key->call_data = (void*) utf8_strlen(key->word); break; case DICO_SELECT_RUN: keylen = (size_t)key->call_data; wordlen = utf8_strlen(dict_word); return (wordlen >= keylen && utf8_strncasecmp((char*)dict_word, key->word, keylen) == 0); case DICO_SELECT_END: break; } return 0; } struct suffix { size_t charlen; size_t bytelen; }; int suffix_sel(int cmd, dico_key_t key, const char *dict_word) { size_t wordlen; struct suffix *suf; switch (cmd) { case DICO_SELECT_BEGIN: suf = malloc(sizeof(*suf)); if (!suf) { dico_log(L_ERR, ENOMEM, "stdstrat_suffix"); return -1; } suf->bytelen = utf8_strlen(key->word); suf->charlen = strlen(key->word); key->call_data = suf; break; case DICO_SELECT_RUN: suf = (struct suffix*)key->call_data; wordlen = strlen(dict_word); return (wordlen >= suf->bytelen && utf8_strncasecmp((char*)dict_word + (wordlen - suf->bytelen), key->word, suf->bytelen) == 0); case DICO_SELECT_END: free(key->call_data); break; } return 0; } /* Soundex selector */ int soundex_sel(int cmd, dico_key_t key, const char *dict_word) { char dcode[DICO_SOUNDEX_SIZE]; switch (cmd) { case DICO_SELECT_BEGIN: key->call_data = malloc(DICO_SOUNDEX_SIZE); if (!key->call_data) return 1; dico_soundex(key->word, key->call_data); break; case DICO_SELECT_RUN: dico_soundex(dict_word, dcode); return strcmp(dcode, key->call_data) == 0; case DICO_SELECT_END: free(key->call_data); break; } return 0; } void dicod_init_strategies() { static struct dico_strategy defstrat[] = { { "exact", "Match words exactly", exact_sel }, { "prefix", "Match word prefixes", prefix_sel }, { "suffix", "Match word suffixes", suffix_sel }, { "soundex", "Match using SOUNDEX algorithm", soundex_sel, NULL }, }; int i; for (i = 0; i < DICO_ARRAY_SIZE(defstrat); i++) dico_strategy_add(defstrat + i); } void dicod_server_init() { load_modules(); init_databases(); if (!dico_get_default_strategy()) dico_set_default_strategy(DICTD_DEFAULT_STRATEGY); } void dicod_server_cleanup() { dico_iterator_t itr = xdico_list_iterator(database_list); dicod_database_t *dp; for (dp = dico_iterator_first(itr); dp; dp = dico_iterator_next(itr)) { if (dicod_free_database(dp)) dico_log(L_NOTICE, 0, _("error freeing database %s"), dp->name); } dico_iterator_destroy(&itr); } static void log_connection(const char *msg) { if (debug_level) { char *p = sockaddr_to_astr(&client_addr, client_addrlen); if (debug_source_info) DICO_DEBUG_SINFO(debug_stream); stream_writez(debug_stream, msg); dico_stream_write(debug_stream, " ", 1); if (identity_name) stream_printf(debug_stream, "%s@", identity_name); stream_writez(debug_stream, p); dico_stream_write(debug_stream, "\n", 1); free(p); } } static dico_stream_t iostr; void replace_io_stream(dico_stream_t str) { iostr = str; } int dicod_loop(dico_stream_t str) { char *buf = NULL; size_t size = 0; size_t rdbytes; struct dico_tokbuf tb; begin_timing("dicod"); signal(SIGALRM, sig_alarm); got_quit = 0; if (transcript) { dico_stream_t logstr = dico_log_stream_create(L_DEBUG); if (!logstr) xalloc_die(); str = xdico_transcript_stream_create(str, logstr, NULL); } replace_io_stream(str); if (identity_check && server_addr.sa_family == AF_INET) identity_name = query_ident_name((struct sockaddr_in *)&server_addr, (struct sockaddr_in *)&client_addr); log_connection(_("connection from")); open_databases(); check_db_visibility(); initial_banner(iostr); dico_tokenize_begin(&tb); while (!got_quit && get_input_line(iostr, &buf, &size, &rdbytes) == 0) { trimnl(buf, rdbytes); xdico_tokenize_string(&tb, buf); if (tb.tb_tokc == 0) continue; dicod_handle_command(iostr, tb.tb_tokc, tb.tb_tokv); } dico_tokenize_end(&tb); close_databases(); init_auth_data(); access_log_free_cache(); /* FIXME: destroy stream here, or at least do it if transcript is set */ log_connection(_("session finished:")); return 0; } int dicod_inetd() { dico_stream_t str = dicod_iostream(0, 1); if (!str) return 1; client_addrlen = sizeof(client_addr); if (getsockname (0, &client_addr, &client_addrlen) == -1) client_addrlen = 0; server_addrlen = sizeof(server_addr); if (getsockname (1, &server_addr, &server_addrlen) == -1) server_addrlen = 0; return dicod_loop(str); } dico_stream_t dicod_iostream(int ifd, int ofd) { dico_stream_t str = dico_fd_io_stream_create(ifd, ofd); if (!str) return NULL; dico_stream_set_buffer(str, dico_buffer_line, DICO_MAX_BUFFER); if (!isatty(ifd)) { dico_stream_t s = dico_crlf_stream(str, DICO_STREAM_READ|DICO_STREAM_WRITE, 0); if (!s) { dico_stream_destroy(&str); return NULL; } str = s; dico_stream_set_buffer(str, dico_buffer_line, DICO_MAX_BUFFER); } return str; } dico-2.2/dicod/dicod.h000066400000000000000000000245451172612674100146310ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "grecs.h" #include "wordsplit.h" #include #include #include #include #include #define EXIT_TIMEOUT 2 #define UINTMAX_STRSIZE_BOUND INT_BUFSIZE_BOUND(uintmax_t) #if defined HAVE_SYSCONF && defined _SC_OPEN_MAX # define getmaxfd() sysconf(_SC_OPEN_MAX) #elif defined (HAVE_GETDTABLESIZE) # define getmaxfd() getdtablesize() #else # define getmaxfd() 256 #endif extern int mode; extern int foreground; /* Run in foreground mode */ extern int single_process; /* Single process mode */ extern int log_to_stderr; /* Log to stderr */ extern char *config_file; extern int config_lint_option; extern char *pidfile_name; extern dico_list_t listen_addr; extern uid_t user_id; extern gid_t group_id; extern dico_list_t /* of gid_t */ group_list; extern unsigned int max_children; extern unsigned int shutdown_timeout; extern unsigned int inactivity_timeout; extern char *hostname; extern const char *program_version; extern char *initial_banner_text; extern int got_quit; extern char *help_text; extern const char *server_info; extern char *msg_id; extern dico_list_t module_load_path; extern dico_list_t prepend_load_path; extern dico_list_t modinst_list; extern dico_list_t database_list; extern int timing_option; extern char *client_id; extern char *user_name; extern dico_list_t user_groups; extern int transcript; extern char *debug_level_str; extern unsigned long total_forks; extern char *access_log_format; extern char *access_log_file; extern int identity_check; extern char *identity_name; extern char *ident_keyfile; extern long ident_timeout; extern struct sockaddr server_addr; extern socklen_t server_addrlen; extern struct sockaddr client_addr; extern socklen_t client_addrlen; struct dico_stat { unsigned long defines; unsigned long matches; unsigned long compares; }; extern struct dico_stat current_stat, total_stat; #ifndef LOG_FACILITY # define LOG_FACILITY LOG_LOCAL1 #endif #define DICTD_DEFAULT_STRATEGY "lev" #define DICTD_LOGGING_ENVAR "__DICTD_LOGGING__" #define MODE_DAEMON 0 #define MODE_INETD 1 #define MODE_PREPROC 2 struct dicod_conf_override { int transcript; }; void get_options(int argc, char *argv[], struct dicod_conf_override *conf); /* acl.c */ typedef struct dicod_acl *dicod_acl_t; dicod_acl_t dicod_acl_create(const char *name, grecs_locus_t *locus); int dicod_acl_check(dicod_acl_t acl, int res); int parse_acl_line(grecs_locus_t *locus, int allow, dicod_acl_t acl, grecs_value_t *value); int dicod_acl_install(dicod_acl_t acl, grecs_locus_t *locus); dicod_acl_t dicod_acl_lookup(const char *name); extern dicod_acl_t connect_acl; /* */ typedef struct dicod_module_instance { char *ident; char *command; struct dico_database_module *module; lt_dlhandle handle; } dicod_module_instance_t; #define DICOD_DBF_LANG 0x0001 typedef struct dicod_database { int flags; char *name; /* Dictionary name */ char *descr; /* Description (SHOW DB) */ char *info; /* Info (SHOW INFO) */ dico_list_t langlist[2]; /* List of "source/dest" languages */ dicod_acl_t acl; /* ACL for this database */ int visible; /* Result of the last dicod_acl_check */ dico_handle_t mod_handle; /* Dico module handle */ dico_assoc_list_t mime_headers; dicod_module_instance_t *instance; /* Pointer to the module instance structure */ int argc; /* Handler arguments: count */ char **argv; /* ... and pointers */ char *command; /* Handler command line (for diagnostics) */ } dicod_database_t; #define CONTENT_TRANSFER_ENCODING_HEADER "Content-transfer-encoding" /* dicod.c */ void dicod_server(int argc, char **argv); void replace_io_stream(dico_stream_t str); dico_stream_t dicod_iostream(int ifd, int ofd); int dicod_loop(dico_stream_t stream); int dicod_inetd(void); void dicod_init_strategies(void); void dicod_server_init(void); void dicod_server_cleanup(void); int get_input_line(dico_stream_t str, char **buf, size_t *size, size_t *rdbytes); dicod_database_t *find_database(const char *name); void database_remove_dependent(dicod_module_instance_t *inst); void dicod_database_free(dicod_database_t *dp); size_t database_count(void); int database_iterate(dico_list_iterator_t fun, void *data); int show_sys_info_p(void); void dicod_log_setup(void); void dicod_log_pre_setup(void); void dicod_log_encode_envar(void); char *get_full_hostname(void); void check_db_visibility(void); void reset_db_visibility(void); #define database_visible_p(db) ((db)->visible) int dicod_any_lang_list_p(dico_list_t list); typedef void (*dicod_cmd_fn) (dico_stream_t str, int argc, char **argv); struct dicod_command { const char *keyword; int minparam; int maxparam; char *param; char *help; dicod_cmd_fn handler; }; #define DICOD_MAXPARAM_INF (-1) void dicod_handle_command(dico_stream_t str, int argc, char **argv); void dicod_init_command_tab(void); void dicod_add_command(struct dicod_command *cmd); void dicod_remove_command(const char *name); /* capa.c */ void dicod_capa_register(const char *name, struct dicod_command *cmd, int (*init)(void*), void *closure); int dicod_capa_add(const char *name); void dicod_capa_iterate(int (*fun)(const char*, int, void *), void *closure); int dicod_capa_flush(void); /* lang.c */ void register_lang(void); int dicod_lang_check(dico_list_t list[2]); /* mime.c */ void register_mime(void); /* markup.c */ void register_markup(void); void markup_flush_capa(void); /* xidle.c */ void register_xidle(void); /* xversion.c */ void register_xversion(void); /* lev.c */ void register_lev(void); /* regex.c */ void register_regex(void); /* dbtext.c */ struct dico_udb_def text_udb_def; extern dico_udb_t user_db; /* auth.c */ void register_auth(void); void init_auth_data(void); /* loader.c */ void dicod_loader_init(void); int dicod_load_module(dicod_module_instance_t *hptr); int dicod_init_database(dicod_database_t *dp); int dicod_open_database(dicod_database_t *dp); int dicod_close_database(dicod_database_t *dp); int dicod_free_database(dicod_database_t *dp); int dicod_database_get_strats(dicod_database_t *dp); char *dicod_get_database_descr(dicod_database_t *db); void dicod_free_database_descr(dicod_database_t *db, char *descr); char *dicod_get_database_info(dicod_database_t *db); void dicod_free_database_info(dicod_database_t *db, char *info); void dicod_get_database_languages(dicod_database_t *db, dico_list_t list[]); dico_list_t dicod_langlist_copy(dico_list_t src); void dicod_match_word_db(dicod_database_t *db, dico_stream_t stream, const dico_strategy_t strat, const char *word); void dicod_match_word_first(dico_stream_t stream, const dico_strategy_t strat, const char *word); void dicod_match_word_all(dico_stream_t stream, const dico_strategy_t strat, const char *word); void dicod_define_word_db(dicod_database_t *db, dico_stream_t stream, const char *word); void dicod_define_word_first(dico_stream_t stream, const char *word); void dicod_define_word_all(dico_stream_t stream, const char *word); /* ostream.c */ extern off_t total_bytes_out; dico_stream_t dicod_ostream_create(dico_stream_t str, dico_assoc_list_t headers); /* stat.c */ void begin_timing(const char *name); void report_timing(dico_stream_t stream, xdico_timer_t t, struct dico_stat *sp); void report_current_timing(dico_stream_t stream, const char *name); /* xscript.c */ dico_stream_t transcript_stream_create(dico_stream_t transport, dico_stream_t logstr, const char *prefix[]); /* getopt.m4 */ extern void print_help(void); extern void print_usage(void); /* pp.c */ void include_path_setup(void); void add_include_dir(char *dir); int pp_init(const char *name); void pp_done(void); int preprocess_config(const char *extpp); void pp_make_argcv(int *pargc, const char ***pargv); FILE *pp_extrn_start(int argc, const char **argv, pid_t *ppid); void pp_extrn_shutdown(pid_t pid); size_t pp_fill_buffer(char *buf, size_t size); void run_lint(); char *install_text(const char *str); /* accesslog.c */ void access_log_status(const char *first, const char *last); void access_log(int argc, char **argv); void compile_access_log(void); void access_log_free_cache(void); /* ident.c */ char *query_ident_name(struct sockaddr_in *srv_addr, struct sockaddr_in *clt_addr); /* alias.c */ int alias_install(const char *kw, int argc, char **argv, grecs_locus_t *ploc); int alias_expand(int argc, char **argv, int *pargc, char ***pargv); /* gsasl.c */ extern int sasl_enable; extern dico_list_t sasl_enabled_mech; extern dico_list_t sasl_disabled_mech; extern char *sasl_service; extern char *sasl_realm; extern dico_list_t sasl_anon_groups; void register_sasl(void); /* stratcl.c */ enum cmp_op { cmp_eq, cmp_ne, cmp_lt, cmp_le, cmp_gt, cmp_ge }; void stratcl_add_word(dico_list_t list, const char *word); void stratcl_add_cmp(dico_list_t list, enum cmp_op op, size_t len); void stratcl_add_disable(dico_list_t list); int stratcl_check_word(dico_list_t list, const char *word); /* ckpass.c */ int dicod_check_password(const char *db_pass, const char *pass); /* main.c */ void config_help(void); dico-2.2/dicod/gsasl.c000066400000000000000000000220031172612674100146360ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include int sasl_enable = 1; dico_list_t sasl_enabled_mech; dico_list_t sasl_disabled_mech; char *sasl_service; char *sasl_realm; dico_list_t sasl_anon_groups; #ifdef WITH_GSASL #include static Gsasl *ctx; static int cmp_names(const void *item, void *data) { return c_strcasecmp(item, data); } static int disabled_mechanism_p(char *name) { if (sasl_enabled_mech && !_dico_list_locate(sasl_enabled_mech, name, cmp_names)) return 1; return !!_dico_list_locate(sasl_disabled_mech, name, cmp_names); } static void send_challenge(dico_stream_t str, char *data) { if (data[0]) { stream_printf(str, "130 challenge follows\n"); /* FIXME: use dicod_ostream_create */ stream_writez(str, data); stream_writez(str, "\n.\n"); } stream_printf(str, "330 send response\n"); } #define SASLRESP "SASLRESP" static int get_sasl_response(dico_stream_t str, char **pret, char **pbuf, size_t *psize) { char *p; size_t rdbytes; if (get_input_line(str, pbuf, psize, &rdbytes)) return 1; p = *pbuf; rdbytes = dico_trim_nl(p); if (rdbytes >= sizeof(SASLRESP) && memcmp(p, SASLRESP, sizeof(SASLRESP) - 1) == 0 && isspace(p[sizeof(SASLRESP) - 1])) { for (p += sizeof(SASLRESP), rdbytes -= sizeof(SASLRESP); isspace(*p); p++, rdbytes--); if (*p == '"') { /* Simple unquoting */ p++; rdbytes--; p[rdbytes-1] = 0; } *pret = p; return 0; } dico_log(L_ERR, 0, _("Unexpected input instead of SASLRESP command: %s"), *pbuf); return 1; } #define RC_SUCCESS 0 #define RC_FAIL 1 #define RC_NOMECH 2 struct sasl_data { const char *username; int anon; }; static int _append_item (void *item, void *data) { char *copy = xstrdup (item); dico_list_t list = data; xdico_list_append (list, copy); return 0; } static int sasl_auth(dico_stream_t str, char *mechanism, char *initresp, Gsasl_session **psess) { int rc; Gsasl_session *sess_ctx; char *input; char *output; char *inbuf; size_t insize; struct sasl_data sdata = { NULL, 0 }; if (disabled_mechanism_p(mechanism)) return RC_NOMECH; rc = gsasl_server_start (ctx, mechanism, &sess_ctx); if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("SASL gsasl_server_start: %s"), gsasl_strerror(rc)); return rc == GSASL_UNKNOWN_MECHANISM ? RC_NOMECH : RC_FAIL; } gsasl_callback_hook_set(ctx, &sdata); output = NULL; if (initresp) { inbuf = xstrdup(initresp); insize = strlen(initresp) + 1; } else { inbuf = NULL; insize = 0; } input = inbuf; while ((rc = gsasl_step64(sess_ctx, input, &output)) == GSASL_NEEDS_MORE) { send_challenge(str, output); free(output); output = NULL; if (get_sasl_response(str, &input, &inbuf, &insize)) return RC_FAIL; } if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("GSASL error: %s"), gsasl_strerror(rc)); free(output); free(inbuf); gsasl_finish(sess_ctx); return RC_FAIL; } /* Some SASL mechanisms output data when GSASL_OK is returned */ if (output[0]) send_challenge(str, output); free(output); free(inbuf); if (sdata.username == NULL) { dico_log(L_ERR, 0, _("GSASL %s: cannot get username"), mechanism); gsasl_finish(sess_ctx); return RC_FAIL; } user_name = xstrdup(sdata.username); if (sdata.anon) { if (sasl_anon_groups) { user_groups = xdico_list_create(); dico_list_iterate (sasl_anon_groups, _append_item, user_groups); } } else dico_udb_get_groups(user_db, sdata.username, &user_groups); check_db_visibility(); *psess = sess_ctx; return RC_SUCCESS; } static void dicod_saslauth(dico_stream_t str, int argc, char **argv) { int rc; char *resp; Gsasl_session *sess; if (dico_udb_open(user_db)) { dico_log(L_ERR, 0, _("failed to open user database")); stream_writez(str, "531 Access denied, " "use \"SHOW INFO\" for server information\n"); return; } rc = sasl_auth(str, argv[1], argv[2], &sess); dico_udb_close(user_db); switch (rc) { case RC_SUCCESS: resp = "230 Authentication successful"; stream_printf(str, "%s\n", resp); /* FIXME: If insert_gsasl_stream fails, client gets wrong response */ if (insert_gsasl_stream(sess, &str) == 0) { replace_io_stream(str); dicod_remove_command("SASLAUTH"); } return; case RC_FAIL: resp = "531 Access denied, " "use \"SHOW INFO\" for server information"; break; case RC_NOMECH: resp = "532 Access denied, unknown mechanism"; break; } stream_printf(str, "%s\n", resp); } static int cb_validate(Gsasl *ctx, Gsasl_session *sctx) { int rc; struct sasl_data *pdata = gsasl_callback_hook_get(ctx); const char *authid = gsasl_property_get(sctx, GSASL_AUTHID); const char *pass = gsasl_property_get(sctx, GSASL_PASSWORD); char *dbpass; if (!authid) return GSASL_NO_AUTHID; if (!pass) return GSASL_NO_PASSWORD; rc = dico_udb_check_password(user_db, authid, pass); if (rc == ENOSYS) { if (dico_udb_get_password(user_db, authid, &dbpass)) { dico_log(L_ERR, 0, _("failed to get password for `%s' from the database"), authid); return GSASL_AUTHENTICATION_ERROR; } rc = dicod_check_password(dbpass, pass); free(dbpass); } if (rc == 0) { pdata->username = xstrdup(authid); return GSASL_OK; } return GSASL_AUTHENTICATION_ERROR; } static int callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop) { int rc = GSASL_OK; struct sasl_data *pdata; const char *user; char *string; switch (prop) { case GSASL_PASSWORD: pdata = gsasl_callback_hook_get(ctx); user = pdata->username; if (!user) { user = gsasl_property_get(sctx, GSASL_AUTHID); if (!user) { dico_log(L_ERR, 0, _("user name not supplied")); return GSASL_NO_AUTHID; } pdata->username = user; } if (dico_udb_get_password(user_db, user, &string)) { dico_log(L_ERR, 0, _("failed to get password for `%s' from the database"), user); return GSASL_NO_PASSWORD; } gsasl_property_set(sctx, prop, string); free(string); break; case GSASL_SERVICE: gsasl_property_set(sctx, prop, sasl_service); break; case GSASL_REALM: gsasl_property_set(sctx, prop, sasl_realm ? sasl_realm : hostname); break; case GSASL_HOSTNAME: gsasl_property_set(sctx, prop, hostname); break; case GSASL_VALIDATE_SIMPLE: rc = cb_validate(ctx, sctx); break; #if 0 FIXME: case GSASL_VALIDATE_EXTERNAL: case GSASL_VALIDATE_SECURID: #endif case GSASL_VALIDATE_ANONYMOUS: pdata = gsasl_callback_hook_get(ctx); user = gsasl_property_get(sctx, GSASL_ANONYMOUS_TOKEN); pdata->username = user; pdata->anon = 1; break; case GSASL_VALIDATE_GSSAPI: pdata = gsasl_callback_hook_get(ctx); user = gsasl_property_get(sctx, GSASL_AUTHZID); pdata->username = user; break; default: rc = GSASL_NO_CALLBACK; /*dico_log(L_NOTICE, 0, _("Unsupported callback property %d"), prop);*/ break; } return rc; } static int init_sasl_0() { int rc = gsasl_init(&ctx); if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("cannot initialize libgsasl: %s"), gsasl_strerror(rc)); return 1; } gsasl_callback_set(ctx, callback); return 0; } static int init_sasl_1() { static struct dicod_command cmd = { "SASLAUTH", 2, 3, "mechanism [initial-response]", "Start SASL authentication", dicod_saslauth }; static int sasl_initialized; if (!sasl_initialized) { sasl_initialized = 1; dicod_add_command(&cmd); if (!sasl_service) sasl_service = xstrdup ("dico"); } return 0; } void register_sasl() { int rc; char *listmech; struct wordsplit ws; if (!sasl_enable || init_sasl_0()) return; rc = gsasl_server_mechlist(ctx, &listmech); if (rc != GSASL_OK) { dico_log(L_ERR, 0, _("cannot get list of available SASL mechanisms: " "%s"), gsasl_strerror (rc)); return; } if (wordsplit(listmech, &ws, WRDSF_NOVAR | WRDSF_NOCMD | WRDSF_SQUEEZE_DELIMS) == 0) { int i; for (i = 0; i < ws.ws_wordc; i++) { if (!disabled_mechanism_p(ws.ws_wordv[i])) { char *name = xdico_sasl_mech_to_capa(ws.ws_wordv[i]); dicod_capa_register(name, NULL, init_sasl_1, NULL); dicod_capa_add(name); } } wordsplit_free(&ws); } free(listmech); } #else void register_sasl() { /* nothing */ } #endif dico-2.2/dicod/ident.c000066400000000000000000000246631172612674100146460ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include #include #include "des.h" /* IDENT (AUTH, RFC1413) preauth */ #define USERNAME_C "USERID :" /* If the reply matches sscanf expression "%*[^:]: USERID :%*[^:]:%s" return a pointer to the %s part. Otherwise, return NULL. */ static char * ident_extract_username(char *reply) { char *p; p = strchr(reply, ':'); if (!p) return NULL; if (p[1] != ' ' || strncmp(p + 2, USERNAME_C, sizeof(USERNAME_C) - 1)) return NULL; p += 2 + sizeof(USERNAME_C) - 1; p = strchr(p, ':'); if (!p) return NULL; do p++; while (*p == ' '); return p; } static int is_des_p(const char *name) { int len = strlen(name); return len > 1 && name[0] == '[' && name[len-1] == ']'; } #define smask(step) ((1<>step)&smask(step))) #define parity_char(x) pstep(pstep(pstep((x),4),2),1) static void des_fixup_key_parity(unsigned char key[8]) { int i; for (i = 0; i < 8; i++) { key[i] &= 0xfe; key[i] |= 1 ^ parity_char(key[i]); } } static void des_cbc_cksum(gl_des_ctx *ctx, unsigned char *buf, size_t bufsize, unsigned char out[8], unsigned char key[8]) { while (bufsize > 0) { if (bufsize >= 8) { unsigned char *p = key; *p++ ^= *buf++; *p++ ^= *buf++; *p++ ^= *buf++; *p++ ^= *buf++; *p++ ^= *buf++; *p++ ^= *buf++; *p++ ^= *buf++; *p++ ^= *buf++; bufsize -= 8; } else { unsigned char *p = key + bufsize; buf += bufsize; switch (bufsize) { case 7: *--p ^= *--buf; case 6: *--p ^= *--buf; case 5: *--p ^= *--buf; case 4: *--p ^= *--buf; case 3: *--p ^= *--buf; case 2: *--p ^= *--buf; case 1: *--p ^= *--buf; } bufsize = 0; } gl_des_ecb_crypt(ctx, (const char *)key, (char*)key, 0); } } static void des_string_to_key(char *buf, size_t bufsize, unsigned char key[8]) { size_t i; int j; unsigned temp; unsigned char *p; char *p_char; char k_char[64]; gl_des_ctx context; char *pstr; int forward = 1; p_char = k_char; memset(k_char, 0, sizeof(k_char)); /* get next 8 bytes, strip parity, xor */ pstr = buf; for (i = 1; i <= bufsize; i++) { /* get next input key byte */ temp = (unsigned int) *pstr++; /* loop through bits within byte, ignore parity */ for (j = 0; j <= 6; j++) { if (forward) *p_char++ ^= (int) temp & 01; else *--p_char ^= (int) temp & 01; temp = temp >> 1; } while (--j > 0); /* check and flip direction */ if ((i%8) == 0) forward = !forward; } p_char = k_char; p = (unsigned char *) key; for (i = 0; i <= 7; i++) { temp = 0; for (j = 0; j <= 6; j++) temp |= *p_char++ << (1 + j); *p++ = (unsigned char) temp; } des_fixup_key_parity(key); gl_des_setkey(&context, (const char *)key); des_cbc_cksum(&context, (unsigned char*) buf, bufsize, key, key); memset(&context, 0, sizeof context); des_fixup_key_parity(key); } struct ident_info { uint32_t checksum; uint16_t random; uint16_t uid; uint32_t date; uint32_t ip_local; uint32_t ip_remote; uint16_t port_local; uint16_t port_remote; }; union ident_data { struct ident_info fields; unsigned long longs[6]; unsigned char chars[24]; }; int ident_decrypt(const char *file, const char *name, struct ident_info *info) { unsigned char *buf = NULL; size_t size = 0; int fd; char keybuf[1024]; union ident_data id; if (dico_base64_decode((const unsigned char *)(name + 1), strlen(name) - 1, &buf, &size)) return 1; if (size != 24) { dico_log(L_ERR, 0, _("Incorrect length of IDENT DES packet")); free(buf); return 1; } fd = open(file, O_RDONLY); if (fd < 0) { dico_log(L_ERR, errno, _("Cannot open file %s"), file); return 1; } while (read(fd, keybuf, sizeof(keybuf)) == sizeof(keybuf)) { int i; unsigned char key[8]; gl_des_ctx ctx; des_string_to_key(keybuf, sizeof(keybuf), key); gl_des_setkey(&ctx, (const char*) key); memcpy(id.chars, buf, size); gl_des_ecb_decrypt(&ctx, (char *)&id.longs[4], (char *)&id.longs[4]); id.longs[4] ^= id.longs[2]; id.longs[5] ^= id.longs[3]; gl_des_ecb_decrypt(&ctx, (char *)&id.longs[2], (char *)&id.longs[2]); id.longs[2] ^= id.longs[0]; id.longs[3] ^= id.longs[1]; gl_des_ecb_decrypt(&ctx, (char *)&id.longs[0], (char *)&id.longs[0]); for (i = 1; i < 6; i++) id.longs[0] ^= id.longs[i]; if (id.fields.checksum == 0) break; } close(fd); free(buf); if (id.fields.checksum == 0) { memmove(info, &id, sizeof(*info)); return 0; } return 1; } struct io_buffer { size_t size; size_t level; char *buffer; }; static void io_buffer_init(struct io_buffer *iob) { iob->size = 0; iob->level = 0; iob->buffer = NULL; } static void io_buffer_free(struct io_buffer *iob) { free(iob->buffer); } /* Recompute the timeout TVAL taking into account the time elapsed since START */ static int recompute_timeout(struct timeval *start, struct timeval *tval) { struct timeval now, diff; gettimeofday(&now, NULL); timersub(&now, start, &diff); if (timercmp(&diff, tval, <)) { struct timeval tmp; timersub(tval, &diff, &tmp); *tval = tmp; return 0; } return 1; } enum socket_io_retval { socket_io_ok, socket_io_failure, socket_io_connect, socket_io_noreply, socket_io_error, }; enum socket_io_retval socket_io(int fd, int conflag, long timeout, struct io_buffer *inb, struct io_buffer *outb) { struct timeval tval, start; gettimeofday(&start, NULL); for (;;) { int rc; fd_set rd, wr; if (!inb && !outb) return socket_io_ok; FD_ZERO(&rd); FD_ZERO(&wr); if (inb) FD_SET(fd, &rd); if (outb) FD_SET(fd, &wr); tval.tv_sec = timeout; tval.tv_usec = 0; if (recompute_timeout (&start, &tval)) { errno = ETIMEDOUT; return socket_io_noreply; } rc = select(fd + 1, &rd, &wr, NULL, &tval); if (rc == 0) { errno = ETIMEDOUT; return socket_io_noreply; } if (rc == -1 && errno == EINTR) continue; if (rc < 0) return socket_io_failure; if (outb && FD_ISSET(fd, &wr)) { if (!conflag) { int val; socklen_t len = sizeof(val); if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &val, &len)) return socket_io_failure; if (val) { errno = val; return socket_io_connect; } conflag = 1; } rc = write (fd, outb->buffer + outb->level, outb->size - outb->level); if (rc < 1) return socket_io_error; else { outb->level += rc; if (outb->level == outb->size) outb = NULL; } } if (inb && FD_ISSET(fd, &rd)) { if (inb->size == inb->level) { if (inb->size == 0) inb->size = 16; inb->buffer = x2realloc(inb->buffer, &inb->size); } rc = read(fd, inb->buffer + inb->level, inb->size - inb->level); if (rc < 1) return socket_io_error; else { inb->level += rc; if (inb->buffer[inb->level - 1] == '\n') inb = NULL; } } } return socket_io_ok; } char * query_ident_name(struct sockaddr_in *srv_addr, struct sockaddr_in *clt_addr) { int fd; int rc; int conflag; char buf[UINTMAX_STRSIZE_BOUND]; struct sockaddr_in s; struct io_buffer ib, ob; char *name = NULL; RETSIGTYPE (*sighan) (int); enum socket_io_retval retval; fd = socket(PF_INET, SOCK_STREAM, 0); if (fd == -1) { dico_log(L_ERR, errno, _("cannot create socket for AUTH identification")); return NULL; } rc = fcntl(fd, F_GETFL); rc |= O_NONBLOCK; fcntl(fd, F_SETFL, rc); s.sin_family = AF_INET; s.sin_addr.s_addr = srv_addr->sin_addr.s_addr; s.sin_port = 0; if (bind(fd, (struct sockaddr*) &s, sizeof(s)) < 0) { dico_log(L_ERR, errno, _("cannot bind AUTH socket")); close(fd); return NULL; } s = *clt_addr; s.sin_port = htons(113); if (connect(fd, (struct sockaddr*) &s, sizeof(s)) == -1) { if (errno == EINPROGRESS) conflag = 0; else { dico_log(L_ERR, errno, _("cannot connect to AUTH server %s"), inet_ntoa(s.sin_addr)); close(fd); return NULL; } } else conflag = 1; sighan = signal(SIGPIPE, SIG_IGN); io_buffer_init(&ib); io_buffer_init(&ob); asprintf(&ob.buffer, "%u , %u\r\n", ntohs(clt_addr->sin_port), ntohs(srv_addr->sin_port)); ob.size = strlen(ob.buffer); retval = socket_io(fd, conflag, ident_timeout, &ib, &ob); io_buffer_free(&ob); switch (retval) { case socket_io_ok: trimnl(ib.buffer, ib.level); name = ident_extract_username(ib.buffer); if (!name) { dico_log(L_ERR, 0, _("Malformed IDENT response: `%s', from %s"), ib.buffer, inet_ntoa(s.sin_addr)); } else if (is_des_p(name)) { if (!ident_keyfile) { dico_log (L_ERR, 0, _("Keyfile for AUTH responses not specified in " "config; use `ident-keyfile FILE'")); name = NULL; } else { struct ident_info info; if (ident_decrypt(ident_keyfile, name, &info) == 0) name = xstrdup(umaxtostr(ntohs(info.uid), buf)); else name = NULL; } } else name = xstrdup(name); break; case socket_io_failure: dico_log(L_ERR, errno, _("failure while communicating with AUTH server %s"), inet_ntoa(s.sin_addr)); break; case socket_io_connect: dico_log(L_ERR, errno, _("cannot connect to AUTH server %s"), inet_ntoa(s.sin_addr)); break; case socket_io_noreply: dico_log(L_ERR, errno, _("no reply from AUTH server %s"), inet_ntoa(s.sin_addr)); break; case socket_io_error: dico_log(L_ERR, errno, _("I/O error while communicating with AUTH server %s"), inet_ntoa(s.sin_addr)); } io_buffer_free(&ib); return name; } dico-2.2/dicod/lang.c000066400000000000000000000113021172612674100144460ustar00rootroot00000000000000/* This file is part of Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff Dico 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 3, or (at your option) any later version. Dico 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 Dico. If not, see . */ #include dico_list_t dicod_lang_lazy_prefs; dico_list_t dicod_lang_prefs[2]; static int cmp_string_ci(const void *a, void *b) { return c_strcasecmp(a, b); } int dicod_lang_check(dico_list_t list[2]) { if (!list[0] && !list[1]) return 1; if (dicod_lang_lazy_prefs) { if (list[0] && dico_list_intersect_p(dicod_lang_lazy_prefs, list[0], cmp_string_ci)) return 1; if (list[1] && dico_list_intersect_p(dicod_lang_lazy_prefs, list[1], cmp_string_ci)) return 1; return 0; } if (dicod_lang_prefs[0] && list[0] && !dico_list_intersect_p(dicod_lang_prefs[0], list[0], cmp_string_ci)) return 0; if (dicod_lang_prefs[1] && list[1] && !dico_list_intersect_p(dicod_lang_prefs[1], list[1], cmp_string_ci)) return 0; return 1; } void dicod_lang(dico_stream_t str, int argc, char **argv) { dico_list_destroy(&dicod_lang_lazy_prefs); dico_list_destroy(&dicod_lang_prefs[0]); dico_list_destroy(&dicod_lang_prefs[1]); if (argc > 2) { int n = 0; int i; for (i = 2; i < argc; i++) { if (n == 0 && strcmp(argv[i], ":") == 0) n = 1; else { if (!dicod_lang_prefs[n]) { dicod_lang_prefs[n] = xdico_list_create(); dico_list_set_free_item(dicod_lang_prefs[n], dicod_free_item, NULL); } xdico_list_append(dicod_lang_prefs[n], xstrdup(argv[i])); } } if (n == 0) { dicod_lang_lazy_prefs = dicod_lang_prefs[0]; dicod_lang_prefs[0] = NULL; } } check_db_visibility(); stream_writez(str, "250 ok - set language preferences\n"); } static int _display_pref(void *item, void *data) { dico_stream_t str = data; stream_writez(str, " "); stream_writez(str, item); return 0; } static void show_lang_lists(dico_stream_t str, dico_list_t list[2]) { dico_list_iterate(list[0], _display_pref, str); dico_stream_write(str, " :", 2); dico_list_iterate(list[1], _display_pref, str); dico_stream_write(str, "\n", 1); } void dicod_show_lang_pref(dico_stream_t str, int argc, char **argv) { stream_writez(str, "280"); if (dicod_lang_lazy_prefs) { dico_list_iterate(dicod_lang_lazy_prefs, _display_pref, str); dico_stream_write(str, "\n", 1); } else show_lang_lists(str, dicod_lang_prefs); } void dicod_show_lang_info(dico_stream_t str, int argc, char **argv) { dicod_database_t *db = find_database(argv[3]); if (!db) { stream_writez(str, "550 invalid database, use SHOW DB for a list\n"); } else { dico_list_t langlist[2]; dicod_get_database_languages(db, langlist); stream_writez(str, "280"); show_lang_lists(str, langlist); } } static int _show_database_lang(void *item, void *data) { dicod_database_t *db = item; dico_stream_t str = data; dico_list_t langlist[2]; dicod_get_database_languages(db, langlist); stream_printf(str, "%s", db->name); show_lang_lists(str, langlist); return 0; } void dicod_show_lang_db(dico_stream_t str, int argc, char **argv) { size_t count = database_count(); if (count == 0) stream_printf(str, "554 No databases present\n"); else { dico_stream_t ostr; stream_printf(str, "110 %lu databases present\n", (unsigned long) count); ostr = dicod_ostream_create(str, NULL); database_iterate(_show_database_lang, ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); stream_writez(str, ".\n"); stream_writez(str, "250 ok\n"); } } void register_lang() { static struct dicod_command cmd[] = { { "OPTION LANG", 2, DICOD_MAXPARAM_INF, "[list]", "define language preferences", dicod_lang }, { "SHOW LANG DB", 3, 3, NULL, "show databases with their language preferences", dicod_show_lang_db }, { "SHOW LANG DATABASES", 3, 3, NULL, "show databases with their language preferences", dicod_show_lang_db }, { "SHOW LANG INFO", 4, 4, "database", "show language preferences of a database", dicod_show_lang_info }, { "SHOW LANG PREF", 3, 3, NULL, "show server language preferences", dicod_show_lang_pref }, { NULL } }; dicod_capa_register("lang", cmd, NULL, NULL); } dico-2.2/dicod/lev.c000066400000000000000000000045621172612674100143250ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include static int levenshtein_distance = 1; static int lev_sel(int cmd, dico_key_t key, const char *dict_word) { if (cmd == DICO_SELECT_RUN) { int dist = dico_levenshtein_distance(key->word, dict_word, (int)key->strat->closure); if (dist < 0) return 0; return dist <= levenshtein_distance; } return 0; } static struct dico_strategy levstrat[] = { { "lev", "Match headwords within given Levenshtein distance", lev_sel, NULL }, { "nlev", "Match headwords within given Levenshtein distance (normalized)", lev_sel, (void*)DICO_LEV_NORM }, { "dlev", "Match headwords within given Damerau-Levenshtein distance", lev_sel, (void*)DICO_LEV_DAMERAU }, { "ndlev", "Match headwords within given Damerau-Levenshtein distance (normalized)", lev_sel, (void*)(DICO_LEV_NORM|DICO_LEV_DAMERAU) } }; static void dicod_xlevdist(dico_stream_t str, int argc, char **argv) { if (c_strcasecmp(argv[1], "tell") == 0) stream_printf(str, "280 %d\n", levenshtein_distance); else if (isdigit(argv[1][0]) && argv[1][0] != '0' && argv[1][1] == 0) { levenshtein_distance = atoi(argv[1]); stream_printf(str, "250 ok - Levenshtein threshold set to %d\n", levenshtein_distance); } else stream_writez(str, "500 invalid argument\n"); } void register_lev() { int i; static struct dicod_command cmd[] = { { "XLEV", 2, 2, "distance", "Set Levenshtein distance", dicod_xlevdist }, { NULL } }; for (i = 0; i < DICO_ARRAY_SIZE(levstrat); i++) dico_strategy_add(&levstrat[i]); dico_set_default_strategy("nlev"); dicod_capa_register("xlev", cmd, NULL, NULL); } dico-2.2/dicod/lint.c000066400000000000000000000035561172612674100145070ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include struct cmdopt { const char **argv; int argc; }; static int add_i_option(int flag, const char *dir, void *data) { struct cmdopt *cmdopt = data; cmdopt->argv[cmdopt->argc++] = "-I"; cmdopt->argv[cmdopt->argc++] = dir; return 0; } void run_lint() { size_t n; struct cmdopt cmdopt; n = grecs_include_path_count(GRECS_USR_INCLUDE); cmdopt.argc = 10 + 2 * n; cmdopt.argv = xcalloc(cmdopt.argc + 1, sizeof cmdopt.argv[0]); cmdopt.argc = 0; cmdopt.argv[cmdopt.argc++] = dico_invocation_name; cmdopt.argv[cmdopt.argc++] = "--lint"; cmdopt.argv[cmdopt.argc++] = "--preprocessor"; cmdopt.argv[cmdopt.argc++] = grecs_preprocessor; if (log_to_stderr) cmdopt.argv[cmdopt.argc++] = "--stderr"; else dicod_log_encode_envar(); grecs_foreach_include_dir(GRECS_USR_INCLUDE, add_i_option, &cmdopt); cmdopt.argv[cmdopt.argc++] = "--config"; cmdopt.argv[cmdopt.argc++] = config_file; if (debug_level) { cmdopt.argv[cmdopt.argc++] = "--debug"; cmdopt.argv[cmdopt.argc++] = debug_level_str; } cmdopt.argv[cmdopt.argc] = NULL; execv(cmdopt.argv[0], (char**) cmdopt.argv); } dico-2.2/dicod/loader.c000066400000000000000000000367701172612674100150130ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include /* Load path */ static int _add_load_dir (void *item, void *unused) { char *str = item; return lt_dladdsearchdir(str); } void dicod_loader_init() { lt_dlinit(); dico_list_iterate(prepend_load_path, _add_load_dir, NULL); lt_dladdsearchdir(DICO_MODDIR); dico_list_iterate(module_load_path, _add_load_dir, NULL); } #define MODULE_ASSERT(cond) \ if (!(cond)) { \ lt_dlclose(handle); \ dico_log(L_ERR, 0, _("%s: faulty module: (%s) failed"), \ argv[0], \ #cond); \ return 1; \ } static int dicod_load_module0(dicod_module_instance_t *inst, int argc, char **argv) { lt_dlhandle handle = NULL; lt_dladvise advise = NULL; struct dico_database_module *pmod; if (inst->handle) { dico_log(L_ERR, 0, _("module %s already loaded"), argv[0]); return 1; } if (!lt_dladvise_init(&advise) && !lt_dladvise_ext(&advise) && !lt_dladvise_global(&advise)) handle = lt_dlopenadvise(argv[0], advise); lt_dladvise_destroy(&advise); if (!handle) { dico_log(L_ERR, 0, _("cannot load module %s: %s"), argv[0], lt_dlerror()); return 1; } pmod = (struct dico_database_module *) lt_dlsym(handle, "module"); MODULE_ASSERT(pmod); MODULE_ASSERT(pmod->dico_version <= DICO_MODULE_VERSION); if (pmod->dico_capabilities & DICO_CAPA_NODB) { MODULE_ASSERT(pmod->dico_init); } else { MODULE_ASSERT(pmod->dico_init_db); MODULE_ASSERT(pmod->dico_free_db); MODULE_ASSERT(pmod->dico_match); MODULE_ASSERT(pmod->dico_define); MODULE_ASSERT(pmod->dico_output_result); MODULE_ASSERT(pmod->dico_result_count); MODULE_ASSERT(pmod->dico_free_result); if (pmod->dico_open || pmod->dico_close) MODULE_ASSERT(pmod->dico_open && pmod->dico_close); } if (pmod->dico_init && pmod->dico_init(argc, argv)) { lt_dlclose(handle); dico_log(L_ERR, 0, _("%s: initialization failed"), argv[0]); return 1; } inst->handle = handle; inst->module = pmod; return 0; } int dicod_load_module(dicod_module_instance_t *inst) { struct wordsplit ws; int rc; if (wordsplit(inst->command, &ws, WRDSF_DEFFLAGS)) { dico_log(L_ERR, rc, _("cannot parse command line `%s': %s"), inst->command, wordsplit_strerror (&ws)); return 1; } rc = dicod_load_module0(inst, ws.ws_wordc, ws.ws_wordv); wordsplit_free(&ws); return rc; } int dicod_init_database(dicod_database_t *dp) { dicod_module_instance_t *inst = dp->instance; if (inst->module->dico_capabilities & DICO_CAPA_NODB) { dico_log(L_ERR, 0, _("cannot initialize database `%s': " "module `%s' does not support databases"), dp->command, inst->ident); return 1; } if (inst->module->dico_init_db) { dp->mod_handle = inst->module->dico_init_db(dp->name, dp->argc, dp->argv); if (!dp->mod_handle) { dico_log(L_ERR, 0, _("cannot initialize database `%s'"), dp->command); return 1; } } return 0; } int dicod_open_database(dicod_database_t *dp) { dicod_module_instance_t *inst = dp->instance; if (inst->module->dico_open) { if (inst->module->dico_open(dp->mod_handle)) { dico_log(L_ERR, 0, _("cannot open database `%s'"), dp->command); return 1; } } return 0; } int dicod_close_database(dicod_database_t *dp) { int rc = 0; if (dp->mod_handle) { dicod_module_instance_t *inst = dp->instance; if (inst->module->dico_close) rc = inst->module->dico_close(dp->mod_handle); } return rc; } int dicod_free_database(dicod_database_t *dp) { int rc = 0; if (dp->mod_handle) { dicod_module_instance_t *inst = dp->instance; if (inst->module->dico_free_db) { rc = inst->module->dico_free_db(dp->mod_handle); dp->mod_handle = NULL; } } return rc; } char * dicod_get_database_descr(dicod_database_t *db) { if (db->descr) return db->descr; else { dicod_module_instance_t *inst = db->instance; if (inst->module->dico_db_descr) return inst->module->dico_db_descr(db->mod_handle); } return NULL; } void dicod_free_database_descr(dicod_database_t *db, char *descr) { if (descr && descr != db->descr) free(descr); } char * dicod_get_database_info(dicod_database_t *db) { if (db->info) return db->info; else { dicod_module_instance_t *inst = db->instance; if (inst->module->dico_db_info) return inst->module->dico_db_info(db->mod_handle); } return NULL; } void dicod_free_database_info(dicod_database_t *db, char *info) { if (info && info != db->info) free(info); } static int _dup_lang_item(void *item, void *data) { char *lang = item; dico_list_t dst = data; xdico_list_append(dst, xstrdup(lang)); return 0; } dico_list_t dicod_langlist_copy(dico_list_t src) { dico_list_t dst = xdico_list_create(); dico_list_set_free_item(dst, dicod_free_item, NULL); dico_list_iterate(src, _dup_lang_item, dst); return dst; } int dicod_any_lang_list_p(dico_list_t list) { return list == NULL || dico_list_count(list) == 0 || (dico_list_count(list) == 1 && strcmp (dico_list_item(list, 0), "*") == 0); } void dicod_get_database_languages(dicod_database_t *db, dico_list_t dlist[]) { if (!(db->flags & DICOD_DBF_LANG)) { dicod_module_instance_t *inst = db->instance; if (inst->module->dico_db_lang) { /* FIXME: Return code? */ inst->module->dico_db_lang(db->mod_handle, db->langlist); if (db->langlist[0] || db->langlist[1]) { if (!db->langlist[0]) db->langlist[0] = dicod_langlist_copy(db->langlist[1]); else if (!db->langlist[1]) db->langlist[1] = dicod_langlist_copy(db->langlist[0]); } if (dicod_any_lang_list_p(db->langlist[0])) dico_list_destroy(&db->langlist[0]); if (dicod_any_lang_list_p(db->langlist[1])) dico_list_destroy(&db->langlist[1]); } db->flags |= DICOD_DBF_LANG; } dlist[0] = db->langlist[0]; dlist[1] = db->langlist[1]; } static char nomatch[] = "552 No match"; static size_t nomatch_len = (sizeof(nomatch)-1); typedef void (*outproc_t)(dicod_database_t *db, dico_result_t res, const char *word, dico_stream_t stream, void *data, size_t count); void dicod_word_first(dico_stream_t stream, const char *word, const dico_strategy_t strat, const char *begfmt, const char *endmsg, outproc_t proc, void *data, const char *tid) { dicod_database_t *db; dico_iterator_t itr; begin_timing(tid); if (strat && stratcl_check_word(strat->stratcl, word)) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); return; } itr = xdico_list_iterator(database_list); for (db = dico_iterator_first(itr); db; db = dico_iterator_next(itr)) { if (database_visible_p(db)) { struct dico_database_module *mp = db->instance->module; dico_result_t res = strat ? mp->dico_match(db->mod_handle, strat, word) : mp->dico_define(db->mod_handle, word); size_t count; if (!res) continue; count = mp->dico_result_count(res); if (count) { if (strat) current_stat.matches = count; else current_stat.defines = count; if (mp->dico_compare_count) current_stat.compares = mp->dico_compare_count(res); stream_printf(stream, begfmt, (unsigned long) count); proc(db, res, word, stream, data, count); stream_writez(stream, (char*) endmsg); report_current_timing(stream, tid); dico_stream_write(stream, "\n", 1); access_log_status(begfmt, endmsg); mp->dico_free_result(res); break; } else mp->dico_free_result(res); } } dico_iterator_destroy(&itr); if (!db) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); } } struct dbres { dicod_database_t *db; dico_result_t res; size_t count; }; void dicod_word_all(dico_stream_t stream, const char *word, const dico_strategy_t strat, const char *begfmt, const char *endmsg, outproc_t proc, void *data, const char *tid) { dicod_database_t *db; dico_iterator_t itr; dico_list_t reslist = xdico_list_create(); size_t total = 0; struct dbres *rp; begin_timing(tid); if (strat && stratcl_check_word(strat->stratcl, word)) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); return; } itr = xdico_list_iterator(database_list); for (db = dico_iterator_first(itr); db; db = dico_iterator_next(itr)) { if (database_visible_p(db)) { struct dico_database_module *mp = db->instance->module; dico_result_t res = strat ? mp->dico_match(db->mod_handle, strat, word) : mp->dico_define(db->mod_handle, word); size_t count; if (!res) continue; count = mp->dico_result_count(res); if (!count) { mp->dico_free_result(res); continue; } total += count; if (mp->dico_compare_count) current_stat.compares += mp->dico_compare_count(res); rp = xmalloc(sizeof(*rp)); rp->db = db; rp->res = res; rp->count = count; xdico_list_append(reslist, rp); } } dico_iterator_destroy(&itr); if (total == 0) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); } else { itr = xdico_list_iterator(reslist); if (strat) current_stat.matches = total; else current_stat.defines = total; stream_printf(stream, begfmt, (unsigned long) total); for (rp = dico_iterator_first(itr); rp; rp = dico_iterator_next(itr)) { proc(rp->db, rp->res, word, stream, data, rp->count); rp->db->instance->module->dico_free_result(rp->res); free(rp); } stream_writez(stream, (char*) endmsg); report_current_timing(stream, tid); dico_stream_write(stream, "\n", 1); dico_iterator_destroy(&itr); access_log_status(begfmt, endmsg); } dico_list_destroy(&reslist); } static void print_matches(dicod_database_t *db, dico_result_t res, const char *word, dico_stream_t stream, void *data, size_t count) { size_t i; struct dico_database_module *mp = db->instance->module; dico_stream_t ostr = data; for (i = 0; i < count; i++) { stream_writez(ostr, db->name); dico_stream_write(ostr, " \"", 2); mp->dico_output_result(res, i, ostr); dico_stream_write(ostr, "\"\n", 2); } } void dicod_match_word_db(dicod_database_t *db, dico_stream_t stream, const dico_strategy_t strat, const char *word) { struct dico_database_module *mp = db->instance->module; dico_result_t res; size_t count; begin_timing("match"); res = mp->dico_match(db->mod_handle, strat, word); if (!res) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); return; } count = mp->dico_result_count(res); if (count == 0) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); } else { dico_stream_t ostr; current_stat.matches = count; if (mp->dico_compare_count) current_stat.compares = mp->dico_compare_count(res); stream_printf(stream, "152 %lu matches found: list follows\n", (unsigned long) count); ostr = dicod_ostream_create(stream, NULL); print_matches(db, res, word, stream, ostr, count); total_bytes_out += dico_stream_bytes_out(ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); dico_stream_write(stream, ".\n", 2); stream_writez(stream, "250 Command complete"); report_current_timing(stream, "match"); dico_stream_write(stream, "\n", 1); access_log_status("152", "250"); } mp->dico_free_result(res); } void dicod_match_word_first(dico_stream_t stream, const dico_strategy_t strat, const char *word) { dico_stream_t ostr = dicod_ostream_create(stream, NULL); dicod_word_first(stream, word, strat, "152 %lu matches found: list follows\n", ".\n250 Command complete", print_matches, ostr, "match"); total_bytes_out += dico_stream_bytes_out(ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); } void dicod_match_word_all(dico_stream_t stream, const dico_strategy_t strat, const char *word) { dico_stream_t ostr = dicod_ostream_create(stream, NULL); dicod_word_all(stream, word, strat, "152 %lu matches found: list follows\n", ".\n250 Command complete", print_matches, ostr, "match"); total_bytes_out += dico_stream_bytes_out(ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); } static void print_definitions(dicod_database_t *db, dico_result_t res, const char *word, dico_stream_t stream, void *data, size_t count) { size_t i; char *descr = dicod_get_database_descr(db); struct dico_database_module *mp = db->instance->module; for (i = 0; i < count; i++) { dico_stream_t ostr; dico_assoc_list_t hdr = NULL; stream_printf(stream, "151 \"%s\" %s \"%s\"\n", word, db->name, descr ? descr : ""); if (mp->dico_result_headers) { if (db->mime_headers) hdr = dico_assoc_dup(db->mime_headers); else dico_header_parse(&hdr, NULL); mp->dico_result_headers(res, hdr); ostr = dicod_ostream_create(stream, hdr); } else ostr = dicod_ostream_create(stream, db->mime_headers); mp->dico_output_result(res, i, ostr); total_bytes_out += dico_stream_bytes_out(ostr); dico_stream_close(ostr); dico_stream_destroy(&ostr); dico_stream_write(stream, "\n.\n", 3); dico_assoc_destroy(&hdr); } dicod_free_database_descr(db, descr); } void dicod_define_word_db(dicod_database_t *db, dico_stream_t stream, const char *word) { struct dico_database_module *mp = db->instance->module; dico_result_t res; size_t count; begin_timing("define"); res = mp->dico_define(db->mod_handle, word); if (!res) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); return; } count = mp->dico_result_count(res); if (count == 0) { access_log_status(nomatch, nomatch); dico_stream_writeln(stream, nomatch, nomatch_len); } else { current_stat.defines = count; if (mp->dico_compare_count) current_stat.compares = mp->dico_compare_count(res); stream_printf(stream, "150 %lu definitions found: list follows\n", (unsigned long) count); print_definitions(db, res, word, stream, NULL, count); stream_writez(stream, "250 Command complete"); report_current_timing(stream, "define"); dico_stream_write(stream, "\n", 1); access_log_status("150", "250"); } mp->dico_free_result(res); } void dicod_define_word_first(dico_stream_t stream, const char *word) { dicod_word_first(stream, word, NULL, "150 %lu definitions found: list follows\n", "250 Command complete", print_definitions, NULL, "define"); } void dicod_define_word_all(dico_stream_t stream, const char *word) { dicod_word_all(stream, word, NULL, "150 %lu definitions found: list follows\n", "250 Command complete", print_definitions, NULL, "define"); } dico-2.2/dicod/main.c000066400000000000000000001277301172612674100144660ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include int foreground; /* Run in foreground mode */ int single_process; /* Single process mode */ /* Location of the default configuration file */ char *config_file = SYSCONFIG "/dicod.conf" ; int config_lint_option; /* Check configuration file syntax and exit. */ /* Location of the pidfile */ char *pidfile_name = LOCALSTATEDIR "/run/dicod.pid"; /* Operation mode */ int mode = MODE_DAEMON; /* Debug verbosity level */ int debug_level; char *debug_level_str; int debug_source_info; dico_stream_t debug_stream; /* Maximum number of children in allowed in daemon mode. */ unsigned int max_children = 64; /* Wait this number of seconds for all subprocesses to terminate. */ unsigned int shutdown_timeout = 5; /* Inactivity timeout */ unsigned int inactivity_timeout = 0; /* Syslog parameters: */ int log_to_stderr; /* Log to stderr */ const char *log_tag; int log_facility = LOG_FACILITY; int log_print_severity; int transcript; /* Server information (for SHOW INFO command) */ const char *server_info; dicod_acl_t show_sys_info; /* This host name */ char *hostname; /* Text of initial banner. By default == program_version */ char *initial_banner_text; /* Alternative help text. Default - see dicod_help (commands.c) */ char *help_text; /* List of sockets to listen on for the requests */ dico_list_t /* of struct sockaddr */ listen_addr; /* User database for AUTH */ dico_udb_t user_db; /* Run as this user */ uid_t user_id; gid_t group_id; /* Retain these supplementary groups when switching to the user privileges. */ dico_list_t /* of gid_t */ group_list; /* List of directories to search for handler modules. */ dico_list_t /* of char * */ module_load_path; dico_list_t /* of char * */ prepend_load_path; /* List of configured database module instances */ dico_list_t /* of dicod_module_instance_t */ modinst_list; /* List of configured dictionaries */ dico_list_t /* of dicod_database_t */ database_list; /* Global Dictionary ACL */ dicod_acl_t global_acl; /* ACL for incoming connections */ dicod_acl_t connect_acl; /* From CLIENT command: */ char *client_id; /* In authenticated state: */ char *user_name; /* User name */ dico_list_t /* of char * */ user_groups; /* List of groups he is member of */ /* Information from AUTH check: */ int identity_check; /* Enable identity check */ char *identity_name; /* Name received from AUTH query. */ char *ident_keyfile; /* Keyfile for decrypting AUTH replies. */ long ident_timeout = 3; /* Timeout for AUTH I/O */ /* Provide timing information */ int timing_option; /* Name of the default strategy */ const char *default_strategy_name; typedef int (*grecs_list_iterator_t)(grecs_value_t *, void *); void grecs_list_iterate(struct grecs_list *list, grecs_list_iterator_t fun, void *data) { struct grecs_list_entry *ep; for (ep = list->head; ep; ep = ep->next) { grecs_value_t *vp = ep->data; if (fun(vp, data)) break; } } /* Configuration */ int cb_dico_list(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dico_list_t *plist = varptr, list; if (*plist) list = *plist; else { list = xdico_list_create(); dico_list_set_free_item(list, dicod_free_item, NULL); *plist = list; } switch (value->type) { case GRECS_TYPE_STRING: xdico_list_append(list, xstrdup(value->v.string)); break; case GRECS_TYPE_LIST: { struct grecs_list_entry *ep; for (ep = value->v.list->head; ep; ep = ep->next) { const grecs_value_t *vp = ep->data; if (vp->type != GRECS_TYPE_STRING) { grecs_error(&vp->locus, 0, _("list element must be a string")); return 1; } xdico_list_append(list, xstrdup(vp->v.string)); } break; } case GRECS_TYPE_ARRAY: grecs_error(locus, 0, _("too many arguments")); return 1; } return 0; } int cb_dico_sockaddr_list(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dico_list_t *plist = varptr, list; struct grecs_sockaddr *sp; if (*plist) list = *plist; else { list = xdico_list_create(); //FIXME dico_list_set_free_item(list, dicod_free_item, NULL); *plist = list; } switch (value->type) { case GRECS_TYPE_STRING: sp = xmalloc(sizeof(*sp)); if (grecs_string_convert(sp, grecs_type_sockaddr, value->v.string, locus)) { free(sp); return 1; } xdico_list_append(list, sp); break; case GRECS_TYPE_LIST: { struct grecs_list_entry *ep; for (ep = value->v.list->head; ep; ep = ep->next) { const grecs_value_t *vp = ep->data; if (vp->type != GRECS_TYPE_STRING) { grecs_error(&vp->locus, 0, _("list element must be a socket specification")); return 1; } sp = xmalloc(sizeof(*sp)); if (grecs_string_convert(sp, grecs_type_sockaddr, vp->v.string, &vp->locus)) { free(sp); return 1; } xdico_list_append(list, sp); } break; } case GRECS_TYPE_ARRAY: grecs_error(locus, 0, _("too many arguments")); return 1; } return 0; } int allow_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dicod_acl_t acl = varptr; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } parse_acl_line(locus, 1, acl, value); return 0; } int deny_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dicod_acl_t acl = varptr; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } parse_acl_line(locus, 0, acl, value); return 0; } int acl_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { void **pdata = cb_data; dicod_acl_t acl; switch (cmd) { case grecs_callback_section_begin: if (value->type != GRECS_TYPE_STRING) grecs_error(locus, 0, _("ACL name must be a string")); else if (!value->v.string) grecs_error(locus, 0, _("missing ACL name")); else { grecs_locus_t defn_loc; acl = dicod_acl_create(value->v.string, locus); if (dicod_acl_install(acl, &defn_loc)) { grecs_error(locus, 0, _("redefinition of ACL %s"), value->v.string); grecs_error(&defn_loc, 0, _("location of the previous definition")); return 1; } *pdata = acl; } break; case grecs_callback_section_end: case grecs_callback_set_value: break; } return 0; } struct grecs_keyword kwd_acl[] = { { "allow", N_("[all|authenticated|group ] [from ]"), N_("Allow access"), grecs_type_string, GRECS_DFLT, NULL, 0, allow_cb }, { "deny", N_("[all|authenticated|group ] [from ]"), N_("Deny access"), grecs_type_string, GRECS_DFLT, NULL, 0, deny_cb }, { NULL } }; int apply_acl_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dicod_acl_t *pacl = varptr; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("expected scalar value")); return 1; } if ((*pacl = dicod_acl_lookup(value->v.string)) == NULL) { grecs_error(locus, 0, _("no such ACL: `%s'"), value->v.string); return 1; } return 0; } int set_user(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { struct passwd *pw; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("expected scalar value but found list")); return 1; } pw = getpwnam(value->v.string); if (!pw) { grecs_error(locus, 0, _("%s: no such user"), value->v.string); return 1; } user_id = pw->pw_uid; group_id = pw->pw_gid; return 0; } static int set_supp_group(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data); static int set_supp_group_iter(grecs_value_t *value, void *data) { return set_supp_group(grecs_callback_set_value, &value->locus, NULL, value, NULL); } static int set_supp_group(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (!group_list) group_list = xdico_list_create(); if (value->type == GRECS_TYPE_LIST) grecs_list_iterate(value->v.list, set_supp_group_iter, NULL); else { struct group *group = getgrnam(value->v.string); if (group) xdico_list_append(group_list, (void*)group->gr_gid); else { grecs_error(locus, 0, _("%s: unknown group"), value->v.string); return 1; } } return 0; } int set_mode(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { static struct xlat_tab tab[] = { { "daemon", MODE_DAEMON }, { "inetd", MODE_INETD }, { NULL } }; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("expected scalar value but found list")); return 1; } if (xlat_c_string(tab, value->v.string, 0, &mode)) { grecs_error(locus, 0, _("unknown mode")); return 1; } return 0; } static struct xlat_tab syslog_facility_tab[] = { { "USER", LOG_USER }, { "DAEMON", LOG_DAEMON }, { "AUTH", LOG_AUTH }, { "AUTHPRIV",LOG_AUTHPRIV }, { "MAIL", LOG_MAIL }, { "CRON", LOG_CRON }, { "LOCAL0", LOG_LOCAL0 }, { "LOCAL1", LOG_LOCAL1 }, { "LOCAL2", LOG_LOCAL2 }, { "LOCAL3", LOG_LOCAL3 }, { "LOCAL4", LOG_LOCAL4 }, { "LOCAL5", LOG_LOCAL5 }, { "LOCAL6", LOG_LOCAL6 }, { "LOCAL7", LOG_LOCAL7 }, { NULL } }; int set_log_facility(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { const char *str; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("expected scalar value but found list")); return 1; } str = value->v.string; if (strncasecmp (str, "LOG_", 4) == 0) str += 4; if (xlat_c_string(syslog_facility_tab, str, XLAT_ICASE, &log_facility)) { grecs_error(locus, 0, _("unknown syslog facility")); return 1; } return 0; } static int cmp_modinst_ident(const void *item, void *data) { const dicod_module_instance_t *inst = item; if (!inst->ident) return 1; return strcmp(inst->ident, (const char*)data); } static int _add_simple_module(grecs_value_t *value, void *unused_data) { if (value->type != GRECS_TYPE_STRING) grecs_error(&value->locus, 0, _("tag must be a string")); else if (value->v.string == NULL) grecs_error(&value->locus, 0, _("missing tag")); else { dicod_module_instance_t *inst = xzalloc(sizeof(*inst)); inst->ident = xstrdup(value->v.string); inst->command = xstrdup(value->v.string); xdico_list_append(modinst_list, inst); } return 0; } int load_module_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dicod_module_instance_t *inst; void **pdata = cb_data; if (!modinst_list) { modinst_list = xdico_list_create(); dico_list_set_comparator(modinst_list, cmp_modinst_ident); } switch (cmd) { case grecs_callback_section_begin: inst = xzalloc(sizeof(*inst)); if (value->type != GRECS_TYPE_STRING) grecs_error(locus, 0, _("tag must be a string")); else if (value->v.string == NULL) grecs_error(locus, 0, _("missing tag")); else inst->ident = xstrdup(value->v.string); *pdata = inst; break; case grecs_callback_section_end: inst = *pdata; xdico_list_append(modinst_list, inst); *pdata = NULL; break; case grecs_callback_set_value: switch (value->type) { case GRECS_TYPE_STRING: _add_simple_module(value, NULL); break; case GRECS_TYPE_LIST: grecs_list_iterate(value->v.list, _add_simple_module, NULL); break; case GRECS_TYPE_ARRAY: grecs_error(locus, 0, _("too many arguments")); } } return 0; } static int cmp_database_name(const void *item, void *data) { const dicod_database_t *db = item; int rc; if (!db->name) return 1; rc = strcmp(db->name, (const char*)data); if (rc == 0 && !database_visible_p(db)) rc = 1; return rc; } static int set_database(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dicod_database_t *dict; void **pdata = cb_data; switch (cmd) { case grecs_callback_section_begin: dict = xzalloc(sizeof(*dict)); *pdata = dict; break; case grecs_callback_section_end: dict = *pdata; if (!dict->name) { grecs_error(locus, 0, _("database name not supplied")); break; } if (!database_list) { database_list = xdico_list_create(); dico_list_set_comparator (database_list, cmp_database_name); } if (dict->langlist[0] || dict->langlist[1]) /* Prevent dico_db_lang from being called */ dict->flags |= DICOD_DBF_LANG; xdico_list_append(database_list, dict); *pdata = NULL; break; case grecs_callback_set_value: grecs_error(locus, 0, _("invalid use of block statement")); } return 0; } int set_dict_handler(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dicod_module_instance_t *inst; dicod_database_t *db = varptr; int rc; struct wordsplit ws; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("expected scalar value but found list")); return 1; } if (wordsplit(value->v.string, &ws, WRDSF_DEFFLAGS)) { grecs_error(locus, rc, _("cannot parse command line `%s': %s"), value->v.string, wordsplit_strerror (&ws)); dicod_database_free(db); return 1; } db->argc = ws.ws_wordc; db->argv = ws.ws_wordv; db->command = db->argv[0]; ws.ws_wordc = 0; ws.ws_wordv = NULL; wordsplit_free (&ws); inst = dico_list_locate(modinst_list, db->argv[0]); if (!inst) { grecs_error(locus, 0, _("%s: handler not declared"), db->argv[0]); /* FIXME: Free memory */ return 1; } db->instance = inst; return 0; } int enable_capability(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data); int set_capability(grecs_value_t *value, void *data) { return enable_capability(grecs_callback_set_value, &value->locus, NULL, value, NULL); } int enable_capability(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type == GRECS_TYPE_LIST) grecs_list_iterate(value->v.list, set_capability, locus); else if (dicod_capa_add(value->v.string)) grecs_error(locus, 0, _("unknown capability: %s"), value->v.string); return 0; } int mime_headers_cb (enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { dico_assoc_list_t *pasc = varptr; const char *enc; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("expected scalar value")); return 1; } if (dico_header_parse(pasc, value->v.string)) grecs_error(locus, 0, _("cannot parse headers: %s"), strerror(errno)); if (enc = dico_assoc_find(*pasc, CONTENT_TRANSFER_ENCODING_HEADER)) { if (!(strcmp(enc, "quoted-printable") == 0 || strcmp(enc, "base64") == 0 || strcmp(enc, "8bit") == 0)) grecs_error(locus, 0, _("unknown encoding type: %s"), enc); } return 0; } struct grecs_keyword kwd_load_module[] = { { "command", N_("arg"), N_("Command line."), grecs_type_string, GRECS_DFLT, NULL, offsetof(dicod_module_instance_t, command) }, { NULL } }; struct grecs_keyword kwd_database[] = { { "name", N_("word"), N_("Dictionary name (a single word)."), grecs_type_string, GRECS_DFLT, NULL, offsetof(dicod_database_t, name) }, { "description", N_("arg"), N_("Short description, to be shown in reply to SHOW DB command."), grecs_type_string, GRECS_DFLT, NULL, offsetof(dicod_database_t, descr) }, { "info", N_("arg"), N_("Full description of the database, to be shown in reply to " "SHOW INFO command."), grecs_type_string, GRECS_DFLT, NULL, offsetof(dicod_database_t, info) }, { "languages-from", N_("arg"), N_("List of languages this database translates from."), grecs_type_string, GRECS_LIST, NULL, offsetof(dicod_database_t, langlist[0]), cb_dico_list }, { "languages-to", N_("arg"), N_("List of languages this database translates to."), grecs_type_string, GRECS_LIST, NULL, offsetof(dicod_database_t, langlist[1]), cb_dico_list }, { "handler", N_("name"), N_("Name of the handler for this database."), grecs_type_string, GRECS_DFLT, NULL, 0, set_dict_handler }, { "visibility-acl", N_("arg: acl"), N_("ACL controlling visibility of this database"), grecs_type_string, GRECS_DFLT, NULL, offsetof(dicod_database_t, acl), apply_acl_cb }, { "mime-headers", N_("text"), N_("Additional MIME headers"), grecs_type_string, GRECS_DFLT, NULL, offsetof(dicod_database_t, mime_headers), mime_headers_cb }, { NULL } }; struct user_db_conf { grecs_locus_t locus; char *url; char *get_pw; char *get_groups; char *options; }; struct user_db_conf user_db_cfg; struct grecs_keyword kwd_user_db[] = { { "password-resource", N_("arg"), N_("Password file or query."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct user_db_conf, get_pw) }, { "group-resource", N_("arg"), N_("File containing user group information or a query to retrieve it."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct user_db_conf, get_groups) }, { "options", N_("arg"), N_("Implementation-dependent options"), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct user_db_conf, options) }, { NULL } }; int user_db_config(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { struct user_db_conf *cfg = varptr; void **pdata = cb_data; switch (cmd) { case grecs_callback_section_begin: cfg->locus = *locus; cfg->locus.beg.file = xstrdup(cfg->locus.beg.file); cfg->locus.end.file = xstrdup(cfg->locus.end.file); if (value->type != GRECS_TYPE_STRING) grecs_error(locus, 0, _("URL must be a string")); else if (!value->v.string) grecs_error(locus, 0, _("empty URL")); else cfg->url = xstrdup(value->v.string); *pdata = cfg; break; case grecs_callback_section_end: break; case grecs_callback_set_value: cfg->locus = *locus; cfg->locus.beg.file = xstrdup(cfg->locus.beg.file); cfg->locus.end.file = xstrdup(cfg->locus.end.file); if (value->type != GRECS_TYPE_STRING) grecs_error(locus, 0, _("URL must be a string")); else if (!value->v.string) grecs_error(locus, 0, _("empty URL")); cfg->url = xstrdup(value->v.string); } return 0; } static void init_user_db() { if (!user_db_cfg.url) sasl_enable = 0; else if (dico_udb_create(&user_db, user_db_cfg.url, user_db_cfg.get_pw, user_db_cfg.get_groups, user_db_cfg.options)) { grecs_error(&user_db_cfg.locus, errno, _("cannot create user database")); sasl_enable = 0; } } int alias_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { char **argv; int argc; int i; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type != GRECS_TYPE_ARRAY) { grecs_error(locus, 0, _("Not enough arguments for alias")); return 1; } argc = value->v.arg.c - 1; argv = xcalloc(argc + 1, sizeof(argv[0])); for (i = 0; i < argc; i++) { if (value->v.arg.v[i+1]->type != GRECS_TYPE_STRING) { grecs_error(locus, 0, _("argument %d has wrong type"), i+1); return 1; } argv[i] = xstrdup(value->v.arg.v[i+1]->v.string); } argv[i] = NULL; return alias_install(value->v.arg.v[0]->v.string, argc, argv, locus); } #ifdef WITH_GSASL int sasl_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { if (cmd == grecs_callback_set_value) { if (value->type != GRECS_TYPE_STRING) grecs_error(locus, 0, _("expected boolean value but found list")); else grecs_string_convert(&sasl_enable, grecs_type_bool, value->v.string, locus); } return 0; } struct grecs_keyword kwd_sasl[] = { { "disable-mechanism", N_("mech: list"), N_("Disable SASL mechanisms listed in ."), grecs_type_string, GRECS_LIST, &sasl_disabled_mech, 0, cb_dico_list}, { "enable-mechanism", N_("mech: list"), N_("Enable SASL mechanisms listed in ."), grecs_type_string, GRECS_LIST, &sasl_enabled_mech, 0, cb_dico_list}, { "service", N_("name"), N_("Set service name for GSSAPI and Kerberos."), grecs_type_string, GRECS_DFLT, &sasl_service }, { "realm", N_("name"), N_("Set realm name for GSSAPI and Kerberos."), grecs_type_string, GRECS_DFLT, &sasl_realm }, { "anon-group", N_("arg"), N_("Define groups for anonymous users."), grecs_type_string, GRECS_LIST, &sasl_anon_groups, 0, cb_dico_list }, { NULL } }; #endif static dico_list_t strat_forward; static int flush_strat_forward_fn(void *item, void *data) { dico_strategy_t strat = item; dico_strategy_t p = dico_list_locate(strat_forward, strat->name); if (p && p->stratcl) { strat->stratcl = p->stratcl; p->stratcl = NULL; } return 0; } void flush_strat_forward() { dico_strategy_iterate(flush_strat_forward_fn, NULL); dico_list_destroy(&strat_forward); } int strategy_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { void **pdata = cb_data; switch (cmd) { case grecs_callback_section_begin: if (value->type != GRECS_TYPE_STRING) grecs_error(locus, 0, _("Section name must be a string")); else if (!value->v.string) grecs_error(locus, 0, _("missing section name")); else { dico_strategy_t strat = dico_list_locate(strat_forward, (void*)value->v.string); if (!strat) { strat = dico_strategy_create(value->v.string, ""); strat->stratcl = xdico_list_create(); if (!strat_forward) { strat_forward = xdico_list_create(); dico_list_set_comparator (strat_forward, dico_strat_name_cmp); dico_list_set_free_item(strat_forward, dico_strat_free, NULL); } xdico_list_append(strat_forward, strat); } *pdata = strat; } break; case grecs_callback_section_end: break; case grecs_callback_set_value: grecs_error(locus, 0, _("Unexpected statement")); } return 0; } int strategy_deny_all_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { int bool; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } if (value->type == GRECS_TYPE_STRING && grecs_string_convert(&bool, grecs_type_bool, value->v.string, locus) == 0) { if (bool) stratcl_add_disable(*(dico_list_t*) varptr); } else grecs_error(locus, 0, _("Expected boolean value")); return 0; } struct compile_pattern_closure { dico_list_t list; }; static int add_deny_word(grecs_value_t *val, void *data) { struct compile_pattern_closure *cpc = data; if (val->type != GRECS_TYPE_STRING) { grecs_error(&val->locus, 0, _("Expected string value")); return 1; } stratcl_add_word(cpc->list, val->v.string); return 0; } int strategy_deny_word_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { struct compile_pattern_closure cpc; if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 1; } cpc.list = *(dico_list_t*) varptr; if (value->type == GRECS_TYPE_LIST) grecs_list_iterate(value->v.list, add_deny_word, &cpc); else if (value->type == GRECS_TYPE_STRING) add_deny_word(value, &cpc); else grecs_error(locus, 0, _("expected list or string")); return 0; } int strategy_deny_length(enum grecs_callback_command cmd, grecs_locus_t *locus, dico_list_t list, grecs_value_t *value, enum cmp_op op) { if (cmd != grecs_callback_set_value) { grecs_error(locus, 0, _("Unexpected block statement")); return 0; } if (value->type == GRECS_TYPE_STRING) { size_t val; if (grecs_string_convert(&val, grecs_type_size, value->v.string, locus)) return 0; stratcl_add_cmp(list, op, val); } else grecs_error(locus, 0, _("Expected number")); return 0; } int strategy_deny_length_lt_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { return strategy_deny_length(cmd, locus, *(dico_list_t*) varptr, value, cmp_lt); } int strategy_deny_length_le_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { return strategy_deny_length(cmd, locus, *(dico_list_t*) varptr, value, cmp_le); } int strategy_deny_length_gt_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { return strategy_deny_length(cmd, locus, *(dico_list_t*) varptr, value, cmp_gt); } int strategy_deny_length_ge_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { return strategy_deny_length(cmd, locus, *(dico_list_t*) varptr, value, cmp_ge); } int strategy_deny_length_eq_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { return strategy_deny_length(cmd, locus, *(dico_list_t*) varptr, value, cmp_eq); } int strategy_deny_length_ne_cb(enum grecs_callback_command cmd, grecs_locus_t *locus, void *varptr, grecs_value_t *value, void *cb_data) { return strategy_deny_length(cmd, locus, *(dico_list_t*) varptr, value, cmp_ne); } struct grecs_keyword kwd_strategy[] = { { "deny-all", N_("arg: bool"), N_("Deny all * and ! look ups"), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_all_cb }, { "deny-word", N_("cond"), N_("Deny * and ! look-ups on these words."), grecs_type_string, GRECS_LIST, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_word_cb, }, { "deny-length-lt", N_("len: number"), N_("Deny * and ! look-ups on words with length < ."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_length_lt_cb, }, { "deny-length-le", N_("len: number"), N_("Deny * and ! look-ups on words with length <= ."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_length_le_cb, }, { "deny-length-gt", N_("len: number"), N_("Deny * and ! look-ups on words with length > ."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_length_gt_cb, }, { "deny-length-ge", N_("len: number"), N_("Deny * and ! look-ups on words with length >= ."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_length_ge_cb, }, { "deny-length-eq", N_("len: number"), N_("Deny * and ! look-ups on words with length == ."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_length_eq_cb, }, { "deny-length-ne", N_("len: number"), N_("Deny * and ! look-ups on words with length != ."), grecs_type_string, GRECS_DFLT, NULL, offsetof(struct dico_strategy, stratcl), strategy_deny_length_ne_cb, }, { NULL } }; struct grecs_keyword keywords[] = { { "user", N_("name"), N_("Run with these user privileges."), grecs_type_string, GRECS_DFLT, NULL, 0, set_user }, { "group", N_("name"), N_("Supplementary group to retain with the user privileges."), grecs_type_string, GRECS_DFLT, NULL, 0, set_supp_group }, { "mode", N_("arg: [daemon|inetd]"), N_("Operation mode."), grecs_type_string, GRECS_DFLT, NULL, 0, set_mode }, { "server-info", N_("text"), N_("Server description to be shown in reply to SHOW SERVER command."), grecs_type_string, GRECS_DFLT, &server_info, }, { "show-sys-info", N_("arg: acl"), N_("Show system information if arg matches."), grecs_type_string, GRECS_DFLT, &show_sys_info, 0, apply_acl_cb }, { "identity-check", N_("arg"), N_("Enable identification check using AUTH protocol (RFC 1413)"), grecs_type_bool, GRECS_DFLT, &identity_check }, { "ident-timeout", N_("val"), N_("Set timeout for AUTH I/O operations."), grecs_type_long, GRECS_DFLT, &ident_timeout }, { "ident-keyfile", N_("name"), N_("Name of the file containing the keys for decrypting AUTH replies."), grecs_type_string, GRECS_DFLT, &ident_keyfile }, { "max-children", N_("arg"), N_("Maximum number of children running simultaneously."), grecs_type_uint, GRECS_DFLT, &max_children, 0 }, { "log-tag", N_("arg"), N_("Tag syslog diagnostics with this tag."), grecs_type_string, GRECS_DFLT, &log_tag, 0 }, { "log-facility", N_("arg"), N_("Set syslog facility. Arg is one of the following: user, daemon, " "auth, authpriv, mail, cron, local0 through local7 " "(case-insensitive), or a facility number."), grecs_type_string, GRECS_DFLT, NULL, 0, set_log_facility }, { "log-print-severity", N_("arg"), N_("Prefix diagnostics messages with their severity."), grecs_type_bool, GRECS_DFLT, &log_print_severity, 0 }, { "access-log-format", N_("fmt"), N_("Set format string for access log file."), grecs_type_string, GRECS_DFLT, &access_log_format, }, { "access-log-file", N_("name"), N_("Set access log file name."), grecs_type_string, GRECS_DFLT, &access_log_file }, { "transcript", N_("arg"), N_("Log session transcript."), grecs_type_bool, GRECS_DFLT, &transcript }, { "pidfile", N_("name"), N_("Store PID of the master process in this file."), grecs_type_string, GRECS_DFLT, &pidfile_name, }, { "shutdown-timeout", N_("seconds"), N_("Wait this number of seconds for all children to terminate."), grecs_type_uint, GRECS_DFLT, &shutdown_timeout }, { "inactivity-timeout", N_("seconds"), N_("Set inactivity timeout."), grecs_type_uint, GRECS_DFLT, &inactivity_timeout }, { "listen", N_("addr"), N_("Listen on these addresses."), grecs_type_sockaddr, GRECS_LIST, &listen_addr, 0, cb_dico_sockaddr_list }, { "initial-banner-text", N_("text"), N_("Display this text in the initial 220 banner"), grecs_type_string, GRECS_DFLT, &initial_banner_text }, { "help-text", N_("text"), N_("Display this text in reply to the HELP command. If text " "begins with a +, usual command summary is displayed before it."), grecs_type_string, GRECS_DFLT, &help_text }, { "hostname", N_("name"), N_("Override the host name."), grecs_type_string, GRECS_DFLT, &hostname }, { "capability", N_("arg"), N_("Request additional capabilities."), grecs_type_string, GRECS_LIST, NULL, 0, enable_capability }, { "module-load-path", N_("path"), N_("List of directories searched for database modules."), grecs_type_string, GRECS_LIST, &module_load_path, 0, cb_dico_list }, { "prepend-load-path", N_("path"), N_("List of directories searched for database modules prior to " "the default module directory"), grecs_type_string, GRECS_LIST, &prepend_load_path, 0, cb_dico_list }, { "default-strategy", N_("name"), N_("Set the name of the default matching strategy."), grecs_type_string, GRECS_DFLT, &default_strategy_name }, { "timing", N_("arg"), N_("Provide timing information after successful completion of an " "operation."), grecs_type_bool, GRECS_DFLT, &timing_option }, { "visibility-acl", N_("arg: acl"), N_("Set ACL to control visibility of all databases."), grecs_type_string, GRECS_DFLT, &global_acl, 0, apply_acl_cb }, { "connection-acl", N_("arg: acl"), N_("Apply this ACL to incoming connections."), grecs_type_string, GRECS_DFLT, &connect_acl, 0, apply_acl_cb }, { "database", NULL, N_("Define a dictionary database."), grecs_type_section, GRECS_DFLT, NULL, 0, set_database, NULL, kwd_database }, { "load-module", N_("name: string"), N_("Load a module instance.\n" "If is the same as in command, it can be simplified as:\n" " load-module ;\n" "Furthermore, several simplified forms can be combined into one\n" "by using a list of names as its argument, as in:\n" " load-module (stratall,word);\n"), grecs_type_section, GRECS_DFLT, NULL, 0, load_module_cb, NULL, kwd_load_module }, { "acl", N_("name: string"), N_("Define an ACL."), grecs_type_section, GRECS_DFLT, NULL, 0, acl_cb, NULL, kwd_acl }, { "user-db", N_("url: string"), N_("Define user database for authentication."), grecs_type_section, GRECS_DFLT, &user_db_cfg, 0, user_db_config, NULL, kwd_user_db }, { "alias", N_("name: string"), N_("Define a command alias."), grecs_type_string, GRECS_DFLT, NULL, 0, alias_cb, }, #ifdef WITH_GSASL { "sasl", NULL, N_("Control SASL authentication."), grecs_type_section, GRECS_DFLT, NULL, 0, sasl_cb, NULL, kwd_sasl }, #endif { "strategy", N_("name: string"), N_("Additional configuration for strategy "), grecs_type_section, GRECS_DFLT, NULL, 0, strategy_cb, NULL, kwd_strategy }, { NULL } }; void config_init() { grecs_include_path_setup (DEFAULT_VERSION_INCLUDE_DIR, DEFAULT_INCLUDE_DIR, NULL); grecs_preprocessor = DEFAULT_PREPROCESSOR; grecs_log_to_stderr = 1; grecs_default_port = htons(DICO_DICT_PORT); } void config_parse() { struct grecs_node *tree; tree = grecs_parse (config_file); if (!tree) exit (EX_CONFIG); if (grecs_tree_process (tree, keywords) || grecs_error_count) exit (EX_CONFIG); grecs_tree_free (tree); } void config_help() { static char docstring[] = N_("Configuration file structure for dicod.\n" "For more information, use `info dico configuration'."); grecs_print_docstring (docstring, 0, stdout); grecs_print_statement_array (keywords, 1, 0, stdout); } int show_sys_info_p() { if (!show_sys_info) return 1; return dicod_acl_check(show_sys_info, 1); } void reset_db_visibility() { dicod_database_t *db; dico_iterator_t itr; itr = xdico_list_iterator(database_list); for (db = dico_iterator_first(itr); db; db = dico_iterator_next(itr)) db->visible = 1; dico_iterator_destroy(&itr); } void check_db_visibility() { dicod_database_t *db; dico_iterator_t itr; int global = dicod_acl_check(global_acl, 1); itr = xdico_list_iterator(database_list); for (db = dico_iterator_first(itr); db; db = dico_iterator_next(itr)) { if (!dicod_acl_check(db->acl, global)) db->visible = 0; else { dico_list_t list[2]; dicod_get_database_languages(db, list); db->visible = dicod_lang_check(list); } } dico_iterator_destroy(&itr); } dicod_database_t * find_database(const char *name) { return dico_list_locate(database_list, (void*) name); } static int _count_databases(void *item, void *data) { const dicod_database_t *db = item; size_t *pcount = data; if (database_visible_p(db)) ++*pcount; return 0; } size_t database_count() { size_t count = 0; dico_list_iterate(database_list, _count_databases, &count); return count; } int database_iterate(dico_list_iterator_t fun, void *data) { dico_iterator_t itr = xdico_list_iterator(database_list); dicod_database_t *db; int rc = 0; for (db = dico_iterator_first(itr); rc == 0 && db; db = dico_iterator_next(itr)) { if (database_visible_p(db)) rc = fun(db, data); } dico_iterator_destroy(&itr); return rc; } /* Remove all dictionaries that depend on the given handler */ void database_remove_dependent(dicod_module_instance_t *inst) { dico_iterator_t itr = xdico_list_iterator(database_list); dicod_database_t *dp; for (dp = dico_iterator_first(itr); dp; dp = dico_iterator_next(itr)) { if (dp->instance == inst) { dico_log(L_NOTICE, 0, _("removing database %s"), dp->name); dico_iterator_remove_current(itr, NULL); dicod_database_free(dp); } } dico_iterator_destroy(&itr); } void dicod_database_free(dicod_database_t *dp) { dico_list_destroy(&dp->langlist[0]); dico_list_destroy(&dp->langlist[1]); dico_argcv_free(dp->argc, dp->argv); /* FIXME: Command can point either to argv[0] or to an allocated string. In the latter case it is not freed. */ free(dp); } void syslog_log_printer(int lvl, int exitcode, int errcode, const char *fmt, va_list ap) { char *s; int prio = LOG_INFO; static struct { char *prefix; int priority; } loglevels[] = { { "Debug", LOG_DEBUG }, { "Info", LOG_INFO }, { "Notice", LOG_NOTICE }, { "Warning",LOG_WARNING }, { "Error", LOG_ERR }, { "CRIT", LOG_CRIT }, { "ALERT", LOG_ALERT }, { "EMERG", LOG_EMERG }, }; char buf[512]; int level = 0; if (lvl & L_CONS) _dico_stderr_log_printer(lvl, exitcode, errcode, fmt, ap); s = loglevels[lvl & L_MASK].prefix; prio = loglevels[lvl & L_MASK].priority; if (log_print_severity) level += snprintf(buf + level, sizeof(buf) - level, "%s: ", s); level += vsnprintf(buf + level, sizeof(buf) - level, fmt, ap); if (errcode) level += snprintf(buf + level, sizeof(buf) - level, ": %s", strerror(errcode)); syslog(prio, "%s", buf); } static void _print_diag(grecs_locus_t const *locus, int err, int errcode, const char *msg) { if (locus) { char *locstr = NULL; size_t size = 0; if (locus->beg.col == 0) grecs_asprintf(&locstr, &size, "%s:%u", locus->beg.file, locus->beg.line); else if (strcmp(locus->beg.file, locus->end.file)) grecs_asprintf(&locstr, &size, "%s:%u.%u-%s:%u.%u", locus->beg.file, locus->beg.line, locus->beg.col, locus->end.file, locus->end.line, locus->end.col); else if (locus->beg.line != locus->end.line) grecs_asprintf(&locstr, &size, "%s:%u.%u-%u.%u", locus->beg.file, locus->beg.line, locus->beg.col, locus->end.line, locus->end.col); else grecs_asprintf(&locstr, &size, "%s:%u.%u-%u", locus->beg.file, locus->beg.line, locus->beg.col, locus->end.col); dico_log (err ? L_ERR : L_WARN, errcode, "%s: %s", locstr, msg); free (locstr); } else dico_log (err ? L_ERR : L_WARN, errcode, "%s", msg); } void dicod_log_setup() { if (!log_to_stderr) { openlog(log_tag, LOG_PID, log_facility); dico_set_log_printer(syslog_log_printer); } grecs_print_diag_fun = _print_diag; } /* When requested restart by a SIGHUP, the daemon first starts a copy of itself with the `--lint' option to verify configuration settings. This subsidiary process should use the same logging parameters as its ancestor. In order to ensure that, the logging settings are passed to the lint child using __DICTD_LOGGING__ environment variable. */ void dicod_log_encode_envar() { char *p; asprintf(&p, "%d:%d:%s", log_facility, log_print_severity, log_tag); setenv(DICTD_LOGGING_ENVAR, p, 1); } void dicod_log_pre_setup() { char *str = getenv(DICTD_LOGGING_ENVAR); if (str) { char *p; log_facility = strtoul(str, &p, 10); if (*p == ':') { log_print_severity = strtoul(p + 1, &p, 10); if (*p == ':') log_tag = p + 1; } log_to_stderr = 0; dicod_log_setup(); } } void init_conf_override(struct dicod_conf_override *ovr) { ovr->transcript = -1; } void apply_conf_override(struct dicod_conf_override *ovr) { if (ovr->transcript >= 0) transcript = ovr->transcript; } static void udb_init() { dico_udb_define(&text_udb_def); } int main(int argc, char **argv) { int rc = 0; struct dicod_conf_override ovr; appi18n_init(); dico_set_program_name(argv[0]); set_quoting_style(NULL, escape_quoting_style); log_tag = dico_program_name; dicod_log_pre_setup(); debug_stream = dico_dbg_stream_create(); hostname = xdico_local_hostname(); dicod_init_command_tab(); dicod_init_strategies(); udb_init(); register_auth(); register_mime(); register_lang(); register_markup(); register_xidle(); register_xversion(); register_lev(); register_regex(); dico_argcv_quoting_style = dico_argcv_quoting_hex; config_init(); init_conf_override(&ovr); get_options(argc, argv, &ovr); if (!config_lint_option) dicod_log_setup(); if (mode == MODE_PREPROC) exit(grecs_preproc_run(config_file, grecs_preprocessor) ? EX_CONFIG : 0); config_parse(); /* Logging settings may have been changed by the config, so setup it again. */ dicod_log_setup(); apply_conf_override(&ovr); compile_access_log(); dicod_loader_init(); begin_timing("server"); dicod_server_init(); init_user_db(); register_sasl(); flush_strat_forward(); if (default_strategy_name && dico_set_default_strategy(default_strategy_name)) { dico_die(EX_UNAVAILABLE, L_ERR, 0, _("unknown strategy")); } if (dicod_capa_flush()) exit(EX_SOFTWARE); if (config_lint_option) exit(EX_OK); markup_flush_capa(); switch (mode) { case MODE_DAEMON: dicod_server(argc, argv); break; case MODE_INETD: if (dicod_inetd()) rc = EX_UNAVAILABLE; dicod_server_cleanup(); break; } return rc; } dico-2.2/dicod/markup.c000066400000000000000000000035521172612674100150340ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include static void dicod_markup(dico_stream_t str, int argc, char **argv) { const char *p; if (argc == 2) { /* Report current markup type */ stream_printf(str, "280 %s is current markup type\n", dico_markup_type); } else if ((p = dico_markup_lookup(argv[2]))) { dico_markup_type = p; stream_printf(str, "250 markup type set to %s\n", dico_markup_type); } else stream_writez(str, "500 invalid argument\n"); } void register_markup() { static struct dicod_command cmd[] = { { "OPTION MARKUP", 2, 3, "type", "Set output markup type", dicod_markup }, { NULL } }; dicod_capa_register("markup", cmd, NULL, NULL); if (dico_markup_register("none")) xalloc_die(); } #define MARKUP_CAPA_PREFIX "markup-" void markup_flush_capa() { dico_iterator_t itr; const char *p; itr = xdico_list_iterator(dico_markup_list); for (p = dico_iterator_first(itr); p; p = dico_iterator_next(itr)) { size_t len = sizeof(MARKUP_CAPA_PREFIX) + strlen(p); char *str = xmalloc(len); strcat(strcpy(str, MARKUP_CAPA_PREFIX), p); dicod_capa_register(str, NULL, NULL, NULL); dicod_capa_add(str); } dico_iterator_destroy(&itr); } dico-2.2/dicod/mime.c000066400000000000000000000020561172612674100144620ustar00rootroot00000000000000/* This file is part of Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff Dico 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 3, or (at your option) any later version. Dico 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 Dico. If not, see . */ #include int option_mime; void dicod_mime(dico_stream_t str, int argc, char **argv) { option_mime = 1; stream_writez(str, "250 ok - using MIME headers\n"); } void register_mime() { static struct dicod_command cmd[] = { { "OPTION MIME", 2, 2, NULL, "use MIME headers", dicod_mime }, { NULL } }; dicod_capa_register("mime", cmd, NULL, NULL); } dico-2.2/dicod/ostream.c000066400000000000000000000076531172612674100152150ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include extern int option_mime; off_t total_bytes_out; #define OSTREAM_INITIALIZED 0x01 #define OSTREAM_DESTROY_TRANSPORT 0x02 struct ostream { dico_stream_t transport; off_t nout; int flags; dico_assoc_list_t headers; }; static int print_headers(struct ostream *ostr) { int rc = 0; const char *enc; if (ostr->headers) { dico_iterator_t itr; struct dico_assoc *p; itr = dico_assoc_iterator(ostr->headers); for (p = dico_iterator_first(itr); p; p = dico_iterator_next(itr)) { dico_stream_write(ostr->transport, p->key, strlen(p->key)); dico_stream_write(ostr->transport, ": ", 2); dico_stream_write(ostr->transport, p->value, strlen(p->value)); dico_stream_write(ostr->transport, "\n", 1); } dico_iterator_destroy(&itr); } rc = dico_stream_write(ostr->transport, "\n", 1); if (rc == 0) { dico_stream_t str; if ((enc = dico_assoc_find(ostr->headers, CONTENT_TRANSFER_ENCODING_HEADER)) && strcmp(enc, "8bit")) { str = dico_codec_stream_create(enc, FILTER_ENCODE, ostr->transport); } else { str = dico_linetrim_stream(ostr->transport, 1024, 1); } if (str) { ostr->transport = str; ostr->flags |= OSTREAM_DESTROY_TRANSPORT; } } return rc; } static int ostream_write(void *data, const char *buf, size_t size, size_t *pret) { struct ostream *ostr = data; if (!(ostr->flags & OSTREAM_INITIALIZED)) { if (option_mime && print_headers(ostr)) return dico_stream_last_error(ostr->transport); ostr->flags |= OSTREAM_INITIALIZED; } if (buf[0] == '.' && dico_stream_write(ostr->transport, ".", 1)) return dico_stream_last_error(ostr->transport); *pret = size; return dico_stream_write(ostr->transport, buf, size); } static int ostream_flush(void *data) { struct ostream *ostr = data; return dico_stream_flush(ostr->transport); } static int ostream_destroy(void *data) { struct ostream *ostr = data; if (ostr->flags & OSTREAM_DESTROY_TRANSPORT) dico_stream_destroy(&ostr->transport); free(data); return 0; } static int ostream_ioctl(void *data, int code, void *call_data) { struct ostream *ostr = data; switch (code) { case DICO_IOCTL_GET_TRANSPORT: *(dico_stream_t*)call_data = ostr->transport; break; case DICO_IOCTL_SET_TRANSPORT: ostr->transport = call_data; break; case DICO_IOCTL_BYTES_OUT: dico_stream_flush(ostr->transport); *(off_t*)call_data = dico_stream_bytes_out(ostr->transport) - ostr->nout; break; default: errno = EINVAL; return -1; } return 0; } dico_stream_t dicod_ostream_create(dico_stream_t str, dico_assoc_list_t headers) { struct ostream *ostr = xmalloc(sizeof(*ostr)); dico_stream_t stream; if (dico_stream_create(&stream, DICO_STREAM_WRITE, ostr)) xalloc_die(); ostr->transport = str; ostr->nout = dico_stream_bytes_out(str); ostr->flags = 0; ostr->headers = headers; dico_stream_set_write(stream, ostream_write); dico_stream_set_flush(stream, ostream_flush); dico_stream_set_destroy(stream, ostream_destroy); dico_stream_set_ioctl(stream, ostream_ioctl); dico_stream_set_buffer(stream, dico_buffer_line, 1024); return stream; } dico-2.2/dicod/regex.c000066400000000000000000000037771172612674100146600ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include struct regex_flags { int flags; }; struct regex_data { regex_t reg; }; static int regex_sel(int cmd, dico_key_t key, const char *dict_word) { char const *word = key->word; struct regex_flags *fp = key->strat->closure; struct regex_data *rp = key->call_data; int rc; switch (cmd) { case DICO_SELECT_BEGIN: rp = malloc(sizeof(*rp)); if (!rp) return 1; key->call_data = rp; rc = regcomp(&rp->reg, word, fp->flags); if (rc) { char errbuf[512]; regerror(rc, &rp->reg, errbuf, sizeof(errbuf)); dico_log(L_ERR, 0, _("Regex error: %s"), errbuf); } break; case DICO_SELECT_RUN: rc = regexec(&rp->reg, dict_word, 0, NULL, 0) == 0; break; case DICO_SELECT_END: rc = 0; regfree(&rp->reg); free(rp); break; } return rc; } static struct regex_flags ext_flags = { REG_EXTENDED|REG_ICASE }; static struct regex_flags basic_flags = { REG_ICASE }; static struct dico_strategy re_strat = { "re", "POSIX 1003.2 (modern) regular expressions", regex_sel, &ext_flags }; static struct dico_strategy regex_strat = { "regexp", "Old (basic) regular expressions", regex_sel, &basic_flags }; void register_regex() { dico_strategy_add(&re_strat); dico_strategy_add(®ex_strat); } dico-2.2/dicod/server.c000066400000000000000000000320251172612674100150400ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include #include #include struct dicod_server { int fd; /* Socket descriptor */ struct sockaddr *addr; socklen_t addrlen; }; struct dicod_server *srvtab; size_t srvcount; int fdmax; pid_t *childtab; unsigned long num_children; unsigned long total_forks; struct sockaddr server_addr; socklen_t server_addrlen; static int address_family_to_domain (int family) { switch (family) { case AF_UNIX: return PF_UNIX; case AF_INET: return PF_INET; default: abort(); } } void open_sockets() { size_t i; dico_iterator_t itr; struct grecs_sockaddr *sp; struct stat st; int t; char *p; srvcount = dico_list_count(listen_addr); if (srvcount == 0) { /* Provide defaults */ struct sockaddr_in *s_in = xmalloc(sizeof(*s_in)); sp = xmalloc(sizeof(*sp)); sp->sa = (struct sockaddr*) s_in; sp->len = sizeof(*s_in); if (!listen_addr) listen_addr = xdico_list_create(); s_in->sin_family = AF_INET; s_in->sin_addr.s_addr = INADDR_ANY; s_in->sin_port = htons(DICO_DICT_PORT); xdico_list_append(listen_addr, sp); srvcount = 1; } srvtab = xcalloc(srvcount, sizeof srvtab[0]); fdmax = 0; itr = xdico_list_iterator(listen_addr); for (i = 0, sp = dico_iterator_first(itr); sp; sp = dico_iterator_next(itr)) { int fd = socket(address_family_to_domain(sp->sa->sa_family), SOCK_STREAM, 0); if (fd == -1) { dico_log(L_ERR, errno, "socket"); continue; } switch (sp->sa->sa_family) { case AF_UNIX: { struct sockaddr_un *s_un = (struct sockaddr_un *)sp->sa; if (stat(s_un->sun_path, &st)) { if (errno != ENOENT) { dico_log(L_ERR, errno, _("file %s exists but cannot be stat'd"), s_un->sun_path); close(fd); continue; } } else if (!S_ISSOCK(st.st_mode)) { dico_log(L_ERR, 0, _("file %s is not a socket"), s_un->sun_path); close(fd); continue; } else if (unlink(s_un->sun_path)) { dico_log(L_ERR, errno, _("cannot unlink file %s"), s_un->sun_path); close(fd); continue; } break; } case AF_INET: t = 1; setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &t, sizeof(t)); break; default: dico_log(L_ERR, 0, _("unsupported address family: %d"), sp->sa->sa_family); continue; } if (bind(fd, sp->sa, sp->len) == -1) { p = sockaddr_to_astr(sp->sa, sp->len); dico_log(L_ERR, errno, ("cannot bind to %s"), p); free(p); close(fd); continue; } if (listen(fd, 8) == -1) { p = sockaddr_to_astr(sp->sa, sp->len); dico_log(L_ERR, errno, "cannot listen on %s", p); free(p); close(fd); continue; } srvtab[i].addr = sp->sa; srvtab[i].addrlen = sp->len; srvtab[i].fd = fd; i++; if (fd > fdmax) fdmax = fd; } dico_iterator_destroy(&itr); srvcount = i; if (srvcount == 0) dico_die(EX_UNAVAILABLE, L_ERR, 0, _("No sockets opened")); } void close_sockets() { size_t i; for (i = 0; i < srvcount; i++) close(srvtab[i].fd); free(srvtab); srvtab = NULL; srvcount = 0; fdmax = 0; } unsigned long find_pid(pid_t pid) { unsigned long i; for (i = 0; i < max_children; i++) if (childtab[i] == pid) return i; return (unsigned long)-1; } void register_child(pid_t pid) { unsigned long i = find_pid(0); if (i != (unsigned long)-1) childtab[i] = pid; ++num_children; ++total_forks; } static void print_status(pid_t pid, int status, int expect_term) { if (WIFEXITED(status)) { switch (WEXITSTATUS(status)) { case EX_OK: dico_log(L_DEBUG, 0, _("%lu exited successfully"), (unsigned long) pid); break; case EXIT_TIMEOUT: dico_log(L_INFO, 0, _("%lu timed out"), (unsigned long) pid); break; default: dico_log(L_ERR, 0, _("%lu failed with status %d"), (unsigned long) pid, WEXITSTATUS(status)); } } else if (WIFSIGNALED(status)) { int prio; if (expect_term && WTERMSIG(status) == SIGTERM) prio = L_DEBUG; else prio = L_ERR; dico_log(prio, 0, _("%lu terminated on signal %d"), (unsigned long) pid, WTERMSIG(status)); } else if (WIFSTOPPED(status)) dico_log(L_ERR, 0, _("%lu stopped on signal %d"), (unsigned long) pid, WSTOPSIG(status)); #ifdef WCOREDUMP else if (WCOREDUMP(status)) dico_log(L_ERR, 0, _("%lu dumped core"), (unsigned long) pid); #endif else dico_log(L_ERR, 0, _("%lu terminated with unrecognized status"), (unsigned long) pid); } void cleanup_children(int term) { pid_t pid; int status; while ((pid = waitpid ((pid_t)-1, &status, WNOHANG)) > 0) { unsigned long i = find_pid(pid); if (i == (unsigned long)-1) { dico_log(L_INFO, 0, "subprocess %lu finished", (unsigned long) pid); } else { print_status(pid, status, term); } childtab[i] = 0; --num_children; } } void stop_all(int sig) { unsigned long i; if (!childtab) return; for (i = 0; i < max_children; i++) if (childtab[i]) kill(sig, childtab[i]); } void stop_children() { int i; if (!childtab) return; stop_all(SIGTERM); for (i = 0; i < shutdown_timeout; i++) { cleanup_children(1); if (num_children == 0) return; sleep(1); } stop_all(SIGKILL); } /* Check whether pidfile NAME exists and if so, whether its PID is still active. Exit if it is. */ void check_pidfile(char *name) { unsigned long pid; FILE *fp = fopen(name, "r"); if (!fp) { if (errno == ENOENT) return; dico_die(EX_NOINPUT, L_ERR, errno, _("Cannot open pidfile `%s'"), name); } if (fscanf(fp, "%lu", &pid) != 1) { dico_log(L_ERR, 0, _("Cannot get pid from pidfile `%s'"), name); } else { if (kill(pid, 0) == 0) { dico_die(EX_UNAVAILABLE, L_ERR, 0, _("%s appears to run with pid %lu. " "If it does not, remove `%s' and retry."), dico_program_name, pid, name); } } fclose(fp); if (unlink(name)) dico_die(EX_OSERR, L_ERR, errno, _("Cannot unlink pidfile `%s'"), name); } void create_pidfile(char *name) { FILE *fp = fopen(name, "w"); if (!fp) dico_die(EX_CANTCREAT, L_ERR, errno, _("Cannot create pidfile `%s'"), name); fprintf(fp, "%lu", (unsigned long)getpid()); fclose(fp); } void remove_pidfile(char *name) { if (unlink(name)) dico_log(L_ERR, errno, _("Cannot unlink pidfile `%s'"), name); } int restart; int stop; int need_cleanup; static RETSIGTYPE sig_stop(int sig) { stop = 1; } static RETSIGTYPE sig_restart(int sig) { restart = 1; } static RETSIGTYPE sig_child(int sig) { need_cleanup = 1; } struct sockaddr client_addr; socklen_t client_addrlen; #define ACCESS_DENIED_MSG "530 Access denied\n" #define TEMP_FAIL_MSG "420 Server temporarily unavailable\n" #define SWRITE(fd, s) write(fd, s, sizeof(s)-1) int handle_connection(int n) { int status = 0; int connfd; int listenfd = srvtab[n].fd; server_addr = *srvtab[n].addr; server_addrlen = srvtab[n].addrlen; client_addrlen = sizeof(client_addr); connfd = accept(listenfd, &client_addr, &client_addrlen); if (connfd == -1) { if (errno == EINTR) return -1; dico_log(L_ERR, errno, "accept"); return -1; /*exit (EXIT_FAILURE);*/ } if (dicod_acl_check(connect_acl, 1) == 0) { char *p = sockaddr_to_astr(&client_addr, client_addrlen); dico_log(L_NOTICE, 0, _("connection from %s denied"), p); free(p); SWRITE(connfd, ACCESS_DENIED_MSG); close(connfd); return 0; } if (single_process) { int status; dico_stream_t str = dicod_iostream(connfd, connfd); if (str) { status = dicod_loop(str); dico_stream_close(str); dico_stream_destroy(&str); } } else { pid_t pid = fork(); if (pid == -1) { dico_log(L_ERR, errno, "fork"); SWRITE(connfd, TEMP_FAIL_MSG); } else if (pid == 0) { /* Child. */ dico_stream_t str; close(listenfd); signal(SIGTERM, SIG_DFL); signal(SIGQUIT, SIG_DFL); signal(SIGINT, SIG_DFL); signal(SIGCHLD, SIG_DFL); signal(SIGHUP, SIG_DFL); str = dicod_iostream(connfd, connfd); if (!str) exit(EX_UNAVAILABLE); status = dicod_loop(str); dico_stream_close(str); dico_stream_destroy(&str); exit(status); } else { register_child(pid); } } close(connfd); return status; } static int pre_restart_lint_internal() { pid_t pid; time_t ts; pid = fork(); if (pid == 0) run_lint(); else if (pid == -1) { dico_log(L_ERR, errno, _("fork failed")); return 1; } /* Master process */ ts = time(NULL); while (1) { int status; pid_t n = waitpid(pid, &status, WNOHANG); if (n == pid) { /* Child exited, examine status */ if (WIFEXITED(status)) { if (WEXITSTATUS(status) == 0) { /* OK to restart */ return 0; } else { dico_log(L_NOTICE, 0, _("refusing to restart due to errors in " "configuration file")); return 1; } } else { dico_log(L_NOTICE, 0, _("refusing to restart due to unexpected " "return status of configuration checker")); print_status(pid, status, 0); return 1; } } else if (pid == 0) { if (time(NULL) - ts > 5) { dico_log(L_NOTICE, 0, _("refusing to restart: " "configuration checker did not exit within " "5 seconds")); kill(pid, SIGKILL); break; } } else if (errno == EINTR || errno == EAGAIN) continue; else { dico_log(L_ERR, errno, _("waitpid failed")); dico_log(L_NOTICE, 0, _("refusing to restart")); kill(pid, SIGKILL); break; } } return 1; } static int pre_restart_lint() { int rc; RETSIGTYPE (*sf)(int); sf = signal(SIGCHLD, SIG_DFL); rc = pre_restart_lint_internal(); signal(SIGCHLD, sf); return rc; } int server_loop() { size_t i; fd_set fdset; FD_ZERO(&fdset); for (i = 0; i < srvcount; i++) FD_SET(srvtab[i].fd, &fdset); for (;;) { int rc; fd_set rdset; if (need_cleanup) { cleanup_children(0); need_cleanup = 1; } if (num_children > max_children) { dico_log(L_ERR, 0, _("too many children (%lu)"), num_children); pause(); continue; } rdset = fdset; rc = select (fdmax + 1, &rdset, NULL, NULL, NULL); if (rc == -1 && errno == EINTR) { if (stop) break; else if (restart) { if (pre_restart_lint() == 0) break; else restart = 0; } continue; } else if (rc < 0) { dico_log(L_CRIT, errno, _("select error")); return EX_OSERR; } for (i = 0; i < srvcount; i++) if (FD_ISSET(srvtab[i].fd, &rdset)) handle_connection(i); } return 0; } void dicod_server(int argc, char **argv) { int rc; dico_log(L_INFO, 0, _("%s started"), program_version); if (user_id) { if (getuid()) dico_log(L_NOTICE, 0, _("not running as root: ignoring user/group settings")); else if (switch_to_privs(user_id, group_id, group_list)) dico_die(EX_NOUSER, L_CRIT, 0, "exiting"); } if (!foreground) check_pidfile(pidfile_name); signal(SIGTERM, sig_stop); signal(SIGQUIT, sig_stop); signal(SIGINT, sig_stop); signal(SIGCHLD, sig_child); if (argv[0][0] != '/') { dico_log(L_WARN, 0, _("dicod started without full file name")); dico_log(L_WARN, 0, _("restart (SIGHUP) will not work")); signal(SIGHUP, sig_stop); } else if (config_file[0] != '/') { dico_log(L_WARN, 0, _("configuration file is not given with a full file name")); dico_log(L_WARN, 0, _("restart (SIGHUP) will not work")); signal(SIGHUP, sig_stop); } else signal(SIGHUP, sig_restart); if (!foreground) { if (daemon(0, 0) == -1) dico_die(EX_OSERR, L_CRIT, errno, _("Cannot become a daemon")); create_pidfile(pidfile_name); } open_sockets(); if (!single_process) childtab = xcalloc(max_children, sizeof(childtab[0])); rc = server_loop(); stop_children(); free(childtab); dicod_server_cleanup(); close_sockets(); if (rc) dico_log(L_NOTICE, errno, _("Exit code = %d, last error status"), rc); if (!foreground) remove_pidfile(pidfile_name); if (restart) { int i; dico_log(L_INFO, 0, _("%s restarting"), program_version); for (i = getmaxfd(); i > 2; i--) close(i); execv(argv[0], argv); dico_die(EX_UNAVAILABLE, L_ERR|L_CONS, errno, _("Cannot restart")); } else dico_log(L_INFO, 0, _("%s terminating"), program_version); exit(rc); } dico-2.2/dicod/stat.c000066400000000000000000000035201172612674100145030ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include struct dico_stat current_stat, total_stat; void clear_stats() { total_stat.defines += current_stat.defines; total_stat.matches += current_stat.matches; total_stat.compares += current_stat.compares; memset(¤t_stat, 0, sizeof(current_stat)); } void begin_timing(const char *name) { if (timing_option) { timer_start(name); clear_stats(); } } void report_timing(dico_stream_t stream, xdico_timer_t t, struct dico_stat *sp) { dico_stream_write(stream, " [", 2); if (sp) stream_printf(stream, "d/m/c = %lu/%lu/%lu ", (unsigned long) sp->defines, (unsigned long) sp->matches, (unsigned long) sp->compares); timer_format_time(stream, timer_get_real(t)); dico_stream_write(stream, "r ", 2); timer_format_time(stream, timer_get_user(t)); dico_stream_write(stream, "u ", 2); timer_format_time(stream, timer_get_system(t)); dico_stream_write(stream, "s]", 2); } void report_current_timing(dico_stream_t stream, const char *name) { if (timing_option) { xdico_timer_t t = timer_stop(name); report_timing(stream, t, ¤t_stat); clear_stats(); } } dico-2.2/dicod/stratcl.c000066400000000000000000000051701172612674100152070ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include struct word_length { enum cmp_op op; size_t len; }; enum stratcl_type { stratcl_all, stratcl_word, stratcl_length }; struct stratcl { enum stratcl_type type; union { char *word; struct word_length wl; } v; }; void stratcl_add_word(dico_list_t list, const char *word) { struct stratcl *sp = xmalloc(sizeof(*sp)); sp->type = stratcl_word; sp->v.word = xstrdup(word); xdico_list_append(list, sp); } void stratcl_add_cmp(dico_list_t list, enum cmp_op op, size_t len) { struct stratcl *sp = xmalloc(sizeof(*sp)); sp->type = stratcl_length; sp->v.wl.op = op; sp->v.wl.len = len; xdico_list_append(list, sp); } void stratcl_add_disable(dico_list_t list) { struct stratcl *sp = xmalloc(sizeof(*sp)); sp->type = stratcl_all; xdico_list_append(list, sp); } struct stratcl_check { const char *word; size_t len; int res; }; static int check_word(void *item, void *data) { struct stratcl *sp = item; struct stratcl_check *cp = data; switch (sp->type) { case stratcl_all: cp->res = 1; break; case stratcl_word: cp->res = strcmp(sp->v.word, cp->word) == 0; break; case stratcl_length: switch (sp->v.wl.op) { case cmp_eq: cp->res = cp->len == sp->v.wl.len; break; case cmp_ne: cp->res = cp->len != sp->v.wl.len; break; case cmp_lt: cp->res = cp->len < sp->v.wl.len; break; case cmp_le: cp->res = cp->len <= sp->v.wl.len; break; case cmp_gt: cp->res = cp->len > sp->v.wl.len; break; case cmp_ge: cp->res = cp->len >= sp->v.wl.len; } break; } return cp->res; } int stratcl_check_word(dico_list_t list, const char *word) { struct stratcl_check s; if (!list) return 0; s.word = word; s.len = strlen(word); s.res = 0; dico_list_iterate(list, check_word, &s); return s.res; } dico-2.2/dicod/tests/000077500000000000000000000000001172612674100145265ustar00rootroot00000000000000dico-2.2/dicod/tests/Makefile.am000066400000000000000000000057731172612674100165760ustar00rootroot00000000000000# This file is part of GNU Dico # Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 passwd group DISTCLEANFILES = atconfig $(check_SCRIPTS) MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) ## ------------ ## ## package.m4. ## ## ------------ ## $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(AM_V_GEN){ \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/package.m4 ## --------------- ## ## The echo module ## ## --------------- ## ## This module is hardly usable outside of the Dico test suite, but ## it must be an installable target nevertheless, otherwise libtool ## will not create a shared library and `make check' will fail. moddir=@DICO_MODDIR@ mod_LTLIBRARIES=echo.la echo_la_SOURCES = echo.c echo_la_LIBADD = ../../lib/libdico.la echo_la_LDFLAGS = -module -avoid-version -no-undefined ## ------------ ## ## Auxiliaries. ## ## ------------ ## noinst_PROGRAMS=apopauth apopauth_SOURCES=apopauth.c apopauth_LDADD=\ ../../lib/libxdico.a\ ../../gnu/libgnu.a\ ../../lib/libextra.a\ ../../lib/libdico.la\ $(READLINE_LIBS)\ @LIBINTL@ @LIBICONV@\ @LIBDICOSASL@\ @GSASL_LIBS@\ @LIBLTDL@ INCLUDES = \ -I$(top_srcdir)/include\ -I$(top_builddir)/include\ -I$(top_srcdir)/gnu\ -I$(top_builddir)/gnu\ @GRECS_INCLUDES@ ## ------------ ## ## Test suite. ## ## ------------ ## TESTSUITE_AT = \ alias.at\ apop.at\ def.at\ descr.at\ info.at\ help00.at\ help01.at\ help02.at\ help03.at\ match.at\ nodef.at\ nomatch.at\ showdb.at\ showstrat.at\ startup.at\ vis00.at\ vis01.at\ vis02.at\ testsuite.at TESTSUITE = $(srcdir)/testsuite M4=m4 AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/include testsuite.at -o $@.tmp $(AM_V_at)mv $@.tmp $@ atconfig: $(top_builddir)/config.status cd $(top_builddir) && ./config.status tests/$@ clean-local: @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean check-local: atconfig atlocal $(TESTSUITE) @$(SHELL) $(TESTSUITE) dico-2.2/dicod/tests/Makefile.in000066400000000000000000001372321172612674100166030ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of GNU Dico # Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = apopauth$(EXEEXT) subdir = dicod/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/atlocal.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = atlocal CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(moddir)" LTLIBRARIES = $(mod_LTLIBRARIES) echo_la_DEPENDENCIES = ../../lib/libdico.la am_echo_la_OBJECTS = echo.lo echo_la_OBJECTS = $(am_echo_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent echo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(echo_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) am_apopauth_OBJECTS = apopauth.$(OBJEXT) apopauth_OBJECTS = $(am_apopauth_OBJECTS) am__DEPENDENCIES_1 = apopauth_DEPENDENCIES = ../../lib/libxdico.a ../../gnu/libgnu.a \ ../../lib/libextra.a ../../lib/libdico.la \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(echo_la_SOURCES) $(apopauth_SOURCES) DIST_SOURCES = $(echo_la_SOURCES) $(apopauth_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 passwd group DISTCLEANFILES = atconfig $(check_SCRIPTS) MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE) moddir = @DICO_MODDIR@ mod_LTLIBRARIES = echo.la echo_la_SOURCES = echo.c echo_la_LIBADD = ../../lib/libdico.la echo_la_LDFLAGS = -module -avoid-version -no-undefined apopauth_SOURCES = apopauth.c apopauth_LDADD = \ ../../lib/libxdico.a\ ../../gnu/libgnu.a\ ../../lib/libextra.a\ ../../lib/libdico.la\ $(READLINE_LIBS)\ @LIBINTL@ @LIBICONV@\ @LIBDICOSASL@\ @GSASL_LIBS@\ @LIBLTDL@ INCLUDES = \ -I$(top_srcdir)/include\ -I$(top_builddir)/include\ -I$(top_srcdir)/gnu\ -I$(top_builddir)/gnu\ @GRECS_INCLUDES@ TESTSUITE_AT = \ alias.at\ apop.at\ def.at\ descr.at\ info.at\ help00.at\ help01.at\ help02.at\ help03.at\ match.at\ nodef.at\ nomatch.at\ showdb.at\ showstrat.at\ startup.at\ vis00.at\ vis01.at\ vis02.at\ testsuite.at TESTSUITE = $(srcdir)/testsuite M4 = m4 AUTOTEST = $(AUTOM4TE) --language=autotest all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits dicod/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits dicod/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): atlocal: $(top_builddir)/config.status $(srcdir)/atlocal.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-modLTLIBRARIES: $(mod_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(moddir)" || $(MKDIR_P) "$(DESTDIR)$(moddir)" @list='$(mod_LTLIBRARIES)'; test -n "$(moddir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moddir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moddir)"; \ } uninstall-modLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(mod_LTLIBRARIES)'; test -n "$(moddir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moddir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moddir)/$$f"; \ done clean-modLTLIBRARIES: -test -z "$(mod_LTLIBRARIES)" || rm -f $(mod_LTLIBRARIES) @list='$(mod_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done echo.la: $(echo_la_OBJECTS) $(echo_la_DEPENDENCIES) $(AM_V_CCLD)$(echo_la_LINK) -rpath $(moddir) $(echo_la_OBJECTS) $(echo_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list apopauth$(EXEEXT): $(apopauth_OBJECTS) $(apopauth_DEPENDENCIES) @rm -f apopauth$(EXEEXT) $(AM_V_CCLD)$(LINK) $(apopauth_OBJECTS) $(apopauth_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apopauth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echo.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(moddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local clean-modLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-modLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-modLTLIBRARIES .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ clean-generic clean-libtool clean-local clean-modLTLIBRARIES \ clean-noinstPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-modLTLIBRARIES install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-modLTLIBRARIES $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(AM_V_GEN){ \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/package.m4 $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/include testsuite.at -o $@.tmp $(AM_V_at)mv $@.tmp $@ atconfig: $(top_builddir)/config.status cd $(top_builddir) && ./config.status tests/$@ clean-local: @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean check-local: atconfig atlocal $(TESTSUITE) @$(SHELL) $(TESTSUITE) # 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: dico-2.2/dicod/tests/alias.at000066400000000000000000000022421172612674100161450ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([aliases]) AT_KEYWORDS([alias]) AT_DATA([input],[dblist da word mf test q ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler "echo null"; } alias dblist show databases; alias d DEFINE; alias da d "*"; alias df d "!"; alias m MATCH; alias mas m "*"; alias mfs m "!"; alias ma mas "."; alias mf mfs "."; alias q QUIT; ]) DICOD_RUN|sed '/SASLAUTH/d'], [0], [220 110 1 databases present dummy "GNU Dico NULL database" . 250 552 No match 552 No match 221 ]) AT_CLEANUP dico-2.2/dicod/tests/apop.at000066400000000000000000000017571172612674100160250ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([apop]) AT_KEYWORDS([auth apop]) AT_CHECK([ DICOD_CONFIG([ capability auth; database { name dummy; handler "echo null"; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } ]) apopauth gray guessme dicod --config ./dicod.conf --stderr -i]) AT_CLEANUP dico-2.2/dicod/tests/apopauth.c000066400000000000000000000111431172612674100165130ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include "xalloc.h" #include "md5.h" dico_stream_t iostr; char *in_buffer; size_t in_bufsize; size_t in_level; char *msgid; int dict_status_p(const char *status) { return in_level > 3 && memcmp(in_buffer, status, 3) == 0 && (in_buffer[3] == ' ' || (in_level == 5 && memcmp(in_buffer+3,"\r\n",2) == 0)); } void assert_status(const char *status) { if (!dict_status_p(status)) { dico_log(L_ERR, 0, "expected status %s but got %s", status, in_buffer); exit(3); } } static void dict_read_reply() { int rc; if (in_buffer) in_buffer[0] = 0; rc = dico_stream_getline(iostr, &in_buffer, &in_bufsize, &in_level); if (rc == 0) in_level = dico_trim_nl(in_buffer); else { rc = dico_stream_last_error(iostr); if (rc == EIO && in_level == 0) exit(0); dico_log(L_ERR, 0, "error reading input: %s", dico_stream_strerror(iostr, rc)); exit(2); } } static void get_msgid() { if (in_buffer[in_level-1] == '>') { char *p = strrchr(in_buffer, '<'); if (p) { msgid = xstrdup(p); return; } } dico_log(L_ERR, 0, "server does not support authentication"); dico_log(L_ERR, 0, "last reply was: %s", in_buffer); } static void apop_auth(const char *user, const char *pass) { int i; struct md5_ctx md5context; unsigned char md5digest[16]; char buf[sizeof(md5digest) * 2 + 1]; char *p; md5_init_ctx(&md5context); md5_process_bytes(msgid, strlen(msgid), &md5context); md5_process_bytes(pass, strlen(pass), &md5context); md5_finish_ctx(&md5context, md5digest); for (i = 0, p = buf; i < 16; i++, p += 2) sprintf(p, "%02x", md5digest[i]); *p = 0; stream_printf(iostr, "AUTH %s %s\r\n", user, buf); dict_read_reply(); assert_status("230"); } dico_stream_t run_command(int argc, char **argv, pid_t *ppid) { pid_t pid; int oup[2], inp[2]; assert(pipe(oup) == 0); assert(pipe(inp) == 0); pid = fork(); if (pid == (pid_t) -1) { dico_log(L_ERR, errno, "fork"); exit(2); } if (pid == 0) { assert(dup2(oup[0], 0) >= 0); close(oup[1]); assert(dup2(inp[1], 1) >= 0); close(inp[0]); execvp(argv[0], argv); dico_log(L_ERR, errno, "failed to run command"); exit(127); } /* Master */ close(oup[0]); close(inp[1]); *ppid = pid; return dico_fd_io_stream_create(inp[0], oup[1]); } void printer() { for (;;) { dict_read_reply(); printf("%s\n", in_buffer); } } void writer(FILE *fp) { pid_t pid = fork(); if (pid == (pid_t) -1) { dico_log(L_ERR, errno, "fork"); exit(2); } if (pid == 0) { char buf[512]; size_t n; while ((n = fread(buf, 1, sizeof(buf), fp)) > 0) dico_stream_write(iostr, buf, n); exit(0); } fclose(fp); } int main(int argc, char **argv) { char *user, *pass; pid_t pid; char *script = NULL; dico_set_program_name(argv[0]); while (--argc) { char *arg = *++argv; if (strncmp(arg, "-script=", 8) == 0) script = arg + 8; else if (strcmp(arg, "--") == 0) { --argc; ++argv; break; } else if (arg[0] == '-') { dico_log(L_ERR, 0, "unknown option %s", arg); return 1; } else break; } if (argc < 3) { dico_log(L_ERR, 0, "usage: %s user pass command [args...]", dico_program_name); return 1; } user = argv[0]; pass = argv[1]; argc -= 2; argv += 2; iostr = run_command(argc, argv, &pid); if (!iostr) return 1; dico_stream_set_buffer(iostr, dico_buffer_line, DICO_MAX_BUFFER); dict_read_reply(); assert_status("220"); get_msgid(); apop_auth(user, pass); if (script) { FILE *fp = fopen(script, "r"); if (!fp) { dico_log(L_ERR, errno, "cannot open %s", script); exit(1); } writer(fp); printer(); } return 0; } dico-2.2/dicod/tests/atlocal.in000066400000000000000000000003341172612674100164750ustar00rootroot00000000000000# @configure_input@ -*- shell-script -*- # Configurable variable values for Dico test suite. # Copyright (C) 2012 Sergey Poznyakoff PATH=@abs_top_builddir@/dicod:@abs_builddir@:$PATH dico-2.2/dicod/tests/def.at000066400000000000000000000017301172612674100156130ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([define]) AT_KEYWORDS([def define]) AT_DATA([input],[define * test quit ]) AT_CHECK([ DICOD_CONFIG([ database { name echo; handler echo; } ]) DICOD_RUN], [0], [220 150 1 definitions found: list follows 151 "test" echo "GNU Dico ECHO database" test . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/descr.at000066400000000000000000000017541172612674100161630ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([descr]) AT_DATA([input],[dnl show info dummy quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler "echo null"; } ]) DICOD_RUN], [0], [220 112 information for dummy NULL database. This database returns NULL (no result) to any match and define requests. . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/echo.c000066400000000000000000000063401172612674100156130ustar00rootroot00000000000000/* An "echo" database for GNU Dico test suite. Copyright (C) 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #ifdef HAVE_CONFIG_H # include #endif #include #include /* This module either returns query strings without any changes (echo mode), or denies any queries (null mode). */ /* These constants are used as dico_handle_t, returned by echo_init_db: */ #define ECHO_ECHO 1 /* Operate in echo mode */ #define ECHO_NULL 2 /* Operate in null mode */ static int echo_init(int argc, char **argv) { return 0; } static dico_handle_t echo_init_db(const char *dbname, int argc, char **argv) { int mode = 0; struct dico_option init_db_option[] = { { DICO_OPTSTR(null), dico_opt_bool, &mode }, { NULL } }; if (dico_parseopt(init_db_option, argc, argv, 0, NULL)) return NULL; return (dico_handle_t) (mode + 1); } static int echo_free_db(dico_handle_t hp) { return 0; } static int echo_open(dico_handle_t dp) { return 0; } static int echo_close(dico_handle_t hp) { return 0; } static char * echo_info(dico_handle_t hp) { static char *echo_info_str[2] = { "\ ECHO database.\n\n\ This database echoes each query.\n", "\ NULL database.\n\n\ This database returns NULL (no result) to any match and define\n\ requests.\n" }; return strdup(echo_info_str[(int)hp == ECHO_NULL]); } static char * echo_descr(dico_handle_t hp) { static char *echo_descr_str[2] = { "GNU Dico ECHO database", "GNU Dico NULL database" }; return strdup(echo_descr_str[(int)hp == ECHO_NULL]); } static dico_result_t echo_match(dico_handle_t hp, const dico_strategy_t strat, const char *word) { if ((int) hp == ECHO_NULL) return NULL; return (dico_result_t) strdup(word); } static dico_result_t echo_define(dico_handle_t hp, const char *word) { if ((int) hp == ECHO_NULL) return NULL; return (dico_result_t) strdup(word); } static int echo_output_result (dico_result_t rp, size_t n, dico_stream_t str) { char *word = (char*)rp; dico_stream_write(str, word, strlen(word)); return 0; } static size_t echo_result_count(dico_result_t rp) { return 1; } static size_t echo_compare_count(dico_result_t rp) { return 1; } static void echo_free_result(dico_result_t rp) { free(rp); } struct dico_database_module DICO_EXPORT(echo, module) = { DICO_MODULE_VERSION, DICO_CAPA_NONE, echo_init, echo_init_db, echo_free_db, echo_open, echo_close, echo_info, echo_descr, NULL, /* echo_lang */ echo_match, echo_define, echo_output_result, echo_result_count, echo_compare_count, echo_free_result, NULL /* echo_result_headers */ }; dico-2.2/dicod/tests/group000066400000000000000000000000541172612674100156040ustar00rootroot00000000000000gray user gray timing gray admin smith user dico-2.2/dicod/tests/help00.at000066400000000000000000000033011172612674100161410ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([help]) AT_KEYWORDS([help help00]) AT_DATA([input],[help quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler "echo null"; } ]) DICOD_RUN|sed '/SASLAUTH/d'], [0], [220 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database using strategy SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide information about the database SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/help01.at000066400000000000000000000036151172612674100161520ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([help reflects capabilities]) AT_KEYWORDS([help help01]) AT_DATA([input],[help quit ]) AT_CHECK([ DICOD_CONFIG([ capability auth; user-db text://$abs_srcdir { password-resource passwd; group-resource group; } database { name dummy; handler "echo null"; } ]) DICOD_RUN|sed '/SASLAUTH/d'], [0], [220 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database using strategy SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide information about the database SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection AUTH user string -- provide authentication information . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/help02.at000066400000000000000000000020521172612674100161450ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([user-defined help]) AT_KEYWORDS([help help02]) AT_DATA([input],[help quit ]) AT_CHECK([ DICOD_CONFIG([ help-text <. AT_SETUP([user-augmented help]) AT_KEYWORDS([help help03]) AT_DATA([input],[help quit ]) AT_CHECK([ DICOD_CONFIG([ help-text <. AT_SETUP(info) AT_DATA([input],[dnl show db quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler "echo null"; } ]) DICOD_RUN], [0], [220 110 1 databases present dummy "GNU Dico NULL database" . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/match.at000066400000000000000000000016551172612674100161570ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([match]) AT_KEYWORDS([match]) AT_DATA([input],[match * . test quit ]) AT_CHECK([ DICOD_CONFIG([ database { name echo; handler echo; } ]) DICOD_RUN], [0], [220 152 1 matches found: list follows echo "test" . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/nodef.at000066400000000000000000000016251172612674100161530ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([no definition]) AT_KEYWORDS([nodef]) AT_DATA([input],[define * test quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler "echo null"; } ]) DICOD_RUN], [0], [220 552 No match 221 ]) AT_CLEANUP dico-2.2/dicod/tests/nomatch.at000066400000000000000000000016231172612674100165070ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([no match]) AT_KEYWORDS([nomatch]) AT_DATA([input],[match * . test quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler "echo null"; } ]) DICOD_RUN], [0], [220 552 No match 221 ]) AT_CLEANUP dico-2.2/dicod/tests/package.m4000066400000000000000000000004151172612674100163630ustar00rootroot00000000000000# Signature of the current package. m4_define([AT_PACKAGE_NAME], [GNU dico]) m4_define([AT_PACKAGE_TARNAME], [dico]) m4_define([AT_PACKAGE_VERSION], [2.2]) m4_define([AT_PACKAGE_STRING], [GNU dico 2.2]) m4_define([AT_PACKAGE_BUGREPORT], [bug-dico@gnu.org]) dico-2.2/dicod/tests/passwd000066400000000000000000000000331172612674100157460ustar00rootroot00000000000000gray guessme smith testtsetdico-2.2/dicod/tests/showdb.at000066400000000000000000000020451172612674100163430ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([show databases]) AT_KEYWORDS([show showdb]) AT_DATA([input],[show databases quit ]) AT_CHECK([ DICOD_CONFIG([ database a { name "A"; handler echo; description "Database A"; } database b { name "B"; handler echo; description "Database B"; } ]) DICOD_RUN ], [0], [220 110 2 databases present A "Database A" B "Database B" . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/showstrat.at000066400000000000000000000026531172612674100171200ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([show strategies]) AT_KEYWORDS([show stratlist showstrat]) AT_DATA([input],[show strategies quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler echo; } ]) DICOD_RUN], [0], [220 111 10 strategies present: list follows exact "Match words exactly" prefix "Match word prefixes" suffix "Match word suffixes" soundex "Match using SOUNDEX algorithm" lev "Match headwords within given Levenshtein distance" nlev "Match headwords within given Levenshtein distance (normalized)" dlev "Match headwords within given Damerau-Levenshtein distance" ndlev "Match headwords within given Damerau-Levenshtein distance (normalized)" re "POSIX 1003.2 (modern) regular expressions" regexp "Old (basic) regular expressions" . 250 221 ]) AT_CLEANUP dico-2.2/dicod/tests/startup.at000066400000000000000000000015531172612674100165620ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP(startup) AT_KEYWORDS(startup) AT_DATA([input],[quit ]) AT_CHECK([ DICOD_CONFIG([ database { name dummy; handler echo; } ]) DICOD_RUN], [0], [220 221 ]) AT_CLEANUP dico-2.2/dicod/tests/testsuite000077500000000000000000002706331172612674100165200ustar00rootroot00000000000000#! /bin/sh # Generated from testsuite.at by GNU Autoconf 2.63. # # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # This test suite is free software; the Free Software Foundation gives # unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} # How were we run? at_cli_args="$@" # Not all shells have the 'times' builtin; the subshell is needed to make # sure we discard the 'times: not found' message from the shell. at_times_p=false (times) >/dev/null 2>&1 && at_times_p=: # CLI Arguments to pass to the debugging scripts. at_debug_args= # -e sets to true at_errexit_p=false # Shall we be verbose? ':' means no, empty means yes. at_verbose=: at_quiet= # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. at_debug_p=false # Display help message? at_help_p=false # Display the version message? at_version_p=false # List test groups? at_list_p=false # --clean at_clean=false # Test groups to run at_groups= # Whether a write failure occurred at_write_fail=0 # The directory we run the suite in. Default to . if no -C option. at_dir=`pwd` # An absolute reference to this testsuite script. case $as_myself in [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; * ) at_myself=$at_dir/$as_myself ;; esac # Whether -C is in effect. at_change_dir=false # List of the tested programs. at_tested='' # List of the all the test groups. at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. at_format='??' # Description of all the test groups. at_help_all="1;testsuite.at:28;dicod version;version; 2;startup.at:17;startup;startup; 3;help00.at:17;help;help help00; 4;help01.at:17;help reflects capabilities;help help01; 5;help02.at:17;user-defined help;help help02; 6;help03.at:17;user-augmented help;help help03; 7;showstrat.at:17;show strategies;show stratlist showstrat; 8;showdb.at:17;show databases;show showdb; 9;info.at:17;info;; 10;descr.at:17;descr;; 11;match.at:17;match;match; 12;nomatch.at:17;no match;nomatch; 13;def.at:17;define;def define; 14;nodef.at:17;no definition;nodef; 15;apop.at:17;apop;auth apop; 16;vis00.at:17;global visibility-acl;auth apop vis00; 17;vis01.at:17;per-database visibility-acl;auth apop vis01; 18;vis02.at:17;server info visibility;auth apop vis02; 19;alias.at:17;aliases;alias; " # at_func_validate_ranges [NAME...] # --------------------------------- # Validate and normalize the test group number contained in each # variable NAME. Leading zeroes are treated as decimal. at_func_validate_ranges () { for at_grp do eval at_value=\$$at_grp if test $at_value -lt 1 || test $at_value -gt 19; then $as_echo "invalid test group: $at_value" >&2 exit 1 fi case $at_value in 0*) # We want to treat leading 0 as decimal, like expr and test, but # at_func_arith treats it as octal if it uses $(( )). # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the # expr fork, but it is not worth the effort to determine if the # shell supports XSI when the user can just avoid leading 0. eval $at_grp='`expr $at_value + 0`' ;; esac done } at_prev= for at_option do # If the previous option needs an argument, assign it. if test -n "$at_prev"; then at_option=$at_prev=$at_option at_prev= fi case $at_option in *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;; *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $at_option in --help | -h ) at_help_p=: ;; --list | -l ) at_list_p=: ;; --version | -V ) at_version_p=: ;; --clean | -c ) at_clean=: ;; --debug | -d ) at_debug_p=: ;; --errexit | -e ) at_debug_p=: at_errexit_p=: ;; --verbose | -v ) at_verbose=; at_quiet=: ;; --trace | -x ) at_traceon='set -x'; at_traceoff='set +x' ;; [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) at_func_validate_ranges at_option at_groups="$at_groups$at_option " ;; # Ranges [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) at_range_start=`echo $at_option |tr -d X-` at_func_validate_ranges at_range_start at_range=`$as_echo " $at_groups_all " | \ sed -e 's/^.* \('$at_range_start' \)/\1/'` at_groups="$at_groups$at_range " ;; -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) at_range_end=`echo $at_option |tr -d X-` at_func_validate_ranges at_range_end at_range=`$as_echo " $at_groups_all " | \ sed -e 's/\( '$at_range_end'\) .*$/\1/'` at_groups="$at_groups$at_range " ;; [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \ [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \ [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \ [0-9][0-9][0-9]-[0-9][0-9][0-9] | \ [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \ [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] ) at_range_start=`expr $at_option : '\(.*\)-'` at_range_end=`expr $at_option : '.*-\(.*\)'` if test $at_range_start -gt $at_range_end; then at_tmp=$at_range_end at_range_end=$at_range_start at_range_start=$at_tmp fi at_func_validate_ranges at_range_start at_range_end at_range=`$as_echo " $at_groups_all " | \ sed -e 's/^.*\( '$at_range_start' \)/\1/' \ -e 's/\( '$at_range_end'\) .*$/\1/'` at_groups="$at_groups$at_range " ;; # Directory selection. --directory | -C ) at_prev=--directory ;; --directory=* ) at_change_dir=: at_dir=$at_optarg ;; # Keywords. --keywords | -k ) at_prev=--keywords ;; --keywords=* ) at_groups_selected=$at_help_all at_save_IFS=$IFS IFS=, set X $at_optarg shift IFS=$at_save_IFS for at_keyword do at_invert= case $at_keyword in '!'*) at_invert="-v" at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'` ;; esac # It is on purpose that we match the test group titles too. at_groups_selected=`$as_echo "$at_groups_selected" | grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` done # Smash the newlines. at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' | tr "$as_nl" ' ' ` at_groups="$at_groups$at_groups_selected " ;; *=*) at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $at_envvar in '' | [0-9]* | *[!_$as_cr_alnum]* ) { { $as_echo "$as_me:$LINENO: error: invalid variable name: $at_envvar" >&5 $as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;} { (exit 1); exit 1; }; } ;; esac at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` # Export now, but save eval for later and for debug scripts. export $at_envvar at_debug_args="$at_debug_args $at_envvar='$at_value'" ;; *) $as_echo "$as_me: invalid option: $at_option" >&2 $as_echo "Try \`$0 --help' for more information." >&2 exit 1 ;; esac done # Verify our last option didn't require an argument if test -n "$at_prev"; then { { $as_echo "$as_me:$LINENO: error: \`$at_prev' requires an argument." >&5 $as_echo "$as_me: error: \`$at_prev' requires an argument." >&2;} { (exit 1); exit 1; }; } fi # Selected test groups. if test -z "$at_groups"; then at_groups=$at_groups_all else # Sort the tests, removing duplicates. at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu` fi # Help message. if $at_help_p; then cat <<_ATEOF || at_write_fail=1 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] Run all the tests, or the selected TESTS, given by numeric ranges, and save a detailed log file. Upon failure, create debugging scripts. You should not change environment variables unless explicitly passed as command line arguments. Set \`AUTOTEST_PATH' to select the executables to exercise. Each relative directory is expanded as build and source directories relatively to the top level of this distribution. E.g., $ $0 AUTOTEST_PATH=bin possibly amounts into PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH _ATEOF cat <<_ATEOF || at_write_fail=1 Operation modes: -h, --help print the help message, then exit -V, --version print version number, then exit -c, --clean remove all the files this test suite might create and exit -l, --list describes all the tests, or the selected TESTS _ATEOF cat <<_ATEOF || at_write_fail=1 Execution tuning: -C, --directory=DIR change to directory DIR before starting -k, --keywords=KEYWORDS select the tests matching all the comma-separated KEYWORDS multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output default for debugging scripts -d, --debug inhibit clean up and top-level logging default for debugging scripts -x, --trace enable tests shell tracing _ATEOF cat <<_ATEOF || at_write_fail=1 Report bugs to . _ATEOF exit $at_write_fail fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 GNU dico 2.2 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS _ATEOF # Passing at_groups is tricky. We cannot use it to form a literal string # or regexp because of the limitation of AIX awk. And Solaris' awk # doesn't grok more than 99 fields in a record, so we have to use `split'. # at_groups needs to be space-separated for this script to work. case $at_groups in *"$as_nl"* ) at_groups=`$as_echo "$at_groups" | tr "$as_nl" ' '` ;; esac $as_echo "$at_groups$as_nl$at_help_all" | awk 'BEGIN { FS = ";" } NR == 1 { for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1 next } { if (selected[$ 1]) { printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 if ($ 4) printf " %s\n", $ 4 } }' || at_write_fail=1 exit $at_write_fail fi if $at_version_p; then $as_echo "$as_me (GNU dico 2.2)" && cat <<\_ACEOF || at_write_fail=1 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit $at_write_fail fi # Should we print banners? at_groups is space-separated for entire test, # newline-separated if only a subset of the testsuite is run. case $at_groups in *' '*' '* | *"$as_nl"*"$as_nl"* ) at_print_banners=: ;; * ) at_print_banners=false ;; esac # Text for banner N, set to empty once printed. # Take any -C into account. if $at_change_dir ; then if test x- = "x$at_dir" ; then at_dir=./- fi test x != "x$at_dir" && cd "$at_dir" \ || { { $as_echo "$as_me:$LINENO: error: unable to change directory" >&5 $as_echo "$as_me: error: unable to change directory" >&2;} { (exit 1); exit 1; }; } at_dir=`pwd` fi # Load the config files for any default variable assignments. for at_file in atconfig atlocal do test -r $at_file || continue . ./$at_file || { { $as_echo "$as_me:$LINENO: error: invalid content: $at_file" >&5 $as_echo "$as_me: error: invalid content: $at_file" >&2;} { (exit 1); exit 1; }; } done # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: : ${at_top_build_prefix=$at_top_builddir} # Perform any assignments requested during argument parsing. eval "$at_debug_args" # atconfig delivers names relative to the directory the test suite is # in, but the groups themselves are run in testsuite-dir/group-dir. if test -n "$at_top_srcdir"; then builddir=../.. for at_dir_var in srcdir top_srcdir top_build_prefix do at_val=`eval 'as_val=${'at_$at_dir_var'} $as_echo "$as_val"'` case $at_val in [\\/$]* | ?:[\\/]* ) at_prefix= ;; *) at_prefix=../../ ;; esac eval "$at_dir_var=\$at_prefix\$at_val" done fi ## ------------------- ## ## Directory structure ## ## ------------------- ## # This is the set of directories and files used by this script # (non-literals are capitalized): # # TESTSUITE - the testsuite # TESTSUITE.log - summarizes the complete testsuite run # TESTSUITE.dir/ - created during a run, remains after -d or failed test # + at-groups/ - during a run: status of all groups in run # | + NNN/ - during a run: meta-data about test group NNN # | | + check-line - location (source file and line) of current AT_CHECK # | | + status - exit status of current AT_CHECK # | | + stdout - stdout of current AT_CHECK # | | + stder1 - stderr, including trace # | | + stderr - stderr, with trace filtered out # | | + test-source - portion of testsuite that defines group # | | + times - timestamps for computing duration # | | + pass - created if group passed # | | + xpass - created if group xpassed # | | + fail - created if group failed # | | + xfail - created if group xfailed # | | + skip - created if group skipped # + at-stop - during a run: end the run if this file exists # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction # + 0..NNN/ - created for each group NNN, remains after -d or failed test # | + TESTSUITE.log - summarizes the group results # | + ... - files created during the group # The directory the whole suite works in. # Should be absolute to let the user `cd' at will. at_suite_dir=$at_dir/$as_me.dir # The file containing the suite. at_suite_log=$at_dir/$as_me.log # The directory containing helper files per test group. at_helper_dir=$at_suite_dir/at-groups # Stop file: if it exists, do not start new jobs. at_stop_file=$at_suite_dir/at-stop if $at_clean; then test -d "$at_suite_dir" && find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -f -r "$at_suite_dir" "$at_suite_log" exit $? fi # Don't take risks: use only absolute directories in PATH. # # For stand-alone test suites (ie. atconfig was not found), # AUTOTEST_PATH is relative to `.'. # # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` at_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $AUTOTEST_PATH $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR case $as_dir in [\\/]* | ?:[\\/]* ) at_path=$at_path$as_dir ;; * ) if test -z "$at_top_build_prefix"; then # Stand-alone test suite. at_path=$at_path$as_dir else # Embedded test suite. at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR at_path=$at_path$at_top_srcdir/$as_dir fi ;; esac done IFS=$as_save_IFS # Now build and simplify PATH. # # There might be directories that don't exist, but don't redirect # builtins' (eg., cd) stderr directly: Ultrix's sh hates that. at_new_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $at_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -d "$as_dir" || continue case $as_dir in [\\/]* | ?:[\\/]* ) ;; * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; esac case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;; esac done IFS=$as_save_IFS PATH=$at_new_path export PATH # Setting up the FDs. # 5 is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null else : >"$at_suite_log" fi exec 5>>"$at_suite_log" # Banners and logs. cat <<\_ASBOX ## ------------------------ ## ## GNU dico 2.2 test suite. ## ## ------------------------ ## _ASBOX { cat <<\_ASBOX ## ------------------------ ## ## GNU dico 2.2 test suite. ## ## ------------------------ ## _ASBOX echo $as_echo "$as_me: command line was:" $as_echo " \$ $0 $at_cli_args" echo # Try to find a few ChangeLogs in case it might help determining the # exact version. Use the relative dir: if the top dir is a symlink, # find will not follow it (and options to follow the links are not # portable), which would result in no output here. Prune directories # matching the package tarname, since they tend to be leftovers from # `make dist' or `make distcheck' and contain redundant or stale logs. if test -n "$at_top_srcdir"; then cat <<\_ASBOX ## ----------- ## ## ChangeLogs. ## ## ----------- ## _ASBOX echo for at_file in `find "$at_top_srcdir" -name "dico-*" -prune -o -name ChangeLog -print` do $as_echo "$as_me: $at_file:" sed 's/^/| /;10q' $at_file echo done fi { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } echo # Contents of the config files. for at_file in atconfig atlocal do test -r $at_file || continue $as_echo "$as_me: $at_file:" sed 's/^/| /' $at_file echo done } >&5 ## --------------- ## ## Shell functions ## ## --------------- ## # at_func_banner NUMBER # --------------------- # Output banner NUMBER, provided the testsuite is running multiple groups # and this particular banner has not yet been printed. at_func_banner () { $at_print_banners || return 0 eval at_banner_text=\$at_banner_text_$1 test "x$at_banner_text" = x && return 0 eval at_banner_text_$1= $as_echo "$as_nl$at_banner_text$as_nl" } # at_func_banner # at_func_check_newline COMMAND # ----------------------------- # Test if COMMAND includes a newline and, if so, print a message and return # exit code 1 at_func_check_newline () { case "$1" in *' '*) echo 'Not enabling shell tracing (command contains an embedded newline)' return 1 ;; *) return 0 ;; esac } # at_func_filter_trace EXIT-CODE # ------------------------------ # Split the contents of file "$at_stder1" into the "set -x" trace (on stderr) # and the other lines (on file "$at_stderr"). Return the exit code EXIT-CODE. at_func_filter_trace () { grep '^ *+' "$at_stder1" >&2 grep -v '^ *+' "$at_stder1" >"$at_stderr" return $1 } # at_func_log_failure FILE-LIST # ----------------------------- # Copy the files in the list on stdout with a "> " prefix, and exit the shell # with a failure exit code. at_func_log_failure () { for file do $as_echo "$file:"; sed 's/^/> /' "$file"; done echo 1 > "$at_status_file" exit 1 } # at_func_check_skip EXIT-CODE # ---------------------------- # Check whether EXIT-CODE is the special exit code 77, and if so exit the shell # with that same exit code. at_func_check_skip () { case $1 in 77) echo 77 > "$at_status_file"; exit 77;; esac } # at_func_check_status EXPECTED EXIT-CODE LINE # -------------------------------------------- # Check whether EXIT-CODE is the expected exit code, and if so do nothing. # Otherwise, if it is 77 exit the shell with that same exit code; if it is # anything else print an error message and fail the test. at_func_check_status () { case $2 in $1 ) ;; 77) echo 77 > "$at_status_file"; exit 77;; *) $as_echo "$3: exit code was $2, expected $1" at_failed=:;; esac } # at_func_diff_devnull FILE # ------------------------- # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless # diff invocations. at_func_diff_devnull () { test -s "$1" || return 0 $at_diff "$at_devnull" "$1" } # at_func_test NUMBER # ------------------- # Parse out test NUMBER from the tail of this file. at_func_test () { eval at_sed=\$at_sed$1 sed "$at_sed" "$at_myself" > "$at_test_source" } # at_func_create_debugging_script # ------------------------------- # Create the debugging script $at_group_dir/run which will reproduce the # current test group. at_func_create_debugging_script () { { echo "#! /bin/sh" && echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && $as_echo "cd '$at_dir'" && $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && echo 'exit 1' } >"$at_group_dir/run" && chmod +x "$at_group_dir/run" } # at_func_arith # ------------- # Arithmetic evaluation, avoids expr if the shell is sane. The # interpretation of leading zeroes is unspecified. # # subshell and eval are needed to keep Solaris sh from bailing out: if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then # With "$@", bash does not split positional parameters: eval 'at_func_arith () { at_func_arith_result=$(( $* )) }' else at_func_arith () { at_func_arith_result=`expr "$@"` } fi ## ---------------------- ## ## End of shell functions ## ## ---------------------- ## { cat <<\_ASBOX ## ---------------- ## ## Tested programs. ## ## ---------------- ## _ASBOX echo } >&5 # Report what programs are being tested. for at_program in : $at_tested do test "$at_program" = : && continue as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -f "$as_dir/$at_program" && break done IFS=$as_save_IFS if test -f "$as_dir/$at_program"; then { $as_echo "$at_srcdir/testsuite.at:27: $as_dir/$at_program --version" "$as_dir/$at_program" --version &5 2>&1 else { { $as_echo "$as_me:$LINENO: error: cannot find $at_program" >&5 $as_echo "$as_me: error: cannot find $at_program" >&2;} { (exit 1); exit 1; }; } fi done { cat <<\_ASBOX ## ------------------ ## ## Running the tests. ## ## ------------------ ## _ASBOX } >&5 at_start_date=`date` at_start_time=`date +%s 2>/dev/null` $as_echo "$as_me: starting at: $at_start_date" >&5 # Create the master directory if it doesn't already exist. test -d "$at_suite_dir" || mkdir "$at_suite_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5 $as_echo "$as_me: error: cannot create '$at_suite_dir'" >&2;} { (exit 1); exit 1; }; } # Can we diff with `/dev/null'? DU 5.0 refuses. if diff /dev/null /dev/null >/dev/null 2>&1; then at_devnull=/dev/null else at_devnull=$at_suite_dir/devnull >"$at_devnull" fi # Use `diff -u' when possible. if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff" then at_diff='diff -u' else at_diff=diff fi # Get the last needed group. for at_group in : $at_groups; do :; done # Extract the start and end lines of each test group at the tail # of this file awk ' BEGIN { FS="" } /^#AT_START_/ { start = NR } /^#AT_STOP_/ { test = substr ($ 0, 10) print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_suite_dir/at-source-lines" && . "$at_suite_dir/at-source-lines" || { { $as_echo "$as_me:$LINENO: error: cannot create test line number cache" >&5 $as_echo "$as_me: error: cannot create test line number cache" >&2;} { (exit 1); exit 1; }; } rm -f "$at_suite_dir/at-source-lines" # Set up helper dirs. rm -rf "$at_helper_dir" && mkdir "$at_helper_dir" && cd "$at_helper_dir" && { test -z "$at_groups" || mkdir $at_groups; } || { { $as_echo "$as_me:$LINENO: error: testsuite directory setup failed" >&5 $as_echo "$as_me: error: testsuite directory setup failed" >&2;} { (exit 1); exit 1; }; } # Functions for running a test group. We leave the actual # test group execution outside of a shell function in order # to avoid hitting zsh 4.x exit status bugs. # at_func_group_prepare # --------------------- # Prepare running a test group at_func_group_prepare () { # The directory for additional per-group helper files. at_job_dir=$at_helper_dir/$at_group # The file containing the location of the last AT_CHECK. at_check_line_file=$at_job_dir/check-line # The file containing the exit status of the last command. at_status_file=$at_job_dir/status # The files containing the output of the tested commands. at_stdout=$at_job_dir/stdout at_stder1=$at_job_dir/stder1 at_stderr=$at_job_dir/stderr # The file containing the code for a test group. at_test_source=$at_job_dir/test-source # The file containing dates. at_times_file=$at_job_dir/times # Be sure to come back to the top test directory. cd "$at_suite_dir" # Clearly separate the test groups when verbose. $at_first || $at_verbose echo at_group_normalized=$at_group eval 'while :; do case $at_group_normalized in #( '"$at_format"'*) break;; esac at_group_normalized=0$at_group_normalized done' # Create a fresh directory for the next test group, and enter. at_group_dir=$at_suite_dir/$at_group_normalized at_group_log=$at_group_dir/$as_me.log if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -fr "$at_group_dir" || { $as_echo "$as_me:$LINENO: WARNING: test directory for $at_group_normalized could not be cleaned." >&5 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;} fi # Be tolerant if the above `rm' was not able to remove the directory. { as_dir="$at_group_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } echo 0 > "$at_status_file" # In verbose mode, append to the log file *and* show on # the standard output; in quiet mode only write to the log. if test -z "$at_verbose"; then at_tee_pipe='tee -a "$at_group_log"' else at_tee_pipe='cat >> "$at_group_log"' fi } # at_func_group_postprocess # ------------------------- at_func_group_postprocess () { # Be sure to come back to the suite directory, in particular # since below we might `rm' the group directory we are in currently. cd "$at_suite_dir" if test ! -f "$at_check_line_file"; then sed "s/^ */$as_me: WARNING: /" <<_ATEOF A failure happened in a test group before any test could be run. This means that test suite is improperly designed. Please report this failure to . _ATEOF $as_echo "$at_setup_line" >"$at_check_line_file" fi $at_verbose $as_echo_n "$at_group. $at_setup_line: " $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" case $at_xfail:$at_status in yes:0) at_msg="UNEXPECTED PASS" at_res=xpass at_errexit=$at_errexit_p ;; no:0) at_msg="ok" at_res=pass at_errexit=false ;; *:77) at_msg='skipped ('`cat "$at_check_line_file"`')' at_res=skip at_errexit=false ;; yes:*) at_msg='expected failure ('`cat "$at_check_line_file"`')' at_res=xfail at_errexit=false ;; no:*) at_msg='FAILED ('`cat "$at_check_line_file"`')' at_res=fail at_errexit=$at_errexit_p ;; esac echo "$at_res" > "$at_job_dir/$at_res" # Make sure there is a separator even with long titles. $as_echo " $at_msg" at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in 0|77) # $at_times_file is only available if the group succeeded. # We're not including the group log, so the success message # is written in the global log separately. But we also # write to the group log in case they're using -d. if test -f "$at_times_file"; then at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' rm -f "$at_times_file" fi $as_echo "$at_log_msg" >> "$at_group_log" $as_echo "$at_log_msg" >&5 # Cleanup the group directory, unless the user wants the files. if $at_debug_p; then at_func_create_debugging_script else if test -d "$at_group_dir"; then find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; rm -fr "$at_group_dir" fi rm -f "$at_test_source" fi ;; *) # Upon failure, include the log into the testsuite's global # log. The failure message is written in the group log. It # is later included in the global log. $as_echo "$at_log_msg" >> "$at_group_log" # Upon failure, keep the group directory for autopsy, and create # the debugging script. With -e, do not start any further tests. at_func_create_debugging_script if $at_errexit; then echo stop > "$at_stop_file" fi ;; esac } ## ------------ ## ## Driver loop. ## ## ------------ ## rm -f "$at_stop_file" at_first=: for at_group in $at_groups; do at_func_group_prepare if cd "$at_group_dir" && at_func_test $at_group && . "$at_test_source"; then :; else { $as_echo "$as_me:$LINENO: WARNING: unable to parse test group: $at_group" >&5 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} at_failed=: fi at_func_group_postprocess test -f "$at_stop_file" && break at_first=false done # Wrap up the test suite with summary statistics. cd "$at_helper_dir" # Use ?..???? when the list must remain sorted, the faster * otherwise. at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do echo $f; done | sed '/?/d; s,/xpass,,'` at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do echo $f; done | sed '/?/d; s,/fail,,'` set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list shift; at_group_count=$# set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* set X $at_xfail_list; shift; at_xfail_count=$# set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* set X $at_skip_list; shift; at_skip_count=$# at_func_arith $at_group_count - $at_skip_count at_run_count=$at_func_arith_result at_func_arith $at_xpass_count + $at_fail_count at_unexpected_count=$at_func_arith_result at_func_arith $at_xfail_count + $at_fail_count at_total_fail_count=$at_func_arith_result # Back to the top directory. cd "$at_dir" rm -rf "$at_helper_dir" # Compute the duration of the suite. at_stop_date=`date` at_stop_time=`date +%s 2>/dev/null` $as_echo "$as_me: ending at: $at_stop_date" >&5 case $at_start_time,$at_stop_time in [0-9]*,[0-9]*) at_func_arith $at_stop_time - $at_start_time at_duration_s=$at_func_arith_result at_func_arith $at_duration_s / 60 at_duration_m=$at_func_arith_result at_func_arith $at_duration_m / 60 at_duration_h=$at_func_arith_result at_func_arith $at_duration_s % 60 at_duration_s=$at_func_arith_result at_func_arith $at_duration_m % 60 at_duration_m=$at_func_arith_result at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" $as_echo "$as_me: test suite duration: $at_duration" >&5 ;; esac echo cat <<\_ASBOX ## ------------- ## ## Test results. ## ## ------------- ## _ASBOX echo { echo cat <<\_ASBOX ## ------------- ## ## Test results. ## ## ------------- ## _ASBOX echo } >&5 if test $at_run_count = 1; then at_result="1 test" at_were=was else at_result="$at_run_count tests" at_were=were fi if $at_errexit_p && test $at_unexpected_count != 0; then if test $at_xpass_count = 1; then at_result="$at_result $at_were run, one passed" else at_result="$at_result $at_were run, one failed" fi at_result="$at_result unexpectedly and inhibited subsequent tests." else # Don't you just love exponential explosion of the number of cases? case $at_xpass_count:$at_fail_count:$at_xfail_count in # So far, so good. 0:0:0) at_result="$at_result $at_were successful." ;; 0:0:*) at_result="$at_result behaved as expected." ;; # Some unexpected failures 0:*:0) at_result="$at_result $at_were run, $at_fail_count failed unexpectedly." ;; # Some failures, both expected and unexpected 0:*:1) at_result="$at_result $at_were run, $at_total_fail_count failed ($at_xfail_count expected failure)." ;; 0:*:*) at_result="$at_result $at_were run, $at_total_fail_count failed ($at_xfail_count expected failures)." ;; # No unexpected failures, but some xpasses *:0:*) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly." ;; # No expected failures, but failures and xpasses *:1:0) at_result="$at_result $at_were run, $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; *:*:0) at_result="$at_result $at_were run, $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; # All of them. *:*:1) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly, $at_total_fail_count failed ($at_xfail_count expected failure)." ;; *:*:*) at_result="$at_result $at_were run, $at_xpass_count passed unexpectedly, $at_total_fail_count failed ($at_xfail_count expected failures)." ;; esac if test $at_skip_count = 0 && test $at_run_count -gt 1; then at_result="All $at_result" fi fi # Now put skips in the mix. case $at_skip_count in 0) ;; 1) at_result="$at_result 1 test was skipped." ;; *) at_result="$at_result $at_skip_count tests were skipped." ;; esac if test $at_unexpected_count = 0; then echo "$at_result" echo "$at_result" >&5 else echo "ERROR: $at_result" >&2 echo "ERROR: $at_result" >&5 { echo cat <<\_ASBOX ## ------------------------ ## ## Summary of the failures. ## ## ------------------------ ## _ASBOX # Summary of failed and skipped tests. if test $at_fail_count != 0; then echo "Failed tests:" $SHELL "$at_myself" $at_fail_list --list echo fi if test $at_skip_count != 0; then echo "Skipped tests:" $SHELL "$at_myself" $at_skip_list --list echo fi if test $at_xpass_count != 0; then echo "Unexpected passes:" $SHELL "$at_myself" $at_xpass_list --list echo fi if test $at_fail_count != 0; then cat <<\_ASBOX ## ---------------------- ## ## Detailed failed tests. ## ## ---------------------- ## _ASBOX echo for at_group in $at_fail_list do at_group_normalized=$at_group eval 'while :; do case $at_group_normalized in #( '"$at_format"'*) break;; esac at_group_normalized=0$at_group_normalized done' cat "$at_suite_dir/$at_group_normalized/$as_me.log" echo done echo fi if test -n "$at_top_srcdir"; then sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## ${at_top_build_prefix}config.log ## _ASBOX sed 's/^/| /' ${at_top_build_prefix}config.log echo fi } >&5 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## $as_me.log was created. ## _ASBOX echo $as_echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help: To: Subject: [GNU dico 2.2] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} " if test $at_debug_p = false; then echo echo 'You may investigate any problem if you feel able to do so, in which' echo 'case the test suite provides a good starting point. Its output may' $as_echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'." echo fi exit 1 fi exit 0 ## ------------- ## ## Actual tests. ## ## ------------- ## #AT_START_1 # 1. testsuite.at:28: dicod version at_setup_line='testsuite.at:28' at_desc="dicod version" $at_quiet $as_echo_n " 1: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "1. testsuite.at:28: testing ..." $at_traceon { $at_traceoff $as_echo "$at_srcdir/testsuite.at:28: dicod --version | sed '1{s/ *\\[.*\\]//;q;}' " echo testsuite.at:28 >"$at_check_line_file" if test -n "$at_traceon"; then ( $at_traceon; dicod --version | sed '1{s/ *\[.*\]//;q;}' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; dicod --version | sed '1{s/ *\[.*\]//;q;}' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "dicod (GNU dico) 2.2 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/testsuite.at:28" if $at_failed; then cat >.xfailfile <<'_EOT' ============================================================== WARNING: Not using the proper version, *all* checks dubious... ============================================================== _EOT else rm -f $XFAILFILE fi $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_1 #AT_START_2 # 2. startup.at:17: startup at_setup_line='startup.at:17' at_desc="startup" $at_quiet $as_echo_n " 2: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "2. startup.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/startup.at:22: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo startup.at:22 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/startup.at:22" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_2 #AT_START_3 # 3. help00.at:17: help at_setup_line='help00.at:17' at_desc="help" $at_quiet $as_echo_n " 3: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "3. help00.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' help quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/help00.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler \"echo null\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d'" echo help00.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database using strategy SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide information about the database SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/help00.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_3 #AT_START_4 # 4. help01.at:17: help reflects capabilities at_setup_line='help01.at:17' at_desc="help reflects capabilities" $at_quiet $as_echo_n " 4: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "4. help01.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' help quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/help01.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; user-db text://\$abs_srcdir { password-resource passwd; group-resource group; } database { name dummy; handler \"echo null\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d'" echo help01.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; user-db text://$abs_srcdir { password-resource passwd; group-resource group; } database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; user-db text://$abs_srcdir { password-resource passwd; group-resource group; } database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database using strategy SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide information about the database SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection AUTH user string -- provide authentication information . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/help01.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_4 #AT_START_5 # 5. help02.at:17: user-defined help at_setup_line='help02.at:17' at_desc="user-defined help" $at_quiet $as_echo_n " 5: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "5. help02.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' help quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/help02.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; help-text <"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; help-text <"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; help-text <"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 113 help text follows No special help is available for this server. . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/help02.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_5 #AT_START_6 # 6. help03.at:17: user-augmented help at_setup_line='help03.at:17' at_desc="user-augmented help" $at_quiet $as_echo_n " 6: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "6. help03.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' help quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/help03.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; help-text <"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; help-text <"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; help-text <"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database using strategy SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide information about the database SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection Have fun! . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/help03.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_6 #AT_START_7 # 7. showstrat.at:17: show strategies at_setup_line='showstrat.at:17' at_desc="show strategies" $at_quiet $as_echo_n " 7: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "7. showstrat.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show strategies quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/showstrat.at:24: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo showstrat.at:24 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 111 10 strategies present: list follows exact \"Match words exactly\" prefix \"Match word prefixes\" suffix \"Match word suffixes\" soundex \"Match using SOUNDEX algorithm\" lev \"Match headwords within given Levenshtein distance\" nlev \"Match headwords within given Levenshtein distance (normalized)\" dlev \"Match headwords within given Damerau-Levenshtein distance\" ndlev \"Match headwords within given Damerau-Levenshtein distance (normalized)\" re \"POSIX 1003.2 (modern) regular expressions\" regexp \"Old (basic) regular expressions\" . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/showstrat.at:24" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_7 #AT_START_8 # 8. showdb.at:17: show databases at_setup_line='showdb.at:17' at_desc="show databases" $at_quiet $as_echo_n " 8: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "8. showdb.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show databases quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/showdb.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database a { name \"A\"; handler echo; description \"Database A\"; } database b { name \"B\"; handler echo; description \"Database B\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' " echo showdb.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database a { name "A"; handler echo; description "Database A"; } database b { name "B"; handler echo; description "Database B"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database a { name "A"; handler echo; description "Database A"; } database b { name "B"; handler echo; description "Database B"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 110 2 databases present A \"Database A\" B \"Database B\" . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/showdb.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_8 #AT_START_9 # 9. info.at:17: info at_setup_line='info.at:17' at_desc="info" $at_quiet $as_echo_n " 9: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "9. info.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show db quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/info.at:24: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler \"echo null\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo info.at:24 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 110 1 databases present dummy \"GNU Dico NULL database\" . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/info.at:24" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_9 #AT_START_10 # 10. descr.at:17: descr at_setup_line='descr.at:17' at_desc="descr" $at_quiet $as_echo_n " 10: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "10. descr.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show info dummy quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/descr.at:24: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler \"echo null\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo descr.at:24 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 112 information for dummy NULL database. This database returns NULL (no result) to any match and define requests. . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/descr.at:24" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_10 #AT_START_11 # 11. match.at:17: match at_setup_line='match.at:17' at_desc="match" $at_quiet $as_echo_n " 11: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "11. match.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' match * . test quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/match.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name echo; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo match.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name echo; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name echo; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 152 1 matches found: list follows echo \"test\" . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/match.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_11 #AT_START_12 # 12. nomatch.at:17: no match at_setup_line='nomatch.at:17' at_desc="no match" $at_quiet $as_echo_n " 12: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "12. nomatch.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' match * . test quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/nomatch.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler \"echo null\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo nomatch.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 552 No match 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/nomatch.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_12 #AT_START_13 # 13. def.at:17: define at_setup_line='def.at:17' at_desc="define" $at_quiet $as_echo_n " 13: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "13. def.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' define * test quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/def.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name echo; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo def.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name echo; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name echo; handler echo; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 150 1 definitions found: list follows 151 \"test\" echo \"GNU Dico ECHO database\" test . 250 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/def.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_13 #AT_START_14 # 14. nodef.at:17: no definition at_setup_line='nodef.at:17' at_desc="no definition" $at_quiet $as_echo_n " 14: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "14. nodef.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' define * test quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/nodef.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler \"echo null\"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'" echo nodef.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 552 No match 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/nodef.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_14 #AT_START_15 # 15. apop.at:17: apop at_setup_line='apop.at:17' at_desc="apop" $at_quiet $as_echo_n " 15: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "15. apop.at:17: testing ..." $at_traceon { $at_traceoff $as_echo "$at_srcdir/apop.at:19: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; database { name dummy; handler \"echo null\"; } user-db text://\$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ apopauth gray guessme dicod --config ./dicod.conf --stderr -i" echo apop.at:19 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; database { name dummy; handler "echo null"; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ apopauth gray guessme dicod --config ./dicod.conf --stderr -i ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; database { name dummy; handler "echo null"; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ apopauth gray guessme dicod --config ./dicod.conf --stderr -i ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: at_func_diff_devnull "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/apop.at:19" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_15 #AT_START_16 # 16. vis00.at:17: global visibility-acl at_setup_line='vis00.at:17' at_desc="global visibility-acl" $at_quiet $as_echo_n " 16: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "16. vis00.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show databases quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/vis00.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl global { allow authenticated from any; deny all; } visibility-acl global; database { name dummy; handler echo; } user-db text://\$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo \"Not authenticated\" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' echo \"Authenticated\" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i " echo vis00.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl global { allow authenticated from any; deny all; } visibility-acl global; database { name dummy; handler echo; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo "Not authenticated" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' echo "Authenticated" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl global { allow authenticated from any; deny all; } visibility-acl global; database { name dummy; handler echo; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo "Not authenticated" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' echo "Authenticated" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Not authenticated 220 554 No databases present 221 Authenticated 110 1 databases present dummy \"GNU Dico ECHO database\" . 250 ok 221 bye " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/vis00.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_16 #AT_START_17 # 17. vis01.at:17: per-database visibility-acl at_setup_line='vis01.at:17' at_desc="per-database visibility-acl" $at_quiet $as_echo_n " 17: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "17. vis01.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show databases quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/vis01.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl global { allow authenticated; deny all; } acl admin { allow group admin; deny all; } visibility-acl global; database a { name \"A\"; handler echo; description \"Globally-visible database\"; } database b { name \"B\"; handler echo; visibility-acl admin; description \"Visible for group admin\"; } user-db text://\$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo \"Not authenticated\" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' echo \"Authenticated user\" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i echo \"Authenticated admin\" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i " echo vis01.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl global { allow authenticated; deny all; } acl admin { allow group admin; deny all; } visibility-acl global; database a { name "A"; handler echo; description "Globally-visible database"; } database b { name "B"; handler echo; visibility-acl admin; description "Visible for group admin"; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo "Not authenticated" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' echo "Authenticated user" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i echo "Authenticated admin" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl global { allow authenticated; deny all; } acl admin { allow group admin; deny all; } visibility-acl global; database a { name "A"; handler echo; description "Globally-visible database"; } database b { name "B"; handler echo; visibility-acl admin; description "Visible for group admin"; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo "Not authenticated" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' echo "Authenticated user" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i echo "Authenticated admin" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Not authenticated 220 554 No databases present 221 Authenticated user 110 1 databases present A \"Globally-visible database\" . 250 ok 221 bye Authenticated admin 110 2 databases present A \"Globally-visible database\" B \"Visible for group admin\" . 250 ok 221 bye " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/vis01.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_17 #AT_START_18 # 18. vis02.at:17: server info visibility at_setup_line='vis02.at:17' at_desc="server info visibility" $at_quiet $as_echo_n " 18: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "18. vis02.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' show server quit _ATEOF { $at_traceoff $as_echo "$at_srcdir/vis02.at:23: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl admin { allow group admin; deny all; } database a { name \"A\"; handler echo; } show-sys-info admin; user-db text://\$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo \"Not authenticated\" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' | sed 's/dicod server on .*/dicod server/' echo \"Authenticated user\" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i | sed 's/dicod server on .*/dicod server/' echo \"Authenticated admin\" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i | sed 's/dicod (GNU dico 2.2).*/dicod version/' " echo vis02.at:23 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl admin { allow group admin; deny all; } database a { name "A"; handler echo; } show-sys-info admin; user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo "Not authenticated" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' | sed 's/dicod server on .*/dicod server/' echo "Authenticated user" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i | sed 's/dicod server on .*/dicod server/' echo "Authenticated admin" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i | sed 's/dicod (GNU dico 2.2).*/dicod version/' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; capability auth; acl admin { allow group admin; deny all; } database a { name "A"; handler echo; } show-sys-info admin; user-db text://$abs_srcdir { password-resource passwd; group-resource group; } __EOT__ echo "Not authenticated" dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//' | sed 's/dicod server on .*/dicod server/' echo "Authenticated user" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i | sed 's/dicod server on .*/dicod server/' echo "Authenticated admin" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i | sed 's/dicod (GNU dico 2.2).*/dicod version/' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "Not authenticated 220 114 server information dicod server . 250 221 Authenticated user 114 server information dicod server . 250 ok 221 bye Authenticated admin 114 server information dicod version . 250 ok 221 bye " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/vis02.at:23" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_18 #AT_START_19 # 19. alias.at:17: aliases at_setup_line='alias.at:17' at_desc="aliases" $at_quiet $as_echo_n " 19: $at_desc " at_xfail=no echo "# -*- compilation -*-" >> "$at_group_log" ( $as_echo "19. alias.at:17: testing ..." $at_traceon cat >input <<'_ATEOF' dblist da word mf test q _ATEOF { $at_traceoff $as_echo "$at_srcdir/alias.at:26: cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler \"echo null\"; } alias dblist show databases; alias d DEFINE; alias da d \"*\"; alias df d \"!\"; alias m MATCH; alias mas m \"*\"; alias mfs m \"!\"; alias ma mas \".\"; alias mf mfs \".\"; alias q QUIT; __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d'" echo alias.at:26 >"$at_check_line_file" if { echo 'Not enabling shell tracing (command contains an embedded newline)' false; }; then ( $at_traceon; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } alias dblist show databases; alias d DEFINE; alias da d "*"; alias df d "!"; alias m MATCH; alias mas m "*"; alias mfs m "!"; alias ma mas "."; alias mf mfs "."; alias q QUIT; __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d' ) >"$at_stdout" 2>"$at_stder1" at_func_filter_trace $? else ( :; cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; database { name dummy; handler "echo null"; } alias dblist show databases; alias d DEFINE; alias da d "*"; alias df d "!"; alias m MATCH; alias mas m "*"; alias mfs m "!"; alias ma mas "."; alias mf mfs "."; alias q QUIT; __EOT__ dicod --config ./dicod.conf --stderr -i < input | tr -d '\r' | sed 's/^\(2[25][0-9]\) .*/\1/;s/ *$//'|sed '/SASLAUTH/d' ) >"$at_stdout" 2>"$at_stderr" fi at_status=$? at_failed=false at_func_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "220 110 1 databases present dummy \"GNU Dico NULL database\" . 250 552 No match 552 No match 221 " | \ $at_diff - "$at_stdout" || at_failed=: at_func_check_status 0 $at_status "$at_srcdir/alias.at:26" $at_failed && at_func_log_failure $at_traceon; } $at_traceoff $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 | eval $at_tee_pipe at_status=`cat "$at_status_file"` #AT_STOP_19 dico-2.2/dicod/tests/testsuite.at000066400000000000000000000024271172612674100171120ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . m4_include([testsuite.inc]) m4_define([DICOD_CONFIG],[dnl cat > dicod.conf <<__EOT__ prepend-load-path "$abs_builddir"; load-module echo; $* __EOT__ ]) AT_INIT DICO_VERSION(dicod) m4_include([startup.at]) m4_include([help00.at]) m4_include([help01.at]) m4_include([help02.at]) m4_include([help03.at]) m4_include([showstrat.at]) m4_include([showdb.at]) m4_include([info.at]) m4_include([descr.at]) m4_include([match.at]) m4_include([nomatch.at]) m4_include([def.at]) m4_include([nodef.at]) m4_include([apop.at]) m4_include([vis00.at]) m4_include([vis01.at]) m4_include([vis02.at]) m4_include([alias.at]) dico-2.2/dicod/tests/vis00.at000066400000000000000000000025331172612674100160200ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([global visibility-acl]) AT_KEYWORDS([auth apop vis00]) AT_DATA([input],[show databases quit ]) AT_CHECK([ DICOD_CONFIG([ capability auth; acl global { allow authenticated from any; deny all; } visibility-acl global; database { name dummy; handler echo; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } ]) echo "Not authenticated" DICOD_RUN echo "Authenticated" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i ], [0], [Not authenticated 220 554 No databases present 221 Authenticated 110 1 databases present dummy "GNU Dico ECHO database" . 250 ok 221 bye ]) AT_CLEANUP dico-2.2/dicod/tests/vis01.at000066400000000000000000000034021172612674100160150ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([per-database visibility-acl]) AT_KEYWORDS([auth apop vis01]) AT_DATA([input],[show databases quit ]) AT_CHECK([ DICOD_CONFIG([ capability auth; acl global { allow authenticated; deny all; } acl admin { allow group admin; deny all; } visibility-acl global; database a { name "A"; handler echo; description "Globally-visible database"; } database b { name "B"; handler echo; visibility-acl admin; description "Visible for group admin"; } user-db text://$abs_srcdir { password-resource passwd; group-resource group; } ]) echo "Not authenticated" DICOD_RUN echo "Authenticated user" apopauth -script=input smith testtset dicod --config ./dicod.conf --stderr -i echo "Authenticated admin" apopauth -script=input gray guessme dicod --config ./dicod.conf --stderr -i ], [0], [Not authenticated 220 554 No databases present 221 Authenticated user 110 1 databases present A "Globally-visible database" . 250 ok 221 bye Authenticated admin 110 2 databases present A "Globally-visible database" B "Visible for group admin" . 250 ok 221 bye ]) AT_CLEANUP dico-2.2/dicod/tests/vis02.at000066400000000000000000000032671172612674100160270ustar00rootroot00000000000000# This file is part of GNU Dico -*- Autotest -*- # Copyright (C) 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . AT_SETUP([server info visibility]) AT_KEYWORDS([auth apop vis02]) AT_DATA([input],[show server quit ]) AT_CHECK([ DICOD_CONFIG([ capability auth; acl admin { allow group admin; deny all; } database a { name "A"; handler echo; } show-sys-info admin; user-db text://$abs_srcdir { password-resource passwd; group-resource group; } ]) echo "Not authenticated" DICOD_RUN() | sed 's/dicod server on .*/dicod server/' echo "Authenticated user" apopauth -script=input smith testtset dicod --config ./dicod.conf dnl --stderr -i | sed 's/dicod server on .*/dicod server/' echo "Authenticated admin" apopauth -script=input gray guessme dicod --config ./dicod.conf dnl --stderr -i | sed 's/dicod (AT_PACKAGE_NAME AT_PACKAGE_VERSION).*/dicod version/' ], [0], [Not authenticated 220 114 server information dicod server . 250 221 Authenticated user 114 server information dicod server . 250 ok 221 bye Authenticated admin 114 server information dicod version . 250 ok 221 bye ]) AT_CLEANUP dico-2.2/dicod/xidle.c000066400000000000000000000021211172612674100146310ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include static void dicod_xidle(dico_stream_t str, int argc, char **argv) { stream_printf(str, "110 %lu second(s)\n", inactivity_timeout); } void register_xidle() { static struct dicod_command cmd[] = { { "XIDLE", 1, 1, NULL, "report inactivity timeout, reset idle timer", dicod_xidle }, { NULL } }; dicod_capa_register("xidle", cmd, NULL, NULL); } dico-2.2/dicod/xversion.c000066400000000000000000000022151172612674100154050ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 1998-2000, 2008, 2010, 2012 Sergey Poznyakoff GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ #include static void dicod_xversion(dico_stream_t str, int argc, char **argv) { stream_writez(str, "110 "); stream_writez(str, (char*)program_version); dico_stream_write(str, "\n", 1); } void register_xversion() { static struct dicod_command cmd[] = { { "XVERSION", 1, 1, NULL, "show implementation and version info", dicod_xversion }, { NULL } }; dicod_capa_register("xversion", cmd, NULL, NULL); } dico-2.2/dicoweb/000077500000000000000000000000001172612674100137165ustar00rootroot00000000000000dico-2.2/dicoweb/INSTALL000066400000000000000000000036571172612674100147620ustar00rootroot00000000000000GNU Dico - Dicoweb INSTALL Copyright (C) 2008-2010, 2012 Wojciech Polak * Dicoweb requirements ====================== - Django 1.0+ -- a Python Web framework (http://www.djangoproject.com/) - Wit -- a wiki translator distributed within GNU Dico. (http://puszcza.gnu.org.ua/projects/wit/) * Installation instructions =========================== Rename 'settings-sample.py' to 'settings.py' and edit your local Dicoweb site configuration. ** The development/test server ------------------------------ Change the current working directory into the `dicoweb' directory and run the command `python manage.py runserver'. You will see the following output: Validating models... 0 errors found. Django version 1.0, using settings 'dicoweb.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. ** Production server with mod_wsgi ---------------------------------- Apache configuration: LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias / /usr/local/django/dicoweb/dicoweb.wsgi Alias /static "/usr/local/django/dicoweb/static" More detailed information is available at: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango ** Production server with mod_python ------------------------------------ Apache configuration: LoadModule python_module modules/mod_python.so SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "sys.path + ['/usr/local/django', '/usr/local/django/dicoweb']" SetEnv DJANGO_SETTINGS_MODULE dicoweb.settings PythonInterpreter dicoweb PythonDebug Off SetHandler None SetHandler None AllowOverride All Options None Order allow,deny Allow from all Local Variables: mode: outline paragraph-separate: "[ ]*$" version-control: never End: dico-2.2/dicoweb/__init__.py000066400000000000000000000000001172612674100160150ustar00rootroot00000000000000dico-2.2/dicoweb/dicoclient/000077500000000000000000000000001172612674100160335ustar00rootroot00000000000000dico-2.2/dicoweb/dicoclient/__init__.py000066400000000000000000000013611172612674100201450ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . __all__ = ["dicoclient"] from dicoclient import * dico-2.2/dicoweb/dicoclient/dicoclient.py000066400000000000000000000321231172612674100205230ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import re import socket import base64 import quopri __version__ = '1.0' class DicoClient: """GNU Dico client module written in Python (a part of GNU Dico software)""" host = None; levenshtein_distance = 0 mime = False verbose = 0 timeout = 10 transcript = False __connected = False def __init__ (self, host=None): if host != None: self.host = host; def __del__ (self): if self.__connected: self.socket.close () def open (self, host=None, port=2628): """Open the connection to the DICT server.""" if host != None: self.host = host if self.verbose: self.__debug ('Connecting to %s:%d' % (self.host, port)) socket.setdefaulttimeout (int (self.timeout)) self.socket = socket.socket (socket.AF_INET, socket.SOCK_STREAM) self.socket.setsockopt (socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.connect ((self.host, port)) self.__connected = True self.fd = self.socket.makefile (); self.server_banner = self.__read ()[0] capas, msgid = re.search ('<(.*)> (<.*>)$', self.server_banner).groups () self.server_capas = capas.split ('.') self.server_msgid = msgid self.__send_client () self.__read () def close (self): """Close the connection.""" if self.__connected: self.__send_quit () self.__read () self.socket.close () self.__connected = False def option (self, name, *args): """Send the OPTION command.""" if self.__connected: self.__send ('OPTION %s%s' % (name, reduce (lambda x, y: str (x) +' '+ str (y), args, ''))) res = self.__read () code, msg = res[0].split (' ', 1) if int (code) == 250: if name.lower () == 'mime': self.mime = True return True return False def __get_mime (self, lines): cnt = 0 mimeinfo = {} firstline = lines[0].lower () if firstline.find ('content-type:') != -1 or \ firstline.find ('content-transfer-encoding:') != -1: cnt += 1 for line in lines: if line == '': break t = line.split (':', 1) mimeinfo[t[0].lower ()] = t[1].strip () cnt += 1 for i in range (0, cnt): lines.pop (0) else: lines.pop (0) if 'content-transfer-encoding' in mimeinfo: if mimeinfo['content-transfer-encoding'].lower () == 'base64': buf = base64.decodestring ('\n'.join (lines)) lines[:] = (buf.split ('\r\n')) if lines[-1] == '': del lines[-1] del mimeinfo['content-transfer-encoding'] elif mimeinfo['content-transfer-encoding'].lower () == 'quoted-printable': buf = quopri.decodestring ('\n'.join (lines)) lines[:] = buf.split ('\r\n') if lines[-1] == '': del lines[-1] del mimeinfo['content-transfer-encoding'] return mimeinfo def __get_rs (self, line): code, text = line.split (' ', 1) code = int (code) return code, text def __read (self): if not self.__connected: raise DicoNotConnectedError ('Not connected') buf = [] line = self.__readline () if len (line) == 0: raise DicoNotConnectedError ('Not connected') buf.append (line) code, text = self.__get_rs (line) if code >= 100 and code < 200: if code == 150: while True: rs = self.__readline () code, text = self.__get_rs (rs) if code != 151: buf.append (rs) break buf.append ([rs, self.__readblock ()]) else: buf.append (self.__readblock ()) buf.append (self.__readline ()) return buf def __readline (self): line = self.fd.readline ().rstrip () if self.transcript: self.__debug ('S:%s' % line) return line def __readblock (self): buf = [] while True: line = self.__readline () if line == '.': break buf.append (line) return buf def __send (self, command): if not self.__connected: raise DicoNotConnectedError ('Not connected') self.socket.send (command.encode ('utf_8') + "\r\n") if self.transcript: self.__debug ('C:%s' % command) def __send_client (self): if self.verbose: self.__debug ('Sending client information') self.__send ('CLIENT "%s %s"' % ("GNU Dico (Python Edition)", __version__)) def __send_quit (self): if self.verbose: self.__debug ('Quitting') self.__send ('QUIT'); def __send_show (self, what, arg=None): if arg != None: self.__send ('SHOW %s "%s"' % (what, arg)) else: self.__send ('SHOW %s' % what) return self.__read () def __send_define (self, database, word): if self.verbose: self.__debug ('Sending query for word "%s" in database "%s"' % (word, database)) self.__send ('DEFINE "%s" "%s"' % (database, word)) return self.__read () def __send_match (self, database, strategy, word): if self.verbose: self.__debug ('Sending query to match word "%s" in database "%s", using "%s"' % (word, database, strategy)) self.__send ('MATCH "%s" "%s" "%s"' % (database, strategy, word)) return self.__read () def __send_xlev (self, distance): self.__send ('XLEV %u' % distance) return self.__read () def show_databases (self): """List all accessible databases.""" if self.verbose: self.__debug ('Getting list of databases') res = self.__send_show ('DATABASES') if self.mime: mimeinfo = self.__get_mime (res[1]) dbs_res = res[1:-1][0] dbs = [] for d in dbs_res: short_name, full_name = d.split (' ', 1) dbs.append ([short_name, self.__unquote (full_name)]) dct = { 'count': len (dbs), 'databases': dbs, } return dct def show_strategies (self): """List available matching strategies.""" if self.verbose: self.__debug ('Getting list of strategies') res = self.__send_show ('STRATEGIES') if self.mime: mimeinfo = self.__get_mime (res[1]) sts_res = res[1:-1][0] sts = [] for s in sts_res: short_name, full_name = s.split (' ', 1) sts.append ([short_name, self.__unquote (full_name)]) dct = { 'count': len (sts), 'strategies': sts, } return dct def show_info (self, database): """Provide information about the database.""" res = self.__send_show ("INFO", database) code, msg = res[0].split (' ', 1) if int (code) < 500: if self.mime: mimeinfo = self.__get_mime (res[1]) dsc = res[1] return {'desc': '\n'.join (dsc)} else: return {'error': code, 'msg': msg} def show_lang_db (self): """Show databases with their language preferences.""" res = self.__send_show ('LANG DB') code, msg = res[0].split (' ', 1) if int (code) < 500: if self.mime: mimeinfo = self.__get_mime (res[1]) dsc = res[1] lang_src = {} lang_dst = {} for i in dsc: pair = i.split (' ', 1)[1] src, dst = pair.split (':', 1) for j in src: lang_src[src.strip()] = True for j in dst: lang_dst[dst.strip()] = True return { 'desc': '\n'.join (dsc), 'lang_src': lang_src.keys (), 'lang_dst': lang_dst.keys (), } else: return {'error': code, 'msg': msg} def show_lang_pref (self): """Show server language preferences.""" res = self.__send_show ('LANG PREF') code, msg = res[0].split (' ', 1) if int (code) < 500: return {'msg': msg} else: return {'error': code, 'msg': msg} def show_server (self): """Provide site-specific information.""" res = self.__send_show ('SERVER') code, msg = res[0].split (' ', 1) if int (code) < 500: dsc = res[1] return {'desc': '\n'.join (dsc)} else: return {'error': code, 'msg': msg} def define (self, database, word): """Look up word in database.""" database = database.replace ('"', "\\\"") word = word.replace ('"', "\\\"") res = self.__send_define (database, word) code, msg = res[-1].split (' ', 1) if int (code) < 500: defs_res = res[1:-1] defs = [] rx = re.compile ('^\d+ ("[^"]+"|\w+) ([a-zA-Z0-9_\-]+) ("[^"]*"|\w+)') for i in defs_res: term, db, db_fullname = rx.search (i[0]).groups () df = { 'term': self.__unquote (term), 'db': db, 'db_fullname': self.__unquote (db_fullname), } if self.mime: mimeinfo = self.__get_mime (i[1]) df.update (mimeinfo) df['desc'] = '\n'.join (i[1]) defs.append (df) dct = { 'count': len (defs), 'definitions': defs, } return dct else: return {'error': code, 'msg': msg} def match (self, database, strategy, word): """Match word in database using strategy.""" if not self.__connected: raise DicoNotConnectedError ('Not connected') if self.levenshtein_distance and 'xlev' in self.server_capas: res = self.__send_xlev (self.levenshtein_distance) code, msg = res[-1].split (' ', 1) if int (code) != 250 and self.verbose: self.__debug ('Server rejected XLEV command') self.__debug ('Server reply: %s' % msg) database = database.replace ('"', "\\\"") strategy = strategy.replace ('"', "\\\"") word = word.replace ('"', "\\\"") res = self.__send_match (database, strategy, word) code, msg = res[-1].split (' ', 1) if int (code) < 500: if self.mime: mimeinfo = self.__get_mime (res[1]) mts_refs = res[1:-1][0] mts = {} for i in mts_refs: db, term = i.split (' ', 1) if mts.has_key (db): mts[db].append (self.__unquote (term)) else: mts[db] = [self.__unquote (term)] dct = { 'matches': mts, } return dct else: return {'error': code, 'msg': msg} def xlev (self, distance): """Set Levenshtein distance.""" self.levenshtein_distance = distance res = self.__send_xlev (distance) code, msg = res[0].split (' ', 1) if int (code) == 250: return True return False def __unquote (self, s): s = s.replace ("\\\\'", "'") if s[0] == '"' and s[-1] == '"': s = s[1:-1] try: s = self.__decode (s) except UnicodeEncodeError: pass return s def __decode (self, encoded): for octc in (c for c in re.findall (r'\\(\d{3})', encoded)): encoded = encoded.replace (r'\%s' % octc, chr (int (octc, 8))) return unicode (encoded, 'utf_8') def __debug (self, msg): print 'dico: Debug: %s' % msg class DicoNotConnectedError (Exception): def __init__ (self, value): self.parameter = value def __str__(self): return repr (self.parameter) dico-2.2/dicoweb/dicoclient/dicoshell.py000066400000000000000000000306341172612674100203610ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import re import os import sys import atexit import getopt import readline import curses.ascii import socket import dicoclient class Shell: """Simple GNU Dico-Python Shell.""" prompt = 'dico> ' prefix = '.' default_host = 'gnu.org.ua' database = '!' strategy = '.' last_matches = [] last_databases = [] last_strategies = [] transcript = False def __init__ (self, opts, args): for o, a in opts: if o in ('-h', '--host'): self.default_host = a self.dc = dicoclient.DicoClient (self.default_host) def run (self): histfile = os.path.expanduser ('~/.dico_history') try: readline.read_history_file (histfile) except IOError: pass atexit.register (readline.write_history_file, histfile) print '\nType ? for help summary\n' while True: try: input = raw_input (self.prompt).strip () input = unicode (input, 'utf_8') except (EOFError, KeyboardInterrupt): print sys.exit () try: self.parse (input) except socket.timeout: self.__error ('socket timed out') except dicoclient.DicoNotConnectedError: try: self.dc.open () dict = self.dc.show_databases () self.last_databases = dict['databases'] dict = self.dc.show_strategies () self.last_strategies = dict['strategies'] self.parse (input) except socket.error, (errno, strerror): self.__error (strerror) def parse (self, input): if len (input) < 1: return if input[0] == self.prefix: self.parse_command (input[1:]) elif input == '?': self.print_help () elif re.match (r'^[0-9]+$', input): try: match = self.last_matches[int (input)] dict = self.dc.define (match[0], match[1]) if 'count' in dict: for d in dict['definitions']: print 'From %s, %s:' % (d['db'], d['db_fullname']. encode ('utf_8')) print d['desc'] elif 'error' in dict: print dict['msg'] except IndexError: self.__error ('No previous match') elif input[0] == '/': if len (input) > 1: dict = self.dc.match (self.database, self.strategy, input[1:]) if 'matches' in dict: self.last_matches = [] lmi = 0 for db in dict['matches']: print 'From %s, %s:' % (db, self.__lookup_db (db). encode ('utf_8')) for term in dict['matches'][db]: print '%4d) "%s"' % (lmi, term.encode ('utf_8')) self.last_matches.append ([db, term]) lmi = lmi + 1 elif 'error' in dict: print dict['msg'] else: if len (self.last_matches) > 0: m = {} lmi = 0 for i, db in enumerate (self.last_matches): if not db[0] in m: m[db[0]] = [] m[db[0]].append (self.last_matches[i][1]) for db in m: print 'From %s, %s:' % (db, self.__lookup_db (db)) for term in m[db]: print '%4d) "%s"' % (lmi, term) lmi = lmi + 1 else: self.__error ('No previous match') elif input[0] == '!': if re.match (r'^![0-9]+$', input): number = int (input[1:]) readline.insert_text (readline.get_history_item (number)) readline.redisplay () else: dict = self.dc.define (self.database, input) if 'count' in dict: for d in dict['definitions']: print 'From %s, %s:' % (d['db'], d['db_fullname']. encode ('utf_8')) print d['desc'] elif 'error' in dict: print dict['msg'] def parse_command (self, input): input = input.split (' ', 1) cmd = input[0] args = None if len (input) == 2: args = input[1] if cmd == 'open': try: if args != None: args = args.split (' ', 1) if len (args) == 2: self.dc.open (args[0], int (args[1])) else: self.dc.open (args[0]) else: self.dc.open () dict = self.dc.show_databases () self.last_databases = dict['databases'] dict = self.dc.show_strategies () self.last_strategies = dict['strategies'] except socket.error, (errno, strerror): self.__error (strerror) elif cmd == 'close': self.dc.close () elif cmd == 'database': if args != None: self.database = args else: print self.database elif cmd == 'strategy': if args != None: self.strategy = args else: print self.strategy elif cmd == 'distance': if args != None: self.dc.levenshtein_distance = int (args) else: if self.dc.levenshtein_distance: print 'Configured Levenshtein distance: %u' % \ self.dc.levenshtein_distance else: print 'No distance configured' elif cmd == 'ls': dict = self.dc.show_strategies () self.last_strategies = dict['strategies'] if len (self.last_strategies): for i in self.last_strategies: print '%s "%s"' % (i[0], i[1]) elif cmd == 'ld': dict = self.dc.show_databases () self.last_databases = dict['databases'] if len (self.last_databases): for i in self.last_databases: print '%s "%s"' % (i[0], i[1]) elif cmd == 'mime': print self.dc.option ('MIME') elif cmd == 'server': dict = self.dc.show_server () if 'desc' in dict: print dict['desc'] elif 'error' in dict: self.__error (dict['error'] + ' ' + dict['msg']) elif cmd == 'info': if args != None: dict = self.dc.show_info (args) if 'desc' in dict: print dict['desc'] elif 'error' in dict: self.__error (dict['error'] + ' ' + dict['msg']) elif cmd == 'history': hl = int (readline.get_current_history_length ()) for i in xrange (0, hl): print '%4d) %s' % (i, readline.get_history_item (i)) elif cmd == 'help': self.print_help () elif cmd == 'transcript': if args != None: if args in ('yes', 'on', 'true'): self.dc.transcript = True elif args in ('no', 'off', 'false'): self.dc.transcript = False else: self.__error ('Expected boolean value') else: if self.dc.transcript: print 'transcript is on' else: print 'transcript is off' elif cmd == 'verbose': if args != None: self.dc.verbose = args else: print self.dc.verbose elif cmd == 'prompt': if args != None: self.prompt = args else: self.__error ('not enough arguments') elif cmd == 'prefix': if args != None: if len (args) == 1 and args != '#' and \ curses.ascii.ispunct (args): self.prefix = args else: self.__error ('Expected a single punctuation character') elif cmd == 'version': self.print_version () elif cmd == 'warranty': self.print_warranty () elif cmd == 'quit': sys.exit () def __lookup_db (self, db): for d in self.last_databases: if d[0] == db: return d[1] return '' def __error (self, msg): print 'dico: Error: %s' % msg def print_version (self): print 'GNU Dico (Python Edition) ' + dicoclient.__version__ def print_warranty (self): self.print_version () print """Copyright (C) 2008, 2009, 2010 Wojciech Polak GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see .""" def print_help (self): print 'WORD Define WORD.' print '/WORD Match WORD.' print '/ Redisplay previous matches.' print 'NUMBER Define NUMBERth match.' print '!NUMBER Edit NUMBERth previous command.' print print self.prefix + 'open [HOST [PORT]] Connect to a DICT server.' print self.prefix + 'close Close the connection.' print self.prefix + 'database [NAME] Set or display current database name.' print self.prefix + 'strategy [NAME] Set or display current strategy.' print self.prefix + 'distance [NUM] Set or query Levenshtein distance (server-dependent).' print self.prefix + 'ls List available matching strategies' print self.prefix + 'ld List all accessible databases' print self.prefix + 'info [DB] Display the information about the database.' print self.prefix + 'prefix [CHAR] Set or display command prefix.' print self.prefix + 'transcript [BOOL] Set or display session transcript mode.' print self.prefix + 'verbose [NUMBER] Set or display verbosity level.' print self.prefix + 'prompt STRING Change command line prompt.' print self.prefix + 'history Display command history.' print self.prefix + 'help Display this help text.' print self.prefix + 'version Print program version.' print self.prefix + 'warranty Print copyright statement.' print self.prefix + 'quit Quit the shell.' if __name__ == '__main__': try: opts, args = getopt.getopt (sys.argv[1:], 'h:', ['host=']) except getopt.GetoptError: print '\nusage: %s [-h, --host=hostname]' % (sys.argv[0]) sys.exit (0) shell = Shell (opts, args) shell.print_version () shell.run () dico-2.2/dicoweb/dicoclient/setup.py000066400000000000000000000026641172612674100175550ustar00rootroot00000000000000#!/usr/bin/env python # # This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . from distutils.core import setup import dicoclient setup(name='dicoclient', version='1.0', author='Wojciech Polak', author_email='polak@gnu.org', url='http://www.gnu.org/software/dico/', py_modules=['dicoclient', 'dicoshell'], license='GPL License', description='A DICT protocol (RFC 2229) client library.', platforms=['any'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules' ] ) dico-2.2/dicoweb/dicoweb.wsgi000066400000000000000000000017151172612674100162310ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import os import sys SITE_ROOT = os.path.dirname (os.path.realpath (__file__)) os.environ['DJANGO_SETTINGS_MODULE'] = 'dicoweb.settings' sys.path.insert (0, os.path.join (SITE_ROOT, '../')) from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler () dico-2.2/dicoweb/dummy_translations.py000066400000000000000000000035161172612674100202310ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . from django.utils.translation import ugettext_noop DUMMY_TRANSLATIONS = ( # gnu.org.ua ugettext_noop('Match words exactly'), ugettext_noop('Match word prefixes'), ugettext_noop('Match using SOUNDEX algorithm'), ugettext_noop('Match everything (experimental)'), ugettext_noop('Match headwords within given Levenshtein distance'), ugettext_noop('Match headwords within given Levenshtein distance (normalized)'), ugettext_noop('Match headwords within given Damerau-Levenshtein distance'), ugettext_noop('Match headwords within given Damerau-Levenshtein distance (normalized)'), ugettext_noop('POSIX 1003.2 (modern) regular expressions'), ugettext_noop('Old (basic) regular expressions'), ugettext_noop('Match word suffixes'), ugettext_noop('Reverse search in Quechua databases'), # dict.org ugettext_noop('Match headwords exactly'), ugettext_noop('Match prefixes'), ugettext_noop('Match substring occurring anywhere in a headword'), ugettext_noop('Match suffixes'), ugettext_noop('Match headwords within Levenshtein distance one'), ugettext_noop('Match separate words within headwords'), ) dico-2.2/dicoweb/locale/000077500000000000000000000000001172612674100151555ustar00rootroot00000000000000dico-2.2/dicoweb/locale/pl/000077500000000000000000000000001172612674100155705ustar00rootroot00000000000000dico-2.2/dicoweb/locale/pl/LC_MESSAGES/000077500000000000000000000000001172612674100173555ustar00rootroot00000000000000dico-2.2/dicoweb/locale/pl/LC_MESSAGES/django.po000066400000000000000000000103361172612674100211620ustar00rootroot00000000000000# Polish translations for GNU Dico (Dicoweb) package. # Copyright (C) 2008-2009, 2012 Wojciech Polak # This file is distributed under the same license as the GNU Dico package. # Wojciech Polak , 2008, 2009. # msgid "" msgstr "" "Project-Id-Version: dico 1.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-03-07 22:40+0100\n" "PO-Revision-Date: 2008-11-01 19:11+0100\n" "Last-Translator: Wojciech Polak \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: dummy_translations.py:21 msgid "Match words exactly" msgstr "DokÅ‚adne dopasowanie słów" #: dummy_translations.py:22 msgid "Match word prefixes" msgstr "Dopasowanie prefiksów słów" #: dummy_translations.py:23 msgid "Match using SOUNDEX algorithm" msgstr "Dopasowanie za pomocÄ… algorytmu SOUNDEX" #: dummy_translations.py:24 msgid "Match everything (experimental)" msgstr "Dopasowanie wszystkiego (eksperymentalne)" #: dummy_translations.py:25 msgid "Match headwords within given Levenshtein distance" msgstr "Dopasowanie lematu w zadanej odlegÅ‚oÅ›ci Levenshteina" #: dummy_translations.py:26 msgid "Match headwords within given Levenshtein distance (normalized)" msgstr "Dopasowanie lematu w zadanej odlegÅ‚oÅ›ci Levenshteina (znormalizowane)" #: dummy_translations.py:27 msgid "Match headwords within given Damerau-Levenshtein distance" msgstr "Dopasowanie lematu w zadanej odlegÅ‚oÅ›ci Damerau-Levenshteina" #: dummy_translations.py:28 msgid "Match headwords within given Damerau-Levenshtein distance (normalized)" msgstr "" "Dopasowanie lematu w zadanej odlegÅ‚oÅ›ci Damerau-Levenshteina (znormalizowane)" #: dummy_translations.py:29 msgid "POSIX 1003.2 (modern) regular expressions" msgstr "Wyrażenia regularne POSIX 1003.2" #: dummy_translations.py:30 msgid "Old (basic) regular expressions" msgstr "Stare (podstawowe) wyrażenia regularne" #: dummy_translations.py:31 msgid "Match word suffixes" msgstr "Dopasowanie sufiksów słów" #: dummy_translations.py:32 msgid "Reverse search in Quechua databases" msgstr "Odwrotne poszukiwanie w bazie Quechua" #: dummy_translations.py:34 msgid "Match headwords exactly" msgstr "DokÅ‚adne dopasowanie słów" #: dummy_translations.py:35 msgid "Match prefixes" msgstr "Dopasowanie prefiksów słów" #: dummy_translations.py:36 msgid "Match substring occurring anywhere in a headword" msgstr "Dopasowanie ciÄ…gu w dowolnym miejscu lematu" #: dummy_translations.py:37 msgid "Match suffixes" msgstr "Dopasowanie sufiksów słów" #: dummy_translations.py:38 msgid "Match headwords within Levenshtein distance one" msgstr "Dopasowanie lematu w odlegÅ‚oÅ›ci Levenshteina jeden" #: dummy_translations.py:39 msgid "Match separate words within headwords" msgstr "" #: views.py:97 msgid "First match" msgstr "Pierwsze dopasowanie" #: views.py:98 msgid "All" msgstr "Wszystkie" #: views.py:99 msgid "Default" msgstr "DomyÅ›lna" #: templates/index.html:12 msgid "Search term:" msgstr "Szukana fraza:" #: templates/index.html:15 templates/index.html.py:117 msgid "more options" msgstr "wiÄ™cej opcji" #: templates/index.html:22 msgid "DICT server:" msgstr "Server DICT:" #: templates/index.html:31 msgid "Database:" msgstr "Baza danych:" #: templates/index.html:39 msgid "Match strategy:" msgstr "Strategia dopasowania:" #: templates/index.html:51 msgid "Search" msgstr "Szukaj" #: templates/index.html:52 msgid "Define (I'm feeling lucky)" msgstr "Zdefiniuj (szczęśliwy traf)" #: templates/index.html:72 msgid "last match results" msgstr "Ostatnio znalezione wyniki" #: templates/index.html:75 #, python-format msgid "Found one definition" msgid_plural "Found %(rc)s definitions" msgstr[0] "Znaleziono jednÄ… definicjÄ™" msgstr[1] "Znaleziono %(rc)s definicji" msgstr[2] "Znaleziono %(rc)s definicji" #: templates/index.html:79 msgid "From" msgstr "Z" #: templates/index.html:101 msgid "Last match results" msgstr "Ostatnio znalezione wyniki" #: templates/index.html:107 #, python-format msgid "Define %(term)s" msgstr "Zdefiniuj %(term)s" #: templates/index.html:118 msgid "less options" msgstr "mniej opcji" dico-2.2/dicoweb/locale/uk/000077500000000000000000000000001172612674100155745ustar00rootroot00000000000000dico-2.2/dicoweb/locale/uk/LC_MESSAGES/000077500000000000000000000000001172612674100173615ustar00rootroot00000000000000dico-2.2/dicoweb/locale/uk/LC_MESSAGES/django.po000066400000000000000000000117371172612674100211740ustar00rootroot00000000000000# Ukrainian messages for Dicoweb # This file is distributed under the same license as the Dico package. # Copyright (C) 2009, 2012 Free Software Foundation, Inc. # Sergey Poznyakoff , 2009. # msgid "" msgstr "" "Project-Id-Version: Dico 1.4.90\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-03-08 17:13+0100\n" "PO-Revision-Date: 2009-03-08 17:18+0100\n" "Last-Translator: Sergey Poznyakoff \n" "Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: dummy_translations.py:21 msgid "Match words exactly" msgstr "Докладне Ð¿Ð¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ Ñлів" #: dummy_translations.py:22 msgid "Match word prefixes" msgstr "ÐŸÐ¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€ÐµÑ„Ñ–ÐºÑів Ñлів" #: dummy_translations.py:23 msgid "Match using SOUNDEX algorithm" msgstr "Шукати з викориÑтаннÑм алгоритму SOUNDEX" #: dummy_translations.py:24 msgid "Match everything (experimental)" msgstr "Звертати вÑÑ– Ñлова (екÑпериментальне)" #: dummy_translations.py:25 msgid "Match headwords within given Levenshtein distance" msgstr "Шукати Ñлова в межах вказаної відÑтані Левенштейна" #: dummy_translations.py:26 msgid "Match headwords within given Levenshtein distance (normalized)" msgstr "Шукати Ñлова в межах вказаної відÑтані Левенштейна (нормалізовано)" #: dummy_translations.py:27 msgid "Match headwords within given Damerau-Levenshtein distance" msgstr "Шукати Ñлова в межах вказаної відÑтані Дамерау-Левенштейна" #: dummy_translations.py:28 msgid "Match headwords within given Damerau-Levenshtein distance (normalized)" msgstr "" "Шукати Ñлова в межах вказаної відÑтані Дамерау-Левенштейна (нормалізовано)" #: dummy_translations.py:29 msgid "POSIX 1003.2 (modern) regular expressions" msgstr "РегулÑрні вирази POSIX 1003.2" #: dummy_translations.py:30 msgid "Old (basic) regular expressions" msgstr "Базові (Ñтарого типу) регулÑрні вирази" #: dummy_translations.py:31 msgid "Match word suffixes" msgstr "ÐŸÐ¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ ÑуфікÑів Ñлів" #: dummy_translations.py:32 msgid "Reverse search in Quechua databases" msgstr "Зворотній пошук у базі Ñлів Кечуа" #: dummy_translations.py:34 msgid "Match headwords exactly" msgstr "Докладне Ð¿Ð¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ Ñлів" #: dummy_translations.py:35 msgid "Match prefixes" msgstr "ÐŸÐ¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€ÐµÑ„Ñ–ÐºÑів" #: dummy_translations.py:36 msgid "Match substring occurring anywhere in a headword" msgstr "Шукати ÑÐ¿Ñ–Ð²Ð¿Ð°Ð´Ñ–Ð½Ð½Ñ Ñƒ довільному під-Ñ€Ñдку Ñлова" #: dummy_translations.py:37 msgid "Match suffixes" msgstr "ÐŸÐ¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ ÑуфікÑів" #: dummy_translations.py:38 msgid "Match headwords within Levenshtein distance one" msgstr "Шукати Ñлова в межах відÑтані Левенштейна = 1" #: dummy_translations.py:39 msgid "Match separate words within headwords" msgstr "Порівнювати окремі Ñлова у Ñловарних заголовках" #: views.py:97 msgid "First match" msgstr "Перше ÑпівпадіннÑ" #: views.py:98 msgid "All" msgstr "Ð’ÑÑ–" #: views.py:99 msgid "Default" msgstr "Типово" #: templates/index.html:12 msgid "Search term:" msgstr "Шукана фраза:" #: templates/index.html:15 templates/index.html.py:117 msgid "more options" msgstr "більше опцій" #: templates/index.html:22 msgid "DICT server:" msgstr "Сервер DICT:" #: templates/index.html:31 msgid "Database:" msgstr "База даних:" #: templates/index.html:39 msgid "Match strategy:" msgstr "Ð¡Ñ‚Ñ€Ð°Ñ‚ÐµÐ³Ñ–Ñ Ð¿Ð¾Ñ€Ñ–Ð²Ð½ÑŽÐ²Ð°Ð½Ð½Ñ:" #: templates/index.html:51 msgid "Search" msgstr "Пошук" #: templates/index.html:52 msgid "Define (I'm feeling lucky)" msgstr "Визнач (Мені пощаÑтить)" #: templates/index.html:72 msgid "last match results" msgstr "оÑтанні результати" #: templates/index.html:75 #, python-format msgid "Found one definition" msgid_plural "Found %(rc)s definitions" msgstr[0] "Знайдено %(rc)s визначеннÑ" msgstr[1] "Знайдено %(rc)s визначеннÑ" msgstr[2] "Знайдено %(rc)s визначень" #: templates/index.html:79 msgid "From" msgstr "З" #: templates/index.html:101 msgid "Last match results" msgstr "оÑтанні результати" #: templates/index.html:107 #, python-format msgid "Define %(term)s" msgstr "Визнач %(term)s" #: templates/index.html:118 msgid "less options" msgstr "менш опцій" dico-2.2/dicoweb/manage.py000066400000000000000000000015231172612674100155210ustar00rootroot00000000000000#!/usr/bin/env python # This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . from django.core.management import execute_manager import settings if __name__ == '__main__': execute_manager (settings) dico-2.2/dicoweb/settings-sample.py000066400000000000000000000047711172612674100174200ustar00rootroot00000000000000# Django settings for Dicoweb project. # # This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import os SITE_ROOT = os.path.dirname (os.path.realpath (__file__)) DEBUG = True TEMPLATE_DEBUG = True ADMINS = ( ('Your Name', 'Your e-mail address'), ) MANAGERS = ADMINS DATABASE_ENGINE = '' DATABASE_NAME = '' DATABASE_USER = '' DATABASE_PASSWORD = '' DATABASE_HOST = '' DATABASE_PORT = '' SITE_ID = 1 USE_I18N = True TIME_ZONE = 'Europe/Warsaw' LANGUAGE_CODE = 'en-us' LANGUAGE_COOKIE_NAME = 'dicoweb_lang' SESSION_COOKIE_NAME = 'dicoweb_sid' SESSION_ENGINE = 'django.contrib.sessions.backends.file' SESSION_EXPIRE_AT_BROWSER_CLOSE = True # Caching, see http://docs.djangoproject.com/en/dev/topics/cache/#topics-cache CACHE_BACKEND = 'memcached://127.0.0.1:11211/' # Absolute path to the directory that holds media/static files. MEDIA_ROOT = os.path.join (SITE_ROOT, 'static') # URL that handles the media served from MEDIA_ROOT. MEDIA_URL = 'static' # Make this unique, and don't share it with anybody. SECRET_KEY = 'SET THIS TO A RANDOM STRING' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', ) MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', ) ROOT_URLCONF = 'dicoweb.urls' TEMPLATE_DIRS = ( os.path.join (SITE_ROOT, 'templates'), ) INSTALLED_APPS = ( 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'dicoweb', ) DICT_SERVERS = ('gnu.org.ua',) DICT_TIMEOUT = 10 dico-2.2/dicoweb/static/000077500000000000000000000000001172612674100152055ustar00rootroot00000000000000dico-2.2/dicoweb/static/dicoweb.css000066400000000000000000000041721172612674100173370ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008-2010, 2012 Wojciech Polak GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ * { margin: 0; padding: 0; } body { font-family: arial, sans-serif; font-size: 95%; background-color: white; color: #585858; } h1, h2, h3 { font-weight: normal; } h2, h3, h4 { color: #185360; } h2 { margin: 0; padding-top: .5em; padding-bottom: .17em; } img { padding: 3px; border: 0px; } a { color: #ff5c2f; } a:hover { text-decoration: underline; } input { padding: 1px; } ul { margin-bottom: 1em; } li { margin-left: 2em; line-height: 1.5em; } p { line-height: 1.8em; margin-bottom: 0.2em; } pre { font-size: 95%; white-space: normal; line-height: 140%; padding: 1em; } table { border-spacing: 2px; } tr, th, td { padding: 2px; vertical-align: top; } .hidden { display: none } #top { margin: 0 auto 0 auto; } #logo h1 { padding-left: 15px; padding-bottom: 3px; } #logo a { text-decoration: none; } #logo img { padding-left: 15px; } #searchform { width: 600px; margin: 60px auto 0 auto; } #searchform table { margin-left: auto; margin-right: auto; } .results, .derror { border-top: dotted 1px #e1e1e1; width: 700px; margin: 1em auto 0 auto; padding: 4px; padding-top: 10px; clear: both; } .dbname-short { border-bottom: 1px dotted #aaaaaa; cursor: help; } a.link-lmr { float: right; font-size: 8pt; } #footer { font-size: 80%; width: 700px; text-align: center; border-top: dotted 1px #e1e1e1; margin: 1em auto 10px auto; padding: 4px; padding-top: 10px; } dico-2.2/dicoweb/static/dicoweb.js000066400000000000000000000046711172612674100171670ustar00rootroot00000000000000/* This file is part of GNU Dico. Copyright (C) 2008-2009, 2012 Wojciech Polak GNU Dico 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 3, or (at your option) any later version. GNU Dico 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 Dico. If not, see . */ window.onload = function () { var options = readCookie ('dicoweb_options'); if (options && options == '1') { var o = GID ('options'); if (o) { o.className = ''; GID ('toggle_options').innerHTML = _('less options'); } } GID ('toggle_options').onclick = function () { var o = GID ('options'); if (o) { if (o.className != 'hidden') { o.className = 'hidden'; this.innerHTML = _('more options'); document.cookie = 'dicoweb_options=0'; } else { o.className = ''; this.innerHTML = _('less options'); document.cookie = 'dicoweb_options=1'; } } this.blur (); return false; }; GID ('form').onsubmit = function () { var q = GID ('q'); var s = document.forms[0].strategy; if (q.value == '' && s.value != 'all') return false; return true; }; if (document.forms[0].server) { document.forms[0].server.onchange = function () { var q = GID ('q'); var u = '?server=' + this.value; if (q && q.value != '') u += '&q=' + encodeURIComponent (q.value); window.location.replace (u); }; } var q = GID ('q'); if (q) { if (q.value == '') q.focus (); } function GID (x) { return document.getElementById (x); } function gettext (msg) { if (typeof gettext_msg != 'undefined' && gettext_msg[msg]) return gettext_msg[msg]; return msg; } function _(msg) { return gettext (msg); } function readCookie (name) { var nameEq = name + '='; var ca = document.cookie.split (';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt (0) == ' ') c = c.substring (1, c.length); if (c.indexOf (nameEq) == 0) return c.substring (nameEq.length, c.length); } return null; } }; dico-2.2/dicoweb/static/gnu-head-sm.jpg000066400000000000000000000122461172612674100200210ustar00rootroot00000000000000ÿØÿàJFIFÿþJPEG:gnu-head-sm.jpg 129x122ÿÛC   %# , #&')*)-0-(0%()(ÿÀ zÿÄÿÄ5!1A"Q2a#$Bq‘C¡ÁR±ñÿÚ?õNSÝoÔ6öhÞ_v¡{0DAerĨ1Ÿ¹ˆÎp4—võ*ždzÊëU2ÑÇ’½¤L”àª?8fäg:¦§õ]$¥zÉ/TPÒ#(y$²È-Ð}O!ŸåzÎHL›3ÔËfæ¤jŠFЦ 3R;<‘ô 2B@u’ö¡Çg$`éÞŽº–²™ji*až³‰cpÊpp{tzÔ­5øÌÇ ’~5ÌˇÝ2 ‹¹òqç9ñçI[ƒÔí¹lYš¾–¶¡T¦4#àÊÄ)=Œ…äÀñÕ ªBªçj»4 eBÔʉ/¹í©9'„ø'2É·÷Å5lq›¬pѬ˜öêáŸÞ£—' J©RO…uROC–4hÕâ±ê%zYZQþ.©H_§R ÿ¸ÀŒc8œes“^á§Ü´W¹g‚J ,A!EˆJÝ‚Ã%‹ù<²OeVbÐì]‰Vµ¡o6¨îw›t“R˜ 2¶fËÄô¬ÊqĪrÛAMm£Ž’††ž.•FOžÉ$öI$’I$’I$“©š­¹]b¡šqÕ“†h©àP]€Ç&ì€ÈÉ$ < M÷yÁKZ^w -¢HeXÞ;hI倓€ä ¹ ¶1œpIH´Ú©«¤Ž‡s×T•’H]/ÈÑUÕ”`˜ý·PyʱNW#LŸÔK ºÛMU¸*á¶Ñ^ ïÍf10r‚@9‡%ä«ÉAÏ'þ (êk¥šZÓ£Y?½WZVV)œŸmT€¹‘ÎF>pɶ}c²]`£z£ ýXb¯E1P‚GVT——Y F@9À'Z]-D5tñÏK,sA"†I#`ÊÀö#¢äk¾–wîÜsmùisÆ®&ÓI€JȤ0õƒŒø9òלýPŽj³C~™¡¥i$sO¦2F§ÚY@lcåÉv €/¾‘Üe«iJ®9㨨¤u¨¦ö – %äW‚ôÑÇÏg$箨wŽÕO }ÊêE!rr¢¡ ‚Îqó¬÷Õ+âTÛ¤¤¥¢5U*û0M ÐIû][°XÆqŸ5ÏÐÚ ŠzÙå©©¨™e Ž¦œ³4"I]y0 ÄŠxòHë´ lš­¾Ý"´Ð‰7cíÅ` ŽA dô$ž€ž×›=Xõb²Ë%U¾Èí[qž)%¬¯ŠVÛeéU‚DQ’zÏg™#%޼åtÜ5÷J߯¹ªT<¤«϶øŒà[ ç¢IùÕQ¨žjó4Ò,ÎGsÓß&ÿ’Oú:mË…öí[n±ÍTÆŠI"’UJ£Ü"%fP|æ@0H ±$|†:ïLæšõq¡ÚòÌp†0QØNd”GÆFjà–°PÜT€ q\ÆßY]`½GQOΚ*…~$ä+£üÿƽQý;ú˜×yg¤¨F‚­Þ©¤Š"!•ž%"AÛ:‡äH‡~‘†Dš4–Y#pYH ƒØ ëéÝcFg`ª ’IÀy$ëÍ~ \â·QP%¦åAEq¹­,²GS²;!PBž8PIÎ>NZ=-¡”WÑÔÔAALÕC”¶ô–(ähÒ`yFÁxž-€|·xÖߪé7ÓØÄ̼’:ºF~³„–?ì2ÛYªÒPQÝ‚¼uW ʘJ¤*ÅäUäÚ¤”BIÀ%AÀ9äxwô³|Ù/-R@¶¸^š¡Y™Ù#,†y˜ÏHRIsß©Vïjijío®ª«ŠHTS«? 98V äAb©²àbi8yªÇÄ’ ŸóÞzׯÍôCÒÝà ^íP××ÛGH’Z‡X߃q$tŒ©$äw§Mͳí2TQCµ µÛîöàV ?][‹á¸®r jAÇc¢ÀŒÞáe¸×ï;uŽój¡°SÈêR¾##ÊÒ:ÑDÀ…ÉEPTP¤9–ðô3dENÆž¦º’ló¯tª÷&h û¤âÁº A$Ð''47éÊkEsØ÷ê©æ…„«ª¦fLDnT’ ó=“–M“ê‹XÝ-7ØC† èÈÑAʼnÃ,ÁT†W,¥€R™Qm·Ÿ«–YÒ¢Ëm‘Þ¶AÂH›¤CF1œv18`â ŒÎßõ%òå{¹QPÁ_Y'"´ádá’DjU»`¬dŽŠ±”Hzilš‚zKr­J(ýú‡§^9vR±€ àÎo "NI:~¡^("ºÚk-õöj¡x!YH$=ë1Þ–ÁxÛ·Èèèî¢?£ž§Iqq’Uƒt¼ïâpì ÿ·f¶m‡ý-^HV1E«NG¹ÉÆb$žeˆ y A8,àÀÝ[rî­¿Moy¦Š’ßOæHSÝcRßkÇ*@ï'8=€5é¿D}2·z}·Òe¦"ù]5lŽA1œbS“…ù9#$øGžTŠ2ÎHð $þ“ü eWoN*·²þ7i¥¸]D¹§ÉúH‘–OiI$T.qÑvcÞìÐ[ö½žžÑkj+}¢Ú«J óCàÈì†É$ä“ã¼ë¥Ž´_iêe•)^ji䊞ª ˆ@+$l ±ØaØÆºÓÚè.Õªê ?P…¢J–fúgÁ„$ª¿d$c²ÖyéÐCº·Fë¾ICIUq¹IGFjç #SC!‰BŽ ðñÞ[>ïJÚñˆìT’ Ã&(™‰1ñÅJ®>1d~¸lØe¹ÑÖÑ{T¦ë8ŠI[‹RâìF^4eìñʨ –ÖGÍ{ä´UD´Ó»Í+0Œ„É#˜›¿ÝýÕ$äœç­.˳í»nø•ÈõUj5„’Õa•Ÿ‹©ì±eÎOA”“€  §lZ^×DÿQÄÖT?»7•S€‘’@QŸ8'É:»ÑªÇc†è#©Zxe¬€ )eIÊ1àŒ€ppIè‚AB«§Z‹­=: æ«¡/S%<È)ÙP@,€o¸8Ê‚±,ÝíÛ"–Šíµ¡¡·GM µM`áÜ‚5vPNK<¨Ã䔿:Õ4j²ÇQlu•PRJ©S?ÌmíüÆu‹z£èú_áÜóC ­w¯*i«æ‘æ†5ÈÌ~ÒHp8ä,‡œŒ½"Úé³öÕ¾ß"ÓµcBIá¦js! ä©R@UC¸É9û±§èã_ŽpX¶?ùÇÿêN°_[}-ž÷z¶TRÖ{)ëZºd¤÷[êÇ«a±Èà;~Pôšžià ÓÒ$Ò{0TNÒÉ$!, ¯pä€ÉÕ¾æ²Òî-E¶´¼HpªÆ7V ®22ë±$l³rjcºTÚᨣ›ŒðÒÑʬ¬ †i˜dÇDz¤üà;Ûl4òVE¹XêSÞ“ª,U@($ä€Og$gVú4hÔK…ºŽã†áML'ü“Fv1à/íÊ+rnK”¶Å•¢§†:nfi$E““™r$8ðz8 5êªï\Ñÿ‚¤‘?RH…Nq—#*¾OçòF6í¶Ð½’V ©=’§p2pFOç:¶× ™`¦‰ê*8£Ii$!Bœ“àj²ƒsY«ëE%-ƪ˜‘âÒàd”ÀJä X\i#®¢–šRÁdÊ>CðAÁò‘ö„µ?ª^ã¤TýRã5¹ö¢‘ØH„²<€àåeq"âmåOA"G|¶ÜíM! Ï’''={±–Dñÿp¯‘üâ›tnê¸M4û:nõ•®´fŸƒh†$Jz`Ã@íH?CÑ£FW]®§ÅÇTÕÌÜ §BsòI=²~è@4í{·í›m%ʪ¹$ šjvºå€He¿s9$ E¢Ü­ÇLËgšÛK*µ÷Œ†É4I1qŒ°-ÄŒò,6u J«ªå%Îi$J‰äǸx»¿ÂØQÐÉ=’I` r ~N?ý?󯔚'‘Ñ$Ft8e ÏcãI¾£PÞkç³Eb˜ÀæuWª°L±r‘C ‹”®AÆXŽÀ"=·}Øk÷=ÏlÖýP¬·NÂ(Ô?Ž.£9+ŸÄ ã'°M…=6æ³Þ–ºÅ‚y9©*iʸ•AïîÃcäãW5öJ+„ÿQ ©ŠGP²5<ò@Ò(ìàA8øÏc$x$¶¤z Ër¢Œ°¢–ª¡BĈܖIGÂác8e˜ü0hÑ£FVÝ-ipxËÔÕ@ª¬Œ´ò{fEn$‚Àr^Ôv¤=ê’ «iÛV+¿èÐ45<„»ÈÒÓDàdäãÏ““Þš)áŽ#†% j|0üiwiªZË­ ÑÕªÚ Õ&1‡‚ŽCã’°Áì Ó>¡ÔÓ»SÈ(¥²±-ÍP6[Ë;øÏƒ×Gµ×þ¦¨ ,kÆTÈ:ø¨ž:xšYÛ„j2XøûÒÞã¥ÚvØe®¿SÚiâf2K%@Ž5r@rØ {rÏÆ—h}gôèÖÅi·^ѧ ìÇ5 ì¹ÂñŒ©ø8Ó%Òžó¹ –ßM^¿MO,sËQE-8^MUþâ©bJ“Öpç†Z4hÑ£F5]s£yž šVT­§$ÆÌ:e8å°3TàñE®éOr÷Öé=<¦¢pC#ŽñßG`Œ‚<tº4Ås‚ *…Ù@ï*£Ëd ~}ãŽKš[*l–ØHJYÕ£‰ƒ– Ûˆ1ÉÉ [¼’¨ÇW´U p¢Š¥0Ì¢H’TŒ«‚ñ¬ßzúG¶.ó}uT(âSQ,©7a¹òiAä@-Œç u©;ObØ6vÿy¬¶ªZxꨌH ó‰©e$’[˜e9ò=²žô½4hÑ£F5Z(wÕ>ñC zÁ#ÈðHÇDƒŒŸÎ à005Cp†š¢¨ÓÄ®óHêφ'Û`rgÁ'#àöT6ùi®õV¹fŽX£‘ÊŽùCœ¶ ìp9!GE@Çxê¯pnj›¥jÙl´ÿlç‹ÔÌü9 Áp‹çOlqŒàn…͢آå Ö®Yg¨40Š0ì¬ÅA$’x¢†?0O&}4hÑ£F4hÔJjU¦švCöÊÅÈ=Oã98ü“ùÒÅmš®”•6èé„£¥hŸ+'"ÊDˆÀË€r§cAEŠÕt}ÍygY(*jíQQP4 ·¶¢v5¨V,ªŒaœŒ ñ\ôå·¬—¹ì—«­ÆÝkŠI=ɪáHØJȱ»JÌI x^l0èkжä1Ûéci¾ ¤j=ìî`Ë¡Ÿ=ußZ•£F4hÑ£F5©iåG,<|‹qdgóΥƪ!UãŒc_z4hÑ£_ÿÙdico-2.2/dicoweb/templates/000077500000000000000000000000001172612674100157145ustar00rootroot00000000000000dico-2.2/dicoweb/templates/404.html000066400000000000000000000001421172612674100171060ustar00rootroot00000000000000{% extends 'base.html' %} {% block results %}
Error 404
{% endblock %} dico-2.2/dicoweb/templates/500.html000066400000000000000000000001421172612674100171030ustar00rootroot00000000000000{% extends 'base.html' %} {% block results %}
Error 500
{% endblock %} dico-2.2/dicoweb/templates/base.html000066400000000000000000000025511172612674100175170ustar00rootroot00000000000000{% load media %} {{ page.title|striptags }}GNU Dico Web
{% block search %}{% endblock %}
{% block results %}{% endblock %} dico-2.2/dicoweb/templates/index.html000066400000000000000000000057671172612674100177300ustar00rootroot00000000000000{% extends 'base.html' %} {% load i18n %} {% load dictlookup %} {% block search %}
{% if selects.sv %} {% endif %}
{% trans "Search term:" %} {% trans "more options" %}
{% endblock %} {% block results %} {% if result.error %}
{{ result.msg }}
{% else %} {% if result.definitions %}
{% if mtc.matches %} {% trans "last match results" %} {% endif %}

{% blocktrans count result.count as rc %}Found one definition{% plural %}Found {{ rc }} definitions{% endblocktrans %}

{% for df in result.definitions %}
      {% trans "From" %} {% firstof df.db_fullname df.db %}:
      

{% if df.format_html %} {{ df.desc|safe }} {% else %} {{ df.desc|safe|linebreaksbr }} {% endif %}
{% endfor %}
{% else %} {% if result.desc %}
{{ result.desc|linebreaksbr }}
    
{% endif %} {% endif %} {% if mtc.matches %}

{% trans "Last match results" %}

    {% for mt in mtc.matches.items %}
  • {{ mt.0 }}: {% for term in mt.1 %} {{ term }}{% if not forloop.last %}, {% endif %}{% endfor %}
  • {% endfor %}
{% endif %} {% endif %} {% endblock %} dico-2.2/dicoweb/templates/opensearch.xml000066400000000000000000000006501172612674100205660ustar00rootroot00000000000000 GNU Dico WebSearch GNU Dico WebSearch Interface UTF-8 {{ url_media }}/favicon.ico dico-2.2/dicoweb/templatetags/000077500000000000000000000000001172612674100164105ustar00rootroot00000000000000dico-2.2/dicoweb/templatetags/__init__.py000066400000000000000000000000001172612674100205070ustar00rootroot00000000000000dico-2.2/dicoweb/templatetags/dictlookup.py000066400000000000000000000016061172612674100211420ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . from django.template import Library register = Library () def dictlookup (dict, key): try: return dict.get (key, '') except KeyError: return '' register.filter (dictlookup) dico-2.2/dicoweb/templatetags/media.py000066400000000000000000000017741172612674100200520ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2009, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . from django.template import Library register = Library () def media_prefix (): """Return the string contained in the setting MEDIA_URL.""" try: from django.conf import settings except ImportError: return '' return settings.MEDIA_URL media_prefix = register.simple_tag (media_prefix) dico-2.2/dicoweb/urls.py000066400000000000000000000020131172612674100152510ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . from django.conf import settings from django.conf.urls.defaults import * import views urlpatterns = patterns ( '', (r'^/?$', views.index, {}, 'index'), (r'^opensearch\.xml$', views.opensearch, {}, 'opensearch'), (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), ) dico-2.2/dicoweb/views.py000066400000000000000000000201121172612674100154210ustar00rootroot00000000000000# This file is part of GNU Dico. # Copyright (C) 2008-2010, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import re import hashlib import socket from django.conf import settings from django.core import urlresolvers from django.core.cache import cache from django.shortcuts import render_to_response from django.utils.translation import ugettext as _ import dicoclient from wit import wiki2html def index (request): page = { 'robots': 'index', } selects = {} mtc = {} result = {} markup_style = 'default' port = 2628 sid = request.COOKIES.get ('dicoweb_sid', '') request.session.set_expiry (0) accept_lang = request.META.get ('HTTP_ACCEPT_LANGUAGE', '').split (',') for i, lang in enumerate (accept_lang): accept_lang[i] = lang.split (';')[0] if 'server' in request.session: server = request.session['server'] else: server = settings.DICT_SERVERS[0] server = request.GET.get ('server', server) if not server in settings.DICT_SERVERS: server = settings.DICT_SERVERS[0] request.session['server'] = server; if len (settings.DICT_SERVERS) > 1: selects['sv'] = HtmlOptions (settings.DICT_SERVERS, server) key = hashlib.md5 ('%s/%s' % (sid, server.encode ('ascii', 'backslashreplace'))) sid = key.hexdigest () type = 'search' if 'define' in request.GET: type = 'define' else: type = 'search' database = request.GET.get ('db', '*') strategy = request.GET.get ('strategy', '.') key_databases = str ('dicoweb/databases/' + server) key_strategies = str ('dicoweb/strategies/' + server) databases = cache.get (key_databases) strategies = cache.get (key_strategies) if server.find (':') != -1: s = server.split (':', 1) server = s[0] port = int (s[1]) if not databases or not strategies: dc = dicoclient.DicoClient () try: dc.open (server, port) dc.timeout = settings.DICT_TIMEOUT databases = dc.show_databases ()['databases'] strategies = dc.show_strategies ()['strategies'] dc.close () except (socket.timeout, socket.error, dicoclient.DicoNotConnectedError): return render_to_response ('index.html', {'selects': selects}) cache.set (key_databases, databases, timeout=86400) cache.set (key_strategies, strategies, timeout=86400) for s in strategies: s[1] = _(s[1]) databases.insert (0, ['!', _('First match')]) databases.insert (0, ['*', _('All')]) strategies.insert (0, ['.', _('Default')]) selects['db'] = HtmlOptions (databases, database) selects['st'] = HtmlOptions (strategies, strategy) q = request.GET.get ('q', '') if 'q' in request.GET and q != '': langkey = '*'; if database == '*': langkey = ','.join (accept_lang) key = hashlib.md5 ('%s:%d/%s/%s/%s/%s/%s' % (server, port, langkey, type, database, strategy, q.encode ('ascii', 'backslashreplace'))) key = key.hexdigest () result = cache.get ('dicoweb/' + key) if not result: try: dc = dicoclient.DicoClient () dc.timeout = settings.DICT_TIMEOUT dc.open (server, port) dc.option ('MIME') if database == '*' and 'lang' in dc.server_capas: dc.option ('LANG', ': ' + ' '.join (accept_lang)) if 'markup-wiki' in dc.server_capas: if dc.option ('MARKUP', 'wiki'): markup_style = 'wiki' if database == 'dbinfo': result = dc.show_info (q) elif type == 'define': result = dc.define (database, q) else: result = dc.match (database, strategy, q) dc.close () result['markup_style'] = markup_style cache.set ('dicoweb/' + key, result, timeout=3600) except (socket.timeout, socket.error, dicoclient.DicoNotConnectedError): return render_to_response ('index.html', {'selects': selects}) # get last match results if sid and type == 'search': cache.set ('dicoweb/%s/last_match' % sid, key, timeout=3600) else: key = cache.get ('dicoweb/%s/last_match' % sid) if key != None: mtc = cache.get ('dicoweb/' + key) mtc['dbnames'] = {} if 'matches' in mtc: for m in mtc['matches']: for d in databases: if d[0] == m: mtc['dbnames'][m] = d[1] break if database == 'dbinfo': q = '' if q != '': page['title'] = q + ' - ' page['robots'] = 'noindex,nofollow' if 'definitions' in result: rx1 = re.compile ('{+(.*?)}+', re.DOTALL) for df in result['definitions']: if df.has_key ('content-type') \ and df['content-type'].startswith ('text/x-wiki'): lang = df['x-wiki-language'] \ if df.has_key ('x-wiki-language') else 'en' wikiparser = wiki2html.HtmlWiktionaryMarkup (text=df['desc'], html_base='?q=', lang=lang) wikiparser.parse () df['desc'] = str (wikiparser) df['format_html'] = True else: df['desc'] = re.sub ('_(.*?)_', '\\1', df['desc']) df['desc'] = re.sub (rx1, __subs1, df['desc']) return render_to_response ('index.html', {'page': page, 'q': q, 'mtc': mtc, 'result': result, 'selects': selects,}) def opensearch (request): url_query = request.build_absolute_uri (urlresolvers.reverse ('index')) url_media = request.build_absolute_uri (settings.MEDIA_URL) return render_to_response ('opensearch.xml', {'url_query': url_query, 'url_media': url_media}, mimetype='application/xml') def __subs1 (match): s = re.sub (r' +', ' ', match.group (1)) return '%s' \ % (s.replace ('\n', ''), s.replace ('\n', ''), s) class HtmlOptions: def __init__ (self, lst=[], value=''): self.lst = lst self.value = value def html (self): buf = [] for opt in self.lst: if len (opt) == 2: if not opt[1]: opt[1] = opt[0] if opt[0] == self.value: buf.append ('' % (opt[0], opt[1])) else: buf.append ('' % (opt[0], opt[1])) else: if opt == self.value: buf.append ('' % (opt, opt)) else: buf.append ('' % (opt, opt)) return '\n'.join (buf) dico-2.2/doc/000077500000000000000000000000001172612674100130475ustar00rootroot00000000000000dico-2.2/doc/Makefile.am000066400000000000000000000041731172612674100151100ustar00rootroot00000000000000# This file is part of GNU Dico # Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . info_TEXINFOS=dico.texi dico_TEXINFOS=\ fdl.texi\ libdico.texi\ macros.texi\ proto.texi\ strat.texi\ strftime.texi EXTRA_DIST = \ gendocs_template clean-local: rm -rf manual AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ imprimatur_INPUT=$(info_TEXINFOS) $(dico_TEXINFOS) include ../imprimatur/imprimatur.mk CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh # Checking check-options: @$(CHECK_DOCS) options \ '/OPTIONS_BEGIN/,/OPTIONS_END/s/OPTION( *\([^,][^,]*\),.*/\1/pg' \ '/@c option --/{s///;t a;:a;s/^\(\\option\\\|help\|version\|usage\)//;t;p}' \ $(top_srcdir)/dicod/cmdline.opt -- \ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ $(info_TEXINFOS) all-check-docs: imprimatur-basic-checks check-options check-docs: $(MAKE) -k all-check-docs # master-menu: imprimatur-master-menu untabify: imprimatur-untabify final: imprimatur-final GENDOCS=gendocs.sh TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E .PHONY: manual man-tar # Make sure you set TEXINPUTS. # TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions manual: TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \ MAKEINFO="$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \ TEXI2DVI="$(TEXI2DVI)" \ TEXI2HTML="texi2html $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \ $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual' manual.tar.bz2: manual tar cfj manual.tar.bz2 manual man-tar: manual.tar.bz2 dico-2.2/doc/Makefile.in000066400000000000000000001550371172612674100151270ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of GNU Dico # Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . # This file is part of Imprimatur. # Copyright (C) 2006, 2007, 2010, 2011 Sergey Poznyakoff # # Imprimatur 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 3, or (at your option) # any later version. # # Imprimatur 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 Imprimatur. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(dico_TEXINFOS) $(srcdir)/../imprimatur/imprimatur.mk \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/stamp-vti $(srcdir)/version.texi subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/dico.info TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux DVIS = dico.dvi PDFS = dico.pdf PSS = dico.ps HTMLS = dico.html TEXINFOS = dico.texi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = dico.texi dico_TEXINFOS = \ fdl.texi\ libdico.texi\ macros.texi\ proto.texi\ strat.texi\ strftime.texi EXTRA_DIST = \ gendocs_template AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ imprimatur_INPUT = $(info_TEXINFOS) $(dico_TEXINFOS) CHECK_DOCS = $(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh GENDOCS = gendocs.sh TEXI2DVI = texi2dvi -t '@set $(RENDITION)' -E all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../imprimatur/imprimatur.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texi.html: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/dico.info: dico.texi $(srcdir)/version.texi $(dico_TEXINFOS) dico.dvi: dico.texi $(srcdir)/version.texi $(dico_TEXINFOS) dico.pdf: dico.texi $(srcdir)/version.texi $(dico_TEXINFOS) dico.html: dico.texi $(srcdir)/version.texi $(dico_TEXINFOS) $(srcdir)/version.texi: $(srcdir)/stamp-vti $(srcdir)/stamp-vti: dico.texi $(top_srcdir)/configure @(dir=.; test -f ./dico.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/dico.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ 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 maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf dico.aux dico.cp dico.cps dico.fl dico.fn dico.kw dico.ky dico.log \ dico.op dico.pg dico.pr dico.tmp dico.toc dico.tp dico.vr clean-aminfo: -test -z "dico.dvi dico.pdf dico.ps dico.html" \ || rm -rf dico.dvi dico.pdf dico.ps dico.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool clean-local dist-info distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ uninstall-html-am uninstall-info-am uninstall-pdf-am \ uninstall-ps-am clean-local: rm -rf manual imprimatur-format: @if test -n "`cat $(imprimatur_INPUT) | tr -d -c '\t'`"; then \ echo "Sources contain tabs; run make imprimatur-untabify"; \ false; \ fi imprimatur-refs: @for file in $(imprimatur_INPUT); \ do \ grep -q '^@c imprimatur-ignore' $$file && continue; \ sed -e = $$file | \ sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/'$$file':\1: \2/gp}'; \ done > $@-t; \ if [ -s $@-t ]; then \ echo "Unresolved cross-references:"; \ cat $@-t;\ rm $@-t; \ else \ rm -f $@-t; \ fi imprimatur-fixmes: @for file in $(imprimatur_INPUT); \ do \ grep -q '^@c imprimatur-ignore' $$file && continue; \ sed -e = $$file | \ sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \ done > $@-t; \ if [ -s $@-t ]; then \ echo "Unresolved FIXMEs:"; \ cat $@-t; \ rm $@-t; \ false; \ else \ rm -f $@-t; \ fi imprimatur-writemes: @files=`grep -c '^@c imprimatur-ignore' $(imprimatur_INPUT) | sed -n 's/:0$$//p'`; \ test -n "$$files" && grep -Hn '^[ \t]*@WRITEME' $$files > $@-t; \ if [ -s $@-t ]; then \ echo "Empty nodes:"; \ cat $@-t; \ rm $@-t; \ false;\ else \ rm $@-t; \ fi imprimatur-empty-nodes: @awk -f $(top_srcdir)/$(IMPRIMATUR_MODULE_DIR)/emptynodes.awk \ -v scriptname=$(top_srcdir)/$(IMPRIMATUR_MODULE_DIR)/emptynodes.awk \ -v makeinfoflags="$(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \ $(info_TEXINFOS) imprimatur-unrevised: @files=`grep -c '^@c imprimatur-ignore' $(imprimatur_INPUT) | sed -n 's/:0$$//p'`; \ grep -Hn '^[ \t]*@UNREVISED' $$files > $@-t; \ if [ -s $@-t ]; then \ echo "Unrevised nodes:"; \ cat $@-t; \ rm $@-t; \ false;\ else \ rm $@-t; \ fi @IMPRIMATUR_COND_FRENCHSPACING_TRUE@imprimatur-check-sentence-spacing: @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ @if grep -q '\. [@A-Z]' $(imprimatur_INPUT); then \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ echo >&2 "Sources contain double-space sentence separators."; \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ echo >&2 "Run make imprimatur-fix-sentence-spacing to fix."; \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ fi @IMPRIMATUR_COND_FRENCHSPACING_TRUE@imprimatur-fix-sentence-spacing: @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ @for file in $(imprimatur_INPUT); \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ do \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ if grep -q '\. [@A-Z]' $$file; then \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ mv $$file $${file}~; \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ sed -r 's/\. ([@A-Z])/. \1/g' $${file}~ > $$file; \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ fi; \ @IMPRIMATUR_COND_FRENCHSPACING_TRUE@ done @IMPRIMATUR_COND_FRENCHSPACING_FALSE@imprimatur-check-sentence-spacing: @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ @if grep -q '\. [@A-Z]' $(imprimatur_INPUT); then \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ echo >&2 "Sources contain single-space sentence separators."; \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ echo >&2 "Run make imprimatur-fix-sentence-spacing to fix."; \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ fi @IMPRIMATUR_COND_FRENCHSPACING_FALSE@imprimatur-fix-sentence-spacing: @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ @for file in $(imprimatur_INPUT); \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ do \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ if grep -q '\. [@A-Z]' $$file; then \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ mv $$file $${file}~; \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ sed -r 's/\. ([@A-Z])/. \1/g' $${file}~ > $$file; \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ fi; \ @IMPRIMATUR_COND_FRENCHSPACING_FALSE@ done imprimatur-basic-checks: imprimatur-format imprimatur-check-sentence-spacing \ imprimatur-refs imprimatur-fixmes \ imprimatur-empty-nodes imprimatur-unrevised imprimatur-master-menu: @emacs -batch -l $(top_srcdir)/$(IMPRIMATUR_MODULE_DIR)/mastermenu.el \ -f make-master-menu $(info_TEXINFOS) imprimatur-untabify: @emacs -batch -l $(top_srcdir)/$(IMPRIMATUR_MODULE_DIR)/untabify.el \ $(imprimatur_INPUT) imprimatur-final: imprimatur-untabify imprimatur-master-menu # Checking check-options: @$(CHECK_DOCS) options \ '/OPTIONS_BEGIN/,/OPTIONS_END/s/OPTION( *\([^,][^,]*\),.*/\1/pg' \ '/@c option --/{s///;t a;:a;s/^\(\\option\\\|help\|version\|usage\)//;t;p}' \ $(top_srcdir)/dicod/cmdline.opt -- \ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ $(info_TEXINFOS) all-check-docs: imprimatur-basic-checks check-options check-docs: $(MAKE) -k all-check-docs # master-menu: imprimatur-master-menu untabify: imprimatur-untabify final: imprimatur-final .PHONY: manual man-tar # Make sure you set TEXINPUTS. # TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions manual: TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \ MAKEINFO="$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \ TEXI2DVI="$(TEXI2DVI)" \ TEXI2HTML="texi2html $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \ $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual' manual.tar.bz2: manual tar cfj manual.tar.bz2 manual man-tar: manual.tar.bz2 # 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: dico-2.2/doc/dico.info000066400000000000000000000121551172612674100146460ustar00rootroot00000000000000This is dico.info, produced by makeinfo version 4.13 from /home/gray/src/dico/doc/dico.texi. INFO-DIR-SECTION Dictionary START-INFO-DIR-ENTRY * Dico: (dico). A modular dictionary server package. * dicod: (dico) Dicod. Dictionary server program. * dico: (dico) dico client. Dictionary client program. END-INFO-DIR-ENTRY Published by the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover, and no Back-Cover texts. A copy of the license is included in the section entitled "GNU Free Documentation License". De'die' a` la me'moire de Jacques Brel.  Indirect: dico.info-1: 938 dico.info-2: 258176  Tag Table: (Indirect) Node: Top938 Node: Preface3837 Node: Overview4497 Ref: default strategy8025 Node: Intro9019 Node: Building11504 Node: Default Preprocessor12241 Ref: Default Preprocessor-Footnote-113544 Node: Default Server13585 Node: Guile Support14308 Ref: Guile Support-Footnote-114877 Node: Python Support14922 Node: Other Settings15300 Node: Dicod15816 Node: Daemon Mode16246 Node: Inetd Mode18372 Node: Configuration18946 Node: Syntax20675 Node: Comments21228 Node: Pragmatic Comments21831 Node: Statements23709 Ref: backslash-interpretation24978 Ref: here-document26343 Node: Server Settings28809 Ref: user statement29027 Ref: group statement29302 Ref: mode statement29892 Ref: inactivity-timeout32422 Ref: shutdown-timeout32808 Ref: identity-check32985 Node: Authentication33492 Node: text userdb37287 Node: ldap userdb39026 Node: SASL41570 Node: ACL43595 Node: Security Settings47618 Node: Logging and Debugging49050 Node: Access Log50799 Node: General Settings54233 Ref: initial reply54592 Ref: hostname directive55406 Node: Capabilities57503 Node: Handlers58882 Node: Databases62779 Node: Database Visibility65854 Node: Strategies and Default Searches67494 Node: Tuning69899 Node: Command Aliases71333 Node: Preprocessor72420 Node: Exit Codes75053 Node: Dicod Invocation76428 Ref: --define76601 Ref: --config76802 Ref: --foreground76931 Ref: --stderr77002 Ref: --syslog77082 Ref: --preprocessor77259 Ref: --no-preprocessor77507 Ref: --include-dir77590 Ref: --single-process77749 Ref: --transcript78113 Ref: --no-transcript78547 Ref: --inetd78775 Ref: --debug78836 Ref: --source-info79008 Ref: --trace-grammar79087 Ref: --trace-lex79198 Ref: --config-help79307 Ref: --lint79430 Ref: --help79581 Ref: --usage79655 Ref: --version79721 Node: Modules79771 Node: outline80430 Node: dictorg82424 Node: gcide85307 Node: idxgcide88124 Node: wordnet89735 Ref: wordnet-Footnote-193512 Node: guile93622 Ref: guile-cmdline95453 Node: Virtual Functions96312 Node: Guile Initialization97859 Node: Guile API99781 Ref: open-db100333 Ref: match-word103871 Node: Dico Scheme Primitives105462 Ref: dico-key->word105835 Node: Example Module107036 Node: python115152 Node: Dictionary Class116503 Node: Dico Python Primitives118377 Ref: Python Selector118877 Node: DicoSelectionKey120143 Node: DicoStrategy120625 Node: Python Example121330 Node: stratall127695 Node: substr128398 Node: word128905 Node: nprefix129821 Node: pcre130461 Node: ldap131845 Node: pam132199 Node: Interface133043 Node: dico_database_module133295 Ref: dico_init134626 Ref: dico_db_info137504 Ref: dico_result_count139888 Node: Strategies140894 Ref: selector142007 Node: Key143045 Ref: dico_key143165 Node: Selector145324 Node: Output148922 Node: dico client150911 Node: Single Query Mode151627 Node: dico options152763 Node: urls154358 Node: Interactive Mode157092 Node: Server Commands159324 Node: Database and Strategy160406 Node: Informational Commands162191 Node: History Commands163861 Node: Pager164940 Node: Program Settings165715 Node: Session Transcript167211 Node: Other Commands168833 Node: Command Summary170151 Node: Initialization File172944 Ref: Initialization File-Footnote-1174334 Node: Autologin174441 Node: Dico invocation179336 Ref: dico-opmode181767 Node: gcider183365 Node: Reporting Bugs187644 Node: Available Strategies188455 Ref: Available Strategies-Footnote-1192634 Node: Dictionary Server Protocol192685 Node: Initial Reply193200 Node: Standard Commands194466 Node: DEFINE194795 Node: MATCH197031 Node: SHOW199274 Node: OPTION201640 Node: AUTH202508 Node: CLIENT203562 Node: STATUS203946 Node: HELP204359 Node: QUIT205804 Node: Extended Commands206079 Node: Time and Date Formats207469 Ref: %c time format208343 Ref: %s time format210917 Ref: conversion specs212829 Node: Libdico213495 Node: strat213790 Node: argcv214995 Node: lists216635 Node: assoc218981 Node: diag219952 Node: filter221194 Node: parseopt222731 Node: stream223970 Node: url227836 Node: utf8229147 Node: util231651 Node: xlat232252 Node: Copying This Manual233020 Node: Concept Index258176  End Tag Table dico-2.2/doc/dico.info-1000066400000000000000000007702001172612674100150060ustar00rootroot00000000000000This is dico.info, produced by makeinfo version 4.13 from /home/gray/src/dico/doc/dico.texi. INFO-DIR-SECTION Dictionary START-INFO-DIR-ENTRY * Dico: (dico). A modular dictionary server package. * dicod: (dico) Dicod. Dictionary server program. * dico: (dico) dico client. Dictionary client program. END-INFO-DIR-ENTRY Published by the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover, and no Back-Cover texts. A copy of the license is included in the section entitled "GNU Free Documentation License". De'die' a` la me'moire de Jacques Brel.  File: dico.info, Node: Top, Next: Preface, Up: (dir) Dico Manual *********** This edition of the `GNU Dico Manual', last updated 4 March 2012, documents Dico Version 2.2. * Menu: * Preface:: * Overview:: * Intro:: Introduction to Dico. * Building:: Building the Package. * Dicod:: The dicod daemon. * Modules:: Dicod modules shipped with Dico. * Interface:: How to write your own Dico module. * dico client:: The client program. * gcider:: A window-based browser for GCIDE. * Reporting Bugs:: How to Report a Bug. Appendices * Available Strategies:: * Dictionary Server Protocol:: * Time and Date Formats:: * Libdico:: * Copying This Manual:: The GNU Free Documentation License. * Concept Index:: Index of Concepts. --- The Detailed Node Listing --- Building the Package * Default Preprocessor:: * Default Server:: * Guile Support:: * Python Support:: * Other Settings:: The `dicod' daemon. * Daemon Mode:: * Inetd Mode:: * Configuration:: * Exit Codes:: * Dicod Invocation:: Configuration * Syntax:: Configuration file syntax. * Server Settings:: * Authentication:: * SASL:: SASL Authentication. * ACL:: Access Control Lists * Security Settings:: * Logging and Debugging:: * Access Log:: * General Settings:: * Capabilities:: * Handlers:: * Databases:: * Strategies and Default Searches:: * Tuning:: * Command Aliases:: * Preprocessor:: Using preprocessor to improve the configuration. Configuration File Syntax * Comments:: * Pragmatic Comments:: * Statements:: Authentication * text userdb:: Flat Text Databases. * ldap userdb:: LDAP Databases. Databases * Database Visibility:: Modules * outline:: * dictorg:: * gcide:: * wordnet:: * guile:: * python:: * stratall:: * substr:: * word:: * nprefix:: * pcre:: * ldap:: * pam:: `Gcide' * idxgcide:: `Guile' * Virtual Functions:: * Guile Initialization:: * Guile API:: * Dico Scheme Primitives:: * Example Module:: Dico Module Interface * dico_database_module:: * Strategies:: * Output:: Strategies * Key:: * Selector:: Dico --- a client program. * Single Query Mode:: * Interactive Mode:: * Initialization File:: * Autologin:: * Dico invocation:: Single Query Mode * dico options:: * urls:: Interactive Mode * Server Commands:: * Database and Strategy:: * Informational Commands:: * History Commands:: * Pager:: * Program Settings:: * Session Transcript:: * Other Commands:: * Command Summary:: Dictionary Server Protocol * Initial Reply:: * Standard Commands:: * Extended Commands:: Standard Commands * DEFINE:: * MATCH:: * SHOW:: * OPTION:: * AUTH:: * CLIENT:: * STATUS:: * HELP:: * QUIT:: The Libdico Library * strat:: * argcv:: * lists:: * assoc:: * diag:: * filter:: * parseopt:: * stream:: * url:: * utf8:: * util:: * xlat::  File: dico.info, Node: Preface, Next: Overview, Prev: Top, Up: Top Preface ******* A "dictionary server" is a program that provides dictionary services to other computers using the client-server model. The dictionary services include listing the available databases, searching for a specific term in one or more databases, displaying the definitions found, etc. GNU Dico is an implementation of dictionary server, which supports a wide variety of database formats and is easily extensible using several scripting languages. Apart from the server, the package contains a console dictionary client and a window-based browser for GCIDE dictionary.  File: dico.info, Node: Overview, Next: Intro, Prev: Preface, Up: Top 1 Overview ********** A dictionary server operates on a set of "databases". Each database contains a set of "headwords" with corresponding "articles", therefore it can be regarded as a dictionary, in which articles supply definitions (or translations) for headwords. The server offers facilities for searching headwords in the databases and for fetching articles from them. This chapter provides an overview of the dictionary protocol and defines basic terms and notions used throughout this manual. When describing the protocol, the following typographic conventions are used: the data sent by the client are prefixed with `C:' and the data sent in response by the server are prefixed with `S:'. Each database has a unique name - a string of characters that serves to identify this particular database in a set of available databases. Two more pieces of textual data are associated with a database. The "database information" string (or "info", for short), supplies a short description of the database. It is a sentence, tersely describing the database, e.g. `English-German Dictionary'. The "database description" provides a full description of the dictionary, with author credits and copyright information. The length of this description is not limited. Both pieces of information can be requested by the remote user. The command `SHOW DB' lists all available databases along with their descriptions: C: SHOW DB S: 110 3 databases present S: jargon "Jargon File (4.3.1, 29 Jun 2001)" S: deu-eng "German-English Freedict dictionary" S: en-pl-naut "English-Polish dictionary of nautical terms" S: . S: 250 ok Each line of output lists a name of the dictionary, and the corresponding description. The `SHOW INFO' command displays full information about a database, whose name is given as its argument: C: SHOW INFO en-pl-naut S: 112 information for en-pl-naut S: English-Polish dictionary of nautical terms S: S: Permission is granted to copy, distribute and/or modify S: this document under the terms of the GNU Free Docu- S: mentation License, Version 1.2 or any later version S: published by the Free Software Foundation; with no S: Invariant Sections, no Front-Cover and Back-Cover Texts S: . S: 250 ok A definition for any given headword can be requested using the `DEFINE' command. It takes two arguments, the name of the database and the headword to look for in that database, e.g.: DEFINE en-pl-naut sprit If the headword is found in the database, its definition is displayed, otherwise a diagnostic message is returned, telling that the headword was not found. A special mechanism is provided for looking up the headword in a database (or databases). The `MATCH' command returns headwords that match a given string (a "search key") using a particular "strategy". In other words, a strategy identifies the algorithm for comparing two strings: a headword and the search key. A strategy is identified by its name. For example, the strategy `exact' means literal comparison and returns only those headwords that match the key exactly. The strategy `prefix' matches word prefixes. These two strategies are always present. Depending on the configuration, the server may offer other strategies as well. *Note Available Strategies::, for a complete list of strategies implemented in GNU Dico 2.2. One of the strategies is selected as a "default strategy". Usually such strategy tolerates possible typing errors and allows the user to find matching headwords even if he does not know exactly how the word in question is spelled. The default strategy is denoted as `.' (a dot). The `MATCH' command takes three arguments: the name of the database to search, the strategy and the search key. For example: S: MATCH wn prefix sail C: 152 4 matches found: list follows C: wn "sail" C: wn "sail through" C: wn "sailboat" C: wn "sailcloth" C: . C: 250 Ok Two database names are special. The `*' means search in all databases and return all matches. The `!' means search in all databases until the match is found in one of them and return only matches from that particular database. These are basic facilities provided by the DICT protocol. For a complete and detailed description of the protocol, see *note Dictionary Server Protocol::.  File: dico.info, Node: Intro, Next: Building, Prev: Overview, Up: Top 2 Introduction to GNU Dico ************************** GNU Dico is an implementation of DICT dictionary server (described in RFC 2229) and a set of accompanying utilities. The GNU Dico server uses two-layer model. The "protocol layer" is responsible for the correct DICT protocol dialog and is provided by the `dicod' server binary. The "database layer" is responsible for searching and retrieving data from dictionary databases. This layer is provided by external "loadable modules". Thus, Dico does not impose any specific dictionary database format. A single server can handle databases in various formats, provided that appropriate modules are available. Several database modules are shipped with GNU Dico. The following is a short introductions for some of them. *Note Modules::, for a complete list of available modules with detailed descriptions. dictorg This module provides full support for the format designed by the `DICT development group' (`http://dict.org'). This is a de facto standard for DICT databases. A number of dictionary databases in this format are provided by the `FreeDict' project (`http://freedict.org'). wordnet Support for `WordNet' databases. WordNet is a lexical database for the English language developed in the Princeton University and distributed under a BSD style license. gcide Support for `GNU Collaborative International Dictionary of English'. This dictionary derived from Webster's Revised Unabridged Dictionary, supplemented with some of the definitions from WordNet. It was edited by Patrick J. Cassidy, proof-read and supplemented by volunteers from around the world. It is available from `http://gcide.gnu.org.ua'. guile This module provides an interface to Guile, the "GNU's Ubiquitous Intelligent Language for Extensions" (`http://www.gnu.org/software/guile') and allows you to write Dico modules in Scheme programming language. python This module provides an interface to Python (`http://www.python.org') and can be used to write Dico modules in it. outline This module handles simple databases in GNU Emacs "outline" format. It is designed mostly for test purposes. This manual describes how to configure and use the Dico dictionary system. It also describes the API for writing Dico modules in C, Scheme or Python.  File: dico.info, Node: Building, Next: Dicod, Prev: Intro, Up: Top 3 Building the Package ********************** Building Dico is quite straightforward. You run `./configure', then `make', followed by `make install', and you are done. Actions the `configure' script performs are controlled by a set of command line options and variables. Some of these options are generic, i.e. common for all packages using the GNU `autoconf' system. For a detailed description of these option see the `INSTALL' file shipped with the sources. Yet another options are specific for Dico. We will describe them in this chapter. * Menu: * Default Preprocessor:: * Default Server:: * Guile Support:: * Python Support:: * Other Settings::  File: dico.info, Node: Default Preprocessor, Next: Default Server, Up: Building 3.1 Default Preprocessor ======================== The runtime configuration system uses `m4' to preprocess the configuration file (*note Preprocessor::), which makes the configuration extremely flexible. We recommend to use GNU m4 as a preprocessor(1). However, any other implementation of `m4' can be used as well. The `configure' script tries to determine full file name of the preprocessor binary and the necessary command line options. In case it makes a wrong guess, you can instruct it to use a particular preprocessor by using `DEFAULT_PREPROCESSOR' configuration variable. For example, the following `configure' invocation instructs it to use `/usr/local/bin/gm4': $ ./configure DEFAULT_PREPROCESSOR="/usr/local/bin/gm4 -s" Note the use of the `-s' preprocessor option. It instructs `m4' to produce line directives which help `dicod' produce correct diagnostics about eventual configuration errors. Unless your `m4' implementation does not have this feature, we recommend to always use it in `DEFAULT_PREPROCESSOR' value. Finally, if you do not wish to use preprocessor at all, you can disable it using `--without-preprocessor' option to `configure'. ---------- Footnotes ---------- (1) `http://www.gnu.org/software/m4'  File: dico.info, Node: Default Server, Next: Guile Support, Prev: Default Preprocessor, Up: Building 3.2 Default Server ================== Unless given an explicit dictionary server, the `dico' client program attempts to connect to the server . You may change this default by defining the `DEFAULT_DICT_SERVER' variable. For example, the following command line selects `dict.org' as the default server: $ ./configure DEFAULT_DICT_SERVER=dict.org The value of the `DEFAULT_DICT_SERVER' variable can be either a hostname or IP address of the server. It can also be followed by a colon and a port specification, either as a decimal number or as a service name from `/etc/services'.  File: dico.info, Node: Guile Support, Next: Python Support, Prev: Default Server, Up: Building 3.3 Guile Support ================= The "GNU's Ubiquitous Intelligent Language for Extensions", or "Guile"(1) can be used to write database modules for GNU Dico. This requires Guile version 1.8.4 or newer. The `configure' script will probe for the presence of Guile on your system and automatically enable its use if its version number is high enough. If you do not wish to use Guile, use `--without-guile' to disable it. ---------- Footnotes ---------- (1) `http://www.gnu.org/software/guile'.  File: dico.info, Node: Python Support, Next: Other Settings, Prev: Guile Support, Up: Building 3.4 Python Support ================== The support for Python (`http://www.python.org') is enabled automatically if `configure' detects that Python version 2.5 or later is installed on your machine. If you do not wish to use Python, use `--without-python' to disable it.  File: dico.info, Node: Other Settings, Prev: Python Support, Up: Building 3.5 Other Configure Settings ============================ The `dicod' daemon uses `syslogd' for diagnostics. The default syslog facility can be set using `LOG_FACILITY' configuration variable. Its allowed arguments are `user', `daemon', `auth', `authpriv', `mail', `cron', and `local0' through `local7'. Case is not significant. In addition, these words can be prefixed with `log_'. By default, the `daemon' facility is used.  File: dico.info, Node: Dicod, Next: Modules, Prev: Building, Up: Top 4 The `dicod' daemon. ********************* The main component of GNU Dico is the `dicod' daemon. It is responsible for serving client requests and for coordinating the work of dictionary modules. There are two "operation modes": `daemon' and `inetd'. * Menu: * Daemon Mode:: * Inetd Mode:: * Configuration:: * Exit Codes:: * Dicod Invocation::  File: dico.info, Node: Daemon Mode, Next: Inetd Mode, Up: Dicod 4.1 Daemon Operation Mode ========================= The `daemon' mode is enabled by `mode daemon' statement in the configuration file (*note mode statement::). It is also the default mode. In daemon mode `dicod' listens for incoming requests on one or several network interfaces. Unless the `--foreground' option is specified, it detaches itself from the controlling terminal and switches to background (becomes a "daemon"). When an incoming connection arrives, it forks a subprocess for handling it. In this mode the following signals cause `dicod' to terminate: `SIGTERM', `SIGQUIT', and `SIGINT'. The `SIGHUP' signal causes the program to restart. This works only if both the program name and its configuration file name (if given using `--config' option) are absolute file names. Upon receiving `SIGHUP', `dicod' first verifies if the configuration file does not contain fatal errors. To do that, the program executes a copy of itself with the `--lint' option (*note --lint::) and analyzes its return code. Only if this check passes, `dicod' restarts itself. This ensures that the daemon will not terminate due to unnoticed errors in its configuration file. Upon receiving `SIGTERM', `SIGQUIT', or `SIGINT', the program stops accepting incoming requests and sends the `SIGTERM' signal to all active subprocesses. Then it waits a predefined amount of time for all processes to terminate (*note shutdown-timeout::). Any subprocesses that do not terminate after this time are sent the `SIGKILL' signal. Then, the database modules are unloaded and `dicod' terminates. Several command line options are provided that modify the behavior of `dicod' in this mode. These options are mainly designed for debugging and error-hunting purposes. The `--foreground' option instructs the server to remain attached to the controlling terminal and stay in the foreground. It is often used with `--stderr' option, which instructs `dicod' to output all diagnostic to the standard error output, instead of syslog which is used by default.  File: dico.info, Node: Inetd Mode, Next: Configuration, Prev: Daemon Mode, Up: Dicod 4.2 Inetd Operation Mode ======================== In `inetd' operation mode `inetd' receives requests from standard input and sends its replies to the standard output. This mode is enabled by `mode inetd' statement (*note mode statement::) in configuration file, or by the `--inetd' command line option (*note --inetd::). This mode is usually used when invoking `dicod' from `inetd.conf' file, as in example below: dict stream tcp nowait nobody /usr/bin/dicod --inetd  File: dico.info, Node: Configuration, Next: Exit Codes, Prev: Inetd Mode, Up: Dicod 4.3 Configuration ================= Upon startup, `dicod' reads its settings and database definitions from a "configuration file" `dicod.conf'. By default it is located in $SYSCONFIDR (i.e., in most cases `/usr/local/etc', or `/etc'), but an alternative location may be specified using the `--config' command line option (*note --config::). If any errors are encountered in the configuration file, the program reports them on the standard error and exits with a non-zero status. To test the configuration file without starting the server, use the `--lint' (`-t') command line option. It causes `dicod' to check its configuration file and exit with status 0 if no errors were detected, and with status 1 otherwise. Before parsing, the configuration file is preprocessed using `m4' (*note Preprocessor::). To examine the preprocessed configuration without actually parsing it, use the `-E' command line option. To avoid preprocessing it, use the `--no-preprocessor' option. The rest of this section describes configuration file syntax in detail. You can receive a concise summary of all configuration directives any time by running `dicod --config-help'. * Menu: * Syntax:: Configuration file syntax. * Server Settings:: * Authentication:: * SASL:: SASL Authentication. * ACL:: Access Control Lists * Security Settings:: * Logging and Debugging:: * Access Log:: * General Settings:: * Capabilities:: * Handlers:: * Databases:: * Strategies and Default Searches:: * Tuning:: * Command Aliases:: * Preprocessor:: Using preprocessor to improve the configuration.  File: dico.info, Node: Syntax, Next: Server Settings, Up: Configuration 4.3.1 Configuration File Syntax ------------------------------- A `dicod' configuration consists of statements and comments. There are three classes of lexical tokens: keywords, values, and separators. Blanks, tabs, newlines and comments, collectively called "white space" are ignored except as they serve to separate tokens. Some white space is required to separate otherwise adjacent keywords and values. * Menu: * Comments:: * Pragmatic Comments:: * Statements::  File: dico.info, Node: Comments, Next: Pragmatic Comments, Up: Syntax 4.3.1.1 Comments ................ "Comments" may appear anywhere where white space may appear in the configuration file. There are two kinds of comments: single-line and multi-line comments. "Single-line" comments start with `#' or `//' and continue to the end of the line: # This is a comment // This too is a comment "Multi-line" or "C-style" comments start with the two characters `/*' (slash, star) and continue until the first occurrence of `*/' (star, slash). Multi-line comments cannot be nested.  File: dico.info, Node: Pragmatic Comments, Next: Statements, Prev: Comments, Up: Syntax 4.3.1.2 Pragmatic Comments .......................... Pragmatic comments are similar to usual comments, except that they cause some changes in the way the configuration is parsed. Pragmatic comments begin with a `#' sign and end with the next physical newline character. As of GNU Dico version 2.2, the following pragmatic comments are understood: `#include ' `#include FILE' Include the contents of the FILE. If FILE is an absolute file name, both forms are equivalent. Otherwise, the form with angle brackets searches for the file in the "include search path", while the second one looks for it in the current working directory first, and, if not found there, in the include search path. The default include search path is: 1. `PREFIX/share/dico/2.2/include' 2. `PREFIX/share/dico/include' where PREFIX is the installation prefix. New directories can be appended in front of it using `-I' (`--include-dir') command line option (*note --include-dir::). `#include_once ' `#include_once FILE' Same as `#include', except that, if the FILE has already been included, it will not be included again. `#line NUM' `#line NUM "FILE"' This line causes `dicod' to believe, for purposes of error diagnostics, that the line number of the next source line is given by NUM and the current input file is named by FILE. If the latter is absent, the remembered file name does not change. `# NUM "FILE"' This is a special form of `#line' statement, understood for compatibility with the C preprocessor. In fact, these statements provide a rudimentary preprocessing features. For more sophisticated ways to modify configuration before parsing, see *note Preprocessor::.  File: dico.info, Node: Statements, Prev: Pragmatic Comments, Up: Syntax 4.3.1.3 Statements .................. A "simple statement" consists of a keyword and a value separated by any amount of whitespace. It is terminated with a semicolon (`;'), unless the value is a "here-document" (see below), in which case semicolon is optional. Examples of simple statements: timing yes; access-log-file /var/log/access_log; A "keyword" begins with a letter and may contain letters, decimal digits, underscores (`_') and dashes (`-'). Examples of keywords are: `group', `identity-check'. A "value" can be one of the following: number A number is a sequence of decimal digits. boolean A boolean value is one of the following: `yes', `true', `t' or `1', meaning "true", and `no', `false', `nil', `0' meaning "false". unquoted string An unquoted string may contain letters, digits, and any of the following characters: `_', `-', `.', `/', `@', `*', `:'. quoted string A quoted string is any sequence of characters enclosed in double-quotes (`"'). A backslash appearing within a quoted string introduces an "escape sequence", which is replaced with a single character according to the following rules: Sequence Replaced with \a Audible bell character (ASCII 7) \b Backspace character (ASCII 8) \f Form-feed character (ASCII 12) \n Newline character (ASCII 10) \r Carriage return character (ASCII 13) \t Horizontal tabulation character (ASCII 9) \v Vertical tabulation character (ASCII 11) \\ A single backslash (`\') \" A double-quote. Table 4.1: Backslash escapes In addition, the sequence `\NEWLINE' is removed from the string. This allows you to split long strings over several physical lines, e.g.: "a long string may be\ split over several lines" If the character following a backslash is not one of those specified above, the backslash is ignored and a warning is issued. Two or more adjacent quoted strings are concatenated, which gives another way to split long strings over several lines to improve readability. For instance, the following fragment produces the same result as the example above: "a long string may be" " split over several lines" Here-document A "here-document" is a special construct that allows the user to introduce strings of text containing embedded newlines. The `< <1645.1212874507@example.net> C: client "Kdict" S: 250 ok C: show db S: 110 16 databases present S: afr-deu "Afrikaans-German Freedict dictionary" S: afr-eng "Afrikaans-English FreeDict Dictionary" [...] S: . S: 250 ok (The first line is split in two to fit in the printed page width.) This option produces lots of output and can significantly slow down the server. Use it only if you are debugging `dicod' or some remote client. Never use it in a production environment.  File: dico.info, Node: Access Log, Next: General Settings, Prev: Logging and Debugging, Up: Configuration 4.3.8 Access Log ---------------- GNU Dico provides a feature similar to Apache's `CustomLog', which keeps a log of `MATCH' and `DEFINE' requests. To enable this feature, specify the name of the log file using the following directive: -- Configuration: access-log-file STRING Sets access log file name. access-log-file /var/log/dico/access.log; The format of log file entries is defined via the `access-log-format' directive: -- Configuration: access-log-format STRING Sets format string for access log file. Its argument can contain literal characters, which are copied into the log file verbatim, and "format specifiers", i.e. special sequences which begin with `%' and are replaced in the log file as shown in the table below. `%%' The percent sign. `%a' Remote IP-address. `%A' Local IP-address. `%B' Size of response in bytes. `%b' Size of response in bytes in CLF format, i.e. a `-' rather than a `0' when no bytes are sent. `%C' Remote client (from `CLIENT' command (*note CLIENT::). `%D' The time taken to serve the request, in microseconds. `%d' Request command verb in abbreviated form, suitable for use in URLs, i.e. `d' for `DEFINE', and `m' for `MATCH'. *Note urls::. `%h' Remote host. `%H' Request command verb (`DEFINE' or `MATCH'). `%l' Remote logname (from identd, if supplied). This will return a dash unless `identity-check' is set to true. *Note identity-check::. `%m' The search strategy. `%p' The canonical port of the server serving the request. `%P' The PID of the child that serviced the request. `%q' The database from the request. `%r' Full request. `%{N}R' The Nth token from the request (N is 0-based). `%s' Reply status. For multiple replies, the form `%s' returns the status of the first reply, while `%>s' returns that of the last reply. `%t' Time the request was received in the standard Apache format, e.g.: [04/Jun/2008:11:05:22 +0300] `%{FORMAT}t' The time, in the form given by FORMAT, which should be a valid `strftime' format. *Note Time and Date Formats::, for a detailed description. The standard `%t' format is equivalent to [%d/%b/%Y:%H:%M:%S %z] `%T' The time taken to serve the request, in seconds. `%u' Remote user from `AUTH' command. `%v' The host name of the server serving the request. *Note hostname directive::. `%V' Actual host name of the server (in case it was overridden in configuration). `%W' The word from the request. For the reference, here is the list of format specifiers that have different meaning than in Apache: `%C', `%H', `%m', `%q'. The following format specifiers are unique to `dicod': `%d', `%{N}R', `%V', `%W'. The absence of `access-log-format' directive is equivalent to the following statement: access-log-format "%h %l %u %t \"%r\" %>s %b"; It was chosen so as to be compatible with Apache access logs and be easily parsable by existing log analyzing tools, such as `webalizer'. Extending this format string with the client name produces a log format similar to Apache `combined log': access-log-format "%h %l %u %t \"%r\" %>s %b \"\" \"%C\"";  File: dico.info, Node: General Settings, Next: Capabilities, Prev: Access Log, Up: Configuration 4.3.9 General Settings ---------------------- Settings described in this subsection configure the basic behavior of the DICT daemon. -- Configuration: initial-banner-text STRING Display the STRING in the textual part of the initial server reply. When connection is established, the server sends an "initial reply" to the client, that looks like in the example below: 220 example.org <520.1212912026@example.org> *Note Initial Reply::, for a detailed description of its parts. The part of this reply after the host name is modifiable and can contain arbitrary text. You can use `initial-banner-text' to append any additional information there. Note, that STRING may not contain newlines or angle brackets. For example: initial-banner-text "Please authenticate yourself,"; This statement produces the following initial reply (split over two lines for readability): 220 example.org Please authenticate yourself, <520.1212912026@Texample.org> -- Configuration: hostname STRING Sets the hostname. By default, the server determines it automatically. If, however, it makes a wrong guess, you can fix it using this directive. The server hostname is used, among others, in the initial reply after `220' code (see above) and may also be displayed in the access log file using the `%v' escape (*note Access Log::). -- Configuration: server-info STRING Sets the server description to be shown in reply to `SHOW SERVER' (*note SHOW SERVER: SHOW.) command. The first line of the reply, after the usual `114' response line, shows the name of host where the server is running. If the settings of `show-sys-info' (*note show-sys-info: Security Settings.) permit, some additional information about the system is printed. The lines that follow are taken from the `server-info' directive. It is common to specify STRING using "here-document" syntax (*note here-document::), e.g.: server-info < if you have questions or suggestions. EOT; -- Configuration: help-text STRING Sets the text to be displayed in reply to the HELP command. The default reply to HELP command displays a list of commands understood by the server with a short description of each. If the STRING begins with a plus sign, it will be appended to the default reply: help-text <<-EOT + The commands beginning with an X are extensions. EOT; If the STRING begins with any other character, except `+', it will replace the default help output. For example: help-text <<-EOT There is no help. See RFC 2229 for detailed information. EOT; -- Configuration: default-strategy STRING Sets the name of the default matching strategy (*note MATCH::). By default, Levenshtein matching is used, which is equivalent to default-strategy lev;  File: dico.info, Node: Capabilities, Next: Handlers, Prev: General Settings, Up: Configuration 4.3.10 Server Capabilities -------------------------- "Capabilities" are certain server features that can be enabled or disabled at the system administrator's will. -- Configuration: capability LIST Requests additional capabilities from the LIST. The argument to `capability' directive must contain names of existing `dicod' capabilities. These are listed in the following table: auth The `AUTH' command is supported. *Note Authentication::. mime The `OPTION MIME' command is supported. Notice that RFC 2229 requires all servers to support that command, so you should always specify this capability. xversion The `XVERSION' command is supported. It is a GNU extension that displays the `dicod' implementation and version number. *Note XVERSION: Extended Commands. xlev The `XLEV' command is supported. This command allows the remote party to set and query maximal Levenshtein distance for `lev' matching strategy. *Note strategy: MATCH. *Note XLEV: Extended Commands. The capabilities set using this directive are displayed in the initial server reply (*note initial reply::), and their descriptions are added to the `HELP' command output (unless specified otherwise by the `help' statement).  File: dico.info, Node: Handlers, Next: Databases, Prev: Capabilities, Up: Configuration 4.3.11 Database Modules and Handlers ------------------------------------ A "database module" is an external piece of software designed to handle a particular format of dictionary databases. This piece of software is built as a shared library that `dicod' loads at run time. A "handler" is an instance of the database module loaded by `dicod' and configured for a specific database or a set of databases. Database handlers are defined using the following block statement: -- Configuration: load-module STRING { ... } Create an instance of a database module. The argument specifies a unique name which will be used by subsequent parts of the configuration to refer to this handler. The ellipsis in the description above represents sub-statements. As of Dico version 2.2 only one sub-statement is defined: -- load-module config: command STRING Sets the command line for this handler. It is similar to the shell's command line in that it consists of a name of database module, optionally followed by a whitespace-separated list of its arguments. The name of the module specifies the disk file to load (see below for a detailed description of the loading sequence). Both command name and arguments are passed to the module "initialization function" (*note dico_init::). For example: load-module dict { command "dictorg dbdir=/var/dicodb"; } This statement defines a handler named `dict', which loads the module `dictorg' and passes its initialization function a single argument, `dbdir=/var/dicodb'. If the module name is not an absolute file name, as in this example, the loadable module will be searched in the module load path. A common case is when the module does not require initialization arguments and its command string is the same as its name, e.g.: load-module outline { command "outline"; } The configuration syntax provides a shortcut for such usage: load-module outline; If `load-module' is used this way, it accepts a single string or a list of strings as its argument. In the latter case, it loads all modules listed in the argument. For example: load-module (stratall,substr,word); A "module load path" is an internal list of directories which `dicod' scans in order to find a loadable file name specified in the `command' statement. By default the search order is as follows: 1. Optional "prefix" search directories specified by the `prepend-load-path' directive (see below). 2. GNU Dico module directory: `$prefix/lib/dico'. 3. Additional search directories specified by the `module-load-path' directive (see below). 4. The value of the environment variable `LTDL_LIBRARY_PATH'. 5. The system dependent library search path (e.g. on GNU/Linux it is defined by the file `/etc/ld.so.conf' and the environment variable `LD_LIBRARY_PATH'). The value of `LTDL_LIBRARY_PATH' and `LD_LIBRARY_PATH' must be a colon-separated list of absolute directory names, for example `/usr/lib/mypkg:/lib/foo'. In any of these directories, `dicod' first attempts to find and load the given filename. If this fails, it tries to append the following suffixes to it: 1. the libtool archive suffix `.la' 2. the suffix used for native dynamic libraries on the host platform, e.g., `.so', `.sl', etc. -- Configuration: module-load-path LIST This directive adds the directories listed in its argument to the module load path. Example: module-load-path (/usr/lib/dico,/usr/local/dico/lib); -- Configuration: prepend-load-path LIST Same as `module-load-path', but adds directories to the beginning of the module load path.  File: dico.info, Node: Databases, Next: Strategies and Default Searches, Prev: Handlers, Up: Configuration 4.3.12 Databases ---------------- Dictionary databases are defined using the `database' block statement. -- Configuration: database { STATEMENTS } Defines a dictionary database. At least two sub-statements must be defined for each database: `name' and `handler'. -- Database: name STRING Sets the name of this database (a single word). This name will be used to identify this database in DICT commands. -- Database: handler STRING Specifies the handler name for this database and any arguments for it. This handler must be previously defined using the `load-module' statement (*note Handlers::). For example, the following fragment defines a database named `en-de', which is handled by `dictord' handler. The handler is passed one argument, `database=en-de': database { name "en-de"; handler "dictorg database=en-de"; } More directives are available to fine-tune the database. -- Database: description STRING Supplies a short description, to be shown in reply to `SHOW DB' command. The STRING may not contain new-lines. Use this statement if the database itself does not supply a description, or if its description is malformed. In any case, if the `description' directive is specified, its value takes precedence over the description string retrieved from the database itself. *Note SHOW DB: SHOW, for a description of `SHOW DB' command. -- Database: info STRING Supplies a full description of the database. This description is shown in reply to `SHOW INFO' (*note SHOW INFO: SHOW.) command. The STRING is usually a multi-line text, so it is common to use here-document syntax (*note here-document::), e.g.: info <<- EOT This is a foo-bar dictionary. Copyright (C) 2008 foo-bar dict group. Distributed under the terms of GNU Free Documentation license. EOT; Use this statement if the database itself does not supply a full description, or if its full description is malformed. As with `description', the value of `info' takes precedence over info strings retrieved from the database. The following two directives control the content type and transfer encoding used when formatting replies from this database if `OPTION MIME' (*note OPTION MIME: OPTION.) is in effect: -- Database: content-type STRING Sets the content type of the reply. E.g.: directory { name "foo"; handler "dictorg"; content-type "text/html"; ... } -- Database: content-transfer-encoding ENUM Sets transfer encoding to use when sending MIME replies for this database. Allowed values for ENUM are: base64 Use BASE64 encoding. quoted-printable Use quoted-printable encoding. * Menu: * Database Visibility::  File: dico.info, Node: Database Visibility, Up: Databases 4.3.12.1 Database Visibility ............................ A property called "database visibility" is associated with each dictionary database. It determines whether the database appears in the output of `SHOW DB' command, and takes part in dictionary searches. By default, all databases are defined as publicly visible. You can, however, limit their visibility on global as well as on per-directory basis. This can be achieved using "visibility ACLs". In general, the visibility of a database is controlled by two access control lists: a global visibility ACL and a database visibility ACL. The latter takes precedence over the former. Both ACLs are defined using the `visibility-acl' statement: -- Configuration: visibility-acl ACL-NAME Sets name of the ACL that controls the database visibility. When used in global scope, this statement sets the global visibility ACL. If used within a `database' block, it sets the visibility ACL for that particular database. Consider the following example: acl glob-vis { allow authenticated; deny all; } acl local-nets { allow from (192.168.10.0/24, /tmp/dicod.sock); } visibility-acl glob-vis; database { name "terms"; visibility-acl local-nets; } In this configuration, the `terms' database is visible to everybody coming from the `192.168.10.0/24' network and from the UNIX socket `/tmp/dicod.sock', without authorization. It is not visible to users coming from elsewhere, unless they authenticate themselves.  File: dico.info, Node: Strategies and Default Searches, Next: Tuning, Prev: Databases, Up: Configuration 4.3.13 Strategies and Default Searches -------------------------------------- A "default search" is a `MATCH' request with `*' or `!' as the database argument (*note MATCH::). The former means search in all available databases, the latter means search in all databases until a match is found. Default searches may be quite expensive and may cause considerable strain on the server. For example, the command `MATCH * priefix ""' returns all entries from all available databases, which would consume a lot of resources both on the server and on the client side. To minimize harmful effects from such potentially dangerous requests, it is possible to limit the use of certain strategies in default searches. -- Configuration: strategy NAME { STATEMENTS } Restricts the use of the strategy NAME in default searches. The STATEMENTS define conditions the 4th argument of a `MATCH' command must match in order to deny the request. The following statements are defined: -- Configuration: deny-all BOOL Unconditionally deny this strategy in default searches. -- Configuration: deny-word LIST Deny this strategy if the search word matches one of the words from LIST. -- Configuration: deny-length-lt NUMBER Deny if length of the search word is less than NUMBER. -- Configuration: deny-length-le NUMBER Deny if length of the search word is less than or equal to NUMBER. -- Configuration: deny-length-gt NUMBER Deny if length of the search word is greater than NUMBER. -- Configuration: deny-length-ge NUMBER Deny if length of the search word is greater than or equal to NUMBER. -- Configuration: deny-length-eq NUMBER Deny if length of the search word is equal to NUMBER. -- Configuration: deny-length-ne NUMBER Deny if length of the search word is not equal to NUMBER. For example, the following statement denies the use of `prefix' strategy in default searches if its argument is an empty string: strategy prefix { deny-length-eq 0; } If the `dicod' daemon is configured this way, it will always return a `552' reply on commands `MATCH * prefix ""' or `MATCH ! prefix ""'. However, the use of empty prefix on a concrete database, as in `MATCH eng-deu prefix ""', will still be allowed.  File: dico.info, Node: Tuning, Next: Command Aliases, Prev: Strategies and Default Searches, Up: Configuration 4.3.14 Tuning ------------- While tuning your server, it is often necessary to get timing information which shows how much time is spent serving certain requests. This can be achieved using the `timing' configuration directive: -- Configuration: timing BOOLEAN Provide timing information after successful completion of an operation. This information is displayed after the following requests: `MATCH', `DEFINE', and `QUIT'. It consists of the following parts: [d/m/c = ND/NM/NC RTr UTu STs] where: ND Number of processed define requests. It is `0' after a `MATCH' request. NM Number of processed match requests. It is `0' after a `DEFINE' request. NC Number of comparisons made. This value may be inaccurate if the underlying database module is not able to count comparisons. RT Real time spent serving the request. UT Time in user space spent serving the request. ST Time in kernel space spent serving the request. An example of a server reply with timing information follows: 250 Done [d/m/c = 0/63/107265 2.293r 1.120u 0.010s] You can also add timing information to your access log files, see *note %T: Access Log.  File: dico.info, Node: Command Aliases, Next: Preprocessor, Prev: Tuning, Up: Configuration 4.3.15 Command Aliases ---------------------- "Aliases" allow a string to be substituted for a word when it is used as the first word of a command. The daemon maintains a list of aliases that are created using the `alias' configuration file statement: -- Configuration: alias WORD COMMAND Creates a new alias. Aliases are useful to facilitate manual interaction with the server, as they allow the administrator to create abbreviations for some frequently typed commands. For example, the following alias creates new command `d' which is equivalent to `DEFINE *': alias d DEFINE "*"; Aliases may be recursive, i.e. the first word of COMMAND may refer to another alias. For example: alias d DEFINE; alias da d "*"; This configuration will produce the following expansion: da word => DEFINE * word To prevent endless loops, recursive expansion is stopped if the first word of the replacement text is identical to an alias expanded earlier.  File: dico.info, Node: Preprocessor, Prev: Command Aliases, Up: Configuration 4.3.16 Using Preprocessor to Improve the Configuration. ------------------------------------------------------- Before parsing its configuration file, `dicod' preprocesses it. The built-in preprocessor handles only file inclusion and `#line' statements (*note Pragmatic Comments::), while the rest of traditional preprocessing facilities, such as macro expansion, is supported via `m4', which is used as an external preprocessor. The detailed description of `m4' facilities lies far beyond the scope of this document. You will find a complete user manual in *note GNU M4 manual: (m4)Top. For the rest of this subsection we assume the reader is sufficiently acquainted with `m4' macro processor. The external preprocessor is invoked with `-s' flag, instructing it to include line synchronization information in its output. This information is then used by the parser to display meaningful diagnostic. An initial set of macro definitions is supplied by the `pp-setup' file, located in `$PREFIX/share/dico/VERSION/include' directory (where VERSION means the version of GNU Dico package). The default `pp-setup' file renames all `m4' built-in macros so they all start with the prefix `m4_'. This is similar to GNU m4 `--prefix-builtin' option, but has an advantage that it works with non-GNU `m4' implementations as well. As an example of how the use of preprocessor may improve `dicod' configuration, consider the following fragment taken from one of the installations of GNU Dico. This installation offers quite a few Freedict dictionaries. The database definition for each of them is almost the same, except for the dictionary name and eventual description entry for several databases that miss it. To avoid repeating the same text over again, we define the following macro: # defdb(NAME[, DESCR]) # Produce a standard definition for a database NAME. # If DESCR is given, use it as a description. m4_define(`defdb', ` database { name "$1"; handler "dictorg database=$1";m4_dnl m4_ifelse(`$2',,,` description "$2";') } ') It takes two arguments. The first one, NAME, defines the dictionary name visible in the output of `SHOW DB' command. Optional second argument may be used to supply a description string for the databases that miss it. Given this macro, the database definitions look like: defdb(eng-swa) defdb(swa-eng) defdb(afr-eng, Afrikaans-English Dictionary) defdb(eng-afr, English-Afrikaans Dictionary)  File: dico.info, Node: Exit Codes, Next: Dicod Invocation, Prev: Configuration, Up: Dicod 4.4 Dicod Exit Codes ==================== Apart from issuing a descriptive error message, `dicod' attempts to indicate the reason of its termination by its error code. As usual, a zero exit code indicates normal termination. The table below summarizes all possible error codes. For each error code, it indicates its decimal value and its symbolic name from `include/sysexits.h' (if available). 0 EX_OK Program terminated correctly. 2 Only child instances of `dicod' exit with this code. It indicates that the child did not receive any `DICT' command within the time out interval (*note inactivity-timeout::). 64 EX_USAGE The program was invoked incorrectly, e.g. an invalid option was given, or an erroneous argument was supplied to an option. 67 EX_NOUSER `Dicod' cannot switch to the privileges of the user it is configured to run as (*note user statement::). 69 EX_UNAVAILABLE The server exited due to some error not otherwise described in this table. 70 EX_SOFTWARE Some internal software error occurred. 71 EX_OSERR Some system error occurred, e.g. the program ran out of memory, or file descriptors, or `fork' failed, etc. 78 EX_CONFIG An error in the configuration file was detected.  File: dico.info, Node: Dicod Invocation, Prev: Exit Codes, Up: Dicod 4.5 Dicod Invocation ==================== This section summarizes `dicod' command line options. `--define=SYMBOL[=VALUE]' `-D SYMBOL[=VALUE]' Define the preprocessor symbol SYMBOL. Optional VALUE supplies the new symbol value. This option is passed to the preprocessor verbatim. `--config=FILE' Read this configuration file instead of the default `$SYSCONFDIR/dicod.conf'. *Note Configuration::. `-f' `--foreground' Operate in foreground. *Note Daemon Mode::. `--stderr' Output the diagnostics to stderr. *Note -stderr: Daemon Mode. `--syslog' After successful startup, output any diagnostic to syslog. This is the default. `-E' Preprocess configuration file and exit. *Note Preprocessor::. `--preprocessor=PROG' Use PROG as a preprocessor for configuration file. The default preprocessor command line is `m4 -s', unless overridden while configuring the package (*note Default Preprocessor::). *Note Preprocessor::. `--no-preprocessor' Do not use external preprocessor. *Note Preprocessor::. `-I DIR' `--include-dir=DIR' Add the directory DIR to the list of directories to be searched for preprocessor include files. *Note Preprocessor::. `-s' `--single-process' In daemon mode, process connections in the main process, without starting subprocesses for each connection (*note Daemon Mode::). This means that the daemon is able to serve only one client at a time. The `--single-process' option is provided for debugging purposes only. Never use it in production environment. `-T' `--transcript' Enable session transcript. This instructs `dicod' to log all commands it receives and all responses it sends during the session. Transcript is logged via the default logging channel (*note Logging and Debugging::). If logging via syslog, the `debug' priority is used. See also *note Session Transcript::, for a description of the similar mode in `dico', the client program. `--no-transcript' Disable transcript mode. This is the default. Use this option if you wish to temporarily disable transcript mode, enabled in the configuration file (*note transcript: Logging and Debugging.). `-i' `--inetd' Run in inetd mode. *Note Inetd Mode::. `-x' `--debug=LEVEL' Set debug verbosity level. The LEVEL argument is an integer ranging from `0' (no debugging) to `100' (maximum debugging information). `--source-info' Include source line information in the debugging output. `--trace-grammar' Trace parsing of the config file. The option is provided for debugging purposes. `--trace-lex' Trace the configuration file lexer. The option is provided for debugging purposes. `--config-help' Show a summary of the configuration file syntax and allowed statements. *Note Configuration::. `-t' `--lint' Check configuration file syntax and exit with code `0' if it is OK, or with `78' if there are errors. *Note Configuration::. `-h' `--help' Display a short command line option summary and exit. `--usage' List all available command line options and exit. `--version' Print program version and exit.  File: dico.info, Node: Modules, Next: Interface, Prev: Dicod, Up: Top 5 Modules ********* GNU Dico comes with a set of loadable modules for handling various database formats and extending the server functionality. Modules are binary loadable files, installed in `$PREFIX/lib/dico'. They are configurable on per-module (*note command: Handlers.) and per-database (*note handler: Databases.) basis. In this chapter we will describe the modules included in the distribution of GNU Dico version 2.2. * Menu: * outline:: * dictorg:: * gcide:: * wordnet:: * guile:: * python:: * stratall:: * substr:: * word:: * nprefix:: * pcre:: * ldap:: * pam::  File: dico.info, Node: outline, Next: dictorg, Up: Modules 5.1 `Outline' ============= The `outline' module supports databases written in "Emacs outline mode". It is not designed for storing large amounts of data, its purpose rather is to handle small databases that can be composed easily and quickly using the Emacs editor. The outline mode is described in *note Outline Mode: (emacs)Outline Mode. In short, it is a usual plain text file, containing "header lines" and "body lines". Header lines start with one or more stars, the number of starts indicating the nesting level of the heading in the document structure: one star for chapters, two stars for sections, etc. Body lines are anything that is not header lines. The outline dictionary must have at least a chapter named `Dictionary', which contains the dictionary corpus. Within it, each section is treated as a dictionary article, its header line giving the headword, and its body lines supplying the article itself. Apart from this, two more chapters have special meaning. The `Description' chapter gives a short description to be displayed on `SHOW DB' command, and the `Info' chapter supplies a full database description for `SHOW INFO' output. Both chapters are optional. All three reserved chapter names are case-insensitive. To summarize, the structure of an outline database is: * Description LINE * Info TEXT * Dictionary ** LINE TEXT [any number of entries follows] As an example of outline format, the GNU Dico package includes Ambrose Bierce's `Devil's Dictionary' in this format, see `examples/devdict.out'. The initialization of the `outline' module does not require any command line parameters. To declare a database, supply its full file name to the database `handler' directive, as shown in the example below: load-module outline; database { name "devdict"; handler "outline /var/db/devdict.out"; }  File: dico.info, Node: dictorg, Next: gcide, Prev: outline, Up: Modules 5.2 `Dictorg' ============= The `dictorg' module supports dictionaries in the format designed by `DICT development group' (`http://dict.org'). Lots of free dictionaries in this format are available from the `FreeDict' project (http://freedict.org). A dictionary in this format consists of two files: a "dictionary database file", named `NAME.dict' or `NAME.dict.dz' (a compressed form), and an "index file", which lists article headwords with the corresponding offsets in the database. The index file is named `NAME.index'. The common part of these two file names, NAME, is called the "base name" for that dictionary. An instance of the `dictorg' module is created using the following statement: load-module INST-NAME { command "dictorg [OPTIONS]"; } where square brackets denote optional part. Valid OPTIONS are the following: `dbdir=DIR' Look for databases in directory DIR. `show-dictorg-entries' "Dictorg entries" are special database entries that keep some service information, such as database description, etc. Such entries are marked with headwords that begin with `00-database-'. By default they are exempt from database look-ups and cannot be retrieved using `MATCH' or `DEFINE' command. Using `show-dictorg-entries' removes this limitation. `sort' Sort the database index after loading. This option is designed for use with some databases that have malformed indexes. At the time of this writing the `eng-swa' database from `FreeDict' requires this option. Using `sort' may considerably slow down initial database loading. `trim-ws' Remove trailing whitespace from dictionary headwords at start up. This might be necessary for some databases. The values set via these options become defaults for all databases using this module instance, unless overridden in their declarations. A database that uses this module must be declared as follows: database { handler "INST-NAME database=FILE [OPTIONS]"; ... } where INST-NAME is the instance name used in the `load-module' declaration above. The `database' argument specifies the base name of the database. Unless FILE begins with a slash, the value of `dbdir' initialization option is prepended to it. If `dbdir' is not given and FILE does not begin with a slash, an error is signalled. The OPTIONS above are the same options as described in initialization procedure: `show-dictorg-entries', `sort', and `trim-ws'. If used, they override initialization settings for that particular database. Forms prefixed with `no' can be used to disable the corresponding option for this database. For example, `notrim-ws' cancels the effect of `trim-ws' used when initializing the module instance.  File: dico.info, Node: gcide, Next: wordnet, Prev: dictorg, Up: Modules 5.3 `Gcide' =========== The `gcide' module provides support for GNU Collaborative International Dictionary of English. This dictionary can be downloaded from `ftp://ftp.gnu.org/gnu/gcide'. It consists of a set of files named from `CIDE.A' through `CIDE.Z', written using a special markup. See `http://gcide.gnu.org.ua', for a detailed information about the dictionary. The `gcide' module is started via the following statement: load-module gcide; The database is initialized as follows: database { handler "gcide dbdir=DIRECTORY [OPTIONS]"; ... } The `dbdir' parameter supplies the name of the directory where database files are located. Upon startup, the module scans the dictionary files and creates an index file, named `GCIDE.IDX', if it does not already exist. The file is created using an ancillary program `idxgcide', described below. Unless specified otherwise, this file is created in the same directory where the database files are located, therefore the directory must be writable for the user `dicod' is started as. Other options are: -- gcide parameter: idxdir directory Specifies the directory where the `CIDE.IDX' index file resides or should reside. -- gcide parameter: index-cache-size size Sets the maximum number of index pages the module keeps in memory simultaneously. The default value is 16. The pages are cached using the "last recently used" algorithm. Raising this value will make dictionary accesses faster at the expense of using more memory. -- gcide parameter: index-program progname Specifies the full name of the index program. Usually this option is not needed, because the module is configured to start the `idxgcide' utility from its default location. It is mostly useful for the module developers. -- gcide parameter: suppress-pr This parameter suppresses the output of `pr' (pronunciation) tags. According to GCIDE docs, `very few of the pronunciation fields have been filled in', so it might be reasonable to avoid displaying them at all. Starting from version 0.51, GCIDE contains the file `INFO', which provides basic information about the dictionary. The `gcide' module returns contents of this file at the `SHOW INFO' request. The first line of this file (with the trailing newline and final point removed) is returned as the short database description. Here's a full example of a `gcide' as used in : load-module gcide; database { name "gcide"; handler "gcide dbdir=/var/dictdb/gcide-0.51 suppress-pr"; languages-from "en"; languages-to "en"; } * Menu: * idxgcide::  File: dico.info, Node: idxgcide, Up: gcide 5.3.1 `idxgcide' ---------------- The `idxgcide' utility is used by the `gcide' module to index the GCIDE dictionary. You can start it manually to reindex the database. It can be needed, for example, if you install a modified version of the dictionary. The program is installed in "libexecdir". The usage is: idxgcide [OPTIONS] DBDIR [IDXDIR] The only mandatory argument DBDIR specifies the name of the directory where the GCIDE dictionary is installed. The optional IDXDIR argument specifies the directory for the index file, if it differs from DBDIR. Available OPTIONS are: `--debug' `-d' Debug lexical analyzer. `--dry-run' `-n' Do nothing, but print everything. This implies `--verbose'. `--verbose' `-v' Increase output verbosity. This option can be specified multiple times, each occurrence increasing the verbosity level by one. By default the utility outputs only errors and warnings. At level one, it prints additionally the names of source files that are being indexed at the moment. At level two (the maximum level implemented at the moment) it outputs each headword being indexed along with its location. This is useful only for debugging. `--page-size=NUMBER' `-p NUMBER' Defines the size of index file page. The NUMBER specifies the size in bytes. The following case-insensitive suffixes can be used: `k' (`kb'), `m' (`mb') or `g' (`gb'), specifying kilobytes, megabytes and gigabytes (ouch!) correspondingly. The default page size is 10240 bytes.  File: dico.info, Node: wordnet, Next: guile, Prev: gcide, Up: Modules 5.4 `Wordnet' ============= "WordNet" is a lexical database for the English language, created and maintained at the Cognitive Science Laboratory of Princeton University(1). It groups English words into sets of synonyms called "synsets", provides short, general definitions, and records the various semantic relations between these synonym sets. Dico provides a `wordnet' module for reading WordNet lexical database files. The module relies on `libWN', the support library distributed with the WordNet database. The module is compiled automatically if the configure script was able to find the library and its header file `wn.h'. If it was not, use the `--with-wordnet' configure option to specify the location where these files can be found. For example, if WordNet was installed using the default procedure, then the following option will do the job: ./configure --with-wordnet=/usr/local/WordNet-3.0 This command tells Dico to look for WordNet library files in `/usr/local/WordNet-3.0/lib' and for include files in `/usr/local/WordNet-3.0/include'. A compiled module is installed using the following statement: load-module wordnet { command "wordnet [PARAMETERS]"; } Optional parameters are: -- wordnet module parameter: wnhome dir Base directory for WordNet files. -- wordnet module parameter: wnsearchdir dir Directory in which the WordNet database has been installed. Normally, these values are set at compile time and you won't need to override them. The use of these parameters may, however, be necessary if the database is moved or installed in a non-standard location. One or more WordNet database instances can be defined. They all will be sharing the same database. The reason for having several database instances is that they may have different output options. For example, you may configure one database to return word definitions and another one to act as a thesaurus. Dico version 2.2 defines the following database parameters: -- wordnet database parameter: pos value Select part of speech to be displayed by this database. By default, all parts of speech are displayed. Valid values are: all Display all parts of speech. This is the default. noun Display only nouns. verb Display only verbs. adj adjective Display only adjectives. adv adverb Display only adverbs. satellite adjsat Display only "satellites". -- wordnet database parameter: merge-defs When specified, this parameter instructs the WordNet database to merge all definitions with the same part of speech into a single definition, which will be returned in the usual dictionary fashion, e.g.: sail n. 1. a large piece of fabric (usually canvas fabric) by means of which wind is used to propel a sailing vessel Synonyms: {canvas}, {canvass}, {sheet} 2. an ocean trip taken for pleasure Synonyms: {cruise} 3. any structure that resembles a sail v. 1. traverse or travel on (a body of water); "We sailed the Atlantic"; "He sailed the Pacific all alone" 2. move with sweeping, effortless, gliding motions By default, each definition is returned as a separate entry. As an example, the following is the database definition the author uses on his server: database { name "WordNet"; handler "wordnet merge-defs"; languages-from "en"; languages-to "en"; description "WordNet dictionary, version 3.0"; } ---------- Footnotes ---------- (1) See `http://wordnet.princeton.edu/wordnet/', for a detailed information, including links to download.  File: dico.info, Node: guile, Next: python, Prev: wordnet, Up: Modules 5.5 `Guile' =========== "Guile" is an acronym for "GNU's Ubiquitous Intelligent Language for Extensions". It provides a Scheme interpreter conforming to the R5RS language specification and a number of convenience functions. For information about the language, refer to *note Top: (r5rs)Top. For a detailed description of Guile and its features, see *note Overview: (guile)Top. The `guile' module provides an interface to Guile that allows for writing GNU Dico modules in Scheme. The module is loaded using the following configuration file statement: load-module MOD-NAME { command "guile [OPTIONS]" " init-script=`SCRIPT'" " init-args=ARGS" " init-fun=FUNCTION"; } The `init-script' parameter specifies the name of a Scheme source file to be loaded in order to initialize the module. The `init-args' parameter supplies additional arguments to the module. They will be accessible to the `SCRIPT' via `command-line' function. This parameter is optional. The `init-fun' parameter specifies the name of a function that will be invoked to perform initialization of the module and of particular databases. *Note Guile Initialization::, for a description of initialization sequence. Optional arguments, OPTIONS, are: `debug' Enable Guile debugging and stack traces. `nodebug' Disable Guile debugging and stack traces (default). `load-path=PATH' Append directories from PATH to the list of directories which should be searched for Scheme modules and libraries. The PATH must be a list of directory names, separated by colons. This option modifies the value of Guile's `%load-path' variable. *Note %load-path: (guile)Build Config. Guile databases are declared using the following syntax: database { name "DBNAME"; handler "MOD-NAME [OPTIONS] CMDLINE"; } where: DBNAME gives the name for this database, MOD-NAME the name given to Guile module in `load-module' statement (see above), OPTIONS options that override global settings given in the `load-module' statement. The following options are understood: `init-script', `init-args', and `init-fun'. Their meaning is the same as for `load-module' statement (see above), except that they affect only this particular database. CMDLINE the command line that will be passed to the Guile `open-db' callback function (*note open-db::). * Menu: * Virtual Functions:: * Guile Initialization:: * Guile API:: * Dico Scheme Primitives:: * Example Module::  File: dico.info, Node: Virtual Functions, Next: Guile Initialization, Up: guile 5.5.1 Virtual Functions ----------------------- A database handled by the `guile' module is assigned a VIRTUAL FUNCTION TABLE. This table is an association list which keeps Scheme "call-back functions" implemented to perform particular tasks on that database. In this list, the `car' of each element contains the name of a function, and its `cdr' gives the corresponding function. The defined function names and their semantics are: open Open the database. close Close the database. descr Return a short description of the database. info Return a full information about the database. define Define a word. match Look up a word in the database. output Output a search result. result-count Return number of entries in the result. For example, the following is a valid virtual function table: (list (cons "open" open-module) (cons "close" close-module) (cons "descr" descr) (cons "info" info) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count)) Apart from a per-database virtual table, there is also a global virtual function table, which supplies entries missing in the former. Both tables are created during the module initialization, as described in the next subsection. The purposes of particular virtuals functions are described in *note Guile API::.  File: dico.info, Node: Guile Initialization, Next: Guile API, Prev: Virtual Functions, Up: guile 5.5.2 Guile Initialization -------------------------- The following configuration statement causes loading and initialization of the `guile' module: load-module MOD-NAME { command "guile init-script=SCRIPT" " init-fun=FUNCTION"; } Upon module initialization stage, the module attempts to load the file named `SCRIPT'. The file is loaded using `primitive-load' call (*note primitive-load: (guile)Loading.), i.e. the load paths are not searched, so SCRIPT must be an absolute path name. The `init-fun' parameter supplies the name of the "initialization function". This Scheme function constructs virtual function tables for the module itself and for each database that uses this module. It must be declared as follows: (define (FUNCTION arg) ...) This function is called several times. First of all, it is called after the SCRIPT is loaded. This time it is given `#f' as its argument, and its return value is saved as a global function table. Then, it is called for each `database' statement that has MOD-NAME (used in `load-module' above) in its `handler' keyword, e.g.: database { name DB-NAME; handler "MOD-NAME ..."; } This time, it is given DB-NAME as its argument and the value it returns is stored as the virtual function table for this particular database. The following example function returns a complete virtual function table: (define-public (my-dico-init arg) (list (cons "open" open-module) (cons "close" close-module) (cons "descr" descr) (cons "info" info) (cons "lang" lang) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count)))  File: dico.info, Node: Guile API, Next: Dico Scheme Primitives, Prev: Guile Initialization, Up: guile 5.5.3 Guile API --------------- This subsection describes callback functions that a Guile database module must provide. Each description begins with the function prototype and its entry in the virtual function table. Callback functions can be subdivided into two groups: database functions and search functions. Database callback functions are responsible for opening and closing databases and for returning information about them. -- Guile Callback: open-db name . args Virtual table: `(cons "open" open-db)' Open the database. The argument NAME contains database name as given in the `name' statement of the corresponding `database' block (*note Databases::). Optional argument ARGS is a list of command line parameters obtained from CMDLINE in `handler' statement (*note guile-cmdline::). For example, if the configuration file contained: database { name "foo"; handler "guile db=file 1 no"; } then the `open-db' callback will be called as: (open-db "foo" '("db=file" "1" "no")) The `open-db' callback returns a "database handle", i.e. an opaque object that will subsequently be used to identify this database. This value, hereinafter named DBH, will be passed to another callback functions that need to access the database. The return value `#f' or `'()' indicates an error. -- Guile Callback: close-db dbh Virtual Table: `(cons "close" close-db)' Close the database. This function is called during the cleanup procedure, before termination of `dicod'. The argument `dbh' is a database handle returned by `open-db'. The return value from `close-db' is ignored. To communicate errors to the daemon, throw an exception. -- Guile Callback: descr dbh Virtual Table: `(cons "descr" descr)' Return a short textual description of the database, for use in `SHOW DB' output. If there is no description, returns `#f' or `'()'. The argument DBH is a database handle returned by `open-db'. This callback is optional. If it is not defined, or if it returns `#f' (`'()'), the text from `description' statement is used (*note description: Databases.). Otherwise, if no `description' statement is present, an empty string will be returned. -- Guile Callback: info dbh Virtual Table: `(cons "info" info)' Return a verbose, eventually multi-line, textual description of the database, for use in `SHOW INFO' output. If there is no description, returns `#f' or `'()'. The argument DBH is a database handle returned by `open-db'. This callback is optional. If it is not defined, or if it returns `#f' (`'()'), the text from `info' statement is used (*note info: Databases.). If there is no `info' statement, the string `No information available' is used. -- Guile Callback: lang dbh Virtual Table: `(cons "lang" lang)' Return a `cons' of languages supported by this database: Its `car' is a list of source languages, and its `cdr' is a list of destination languages. For example, the following return value indicates that the database contains translations from English to French and Spanish: (cons (list "en") (list "fr" "es")) A database is searched in a two-phase process. First, an appropriate callback is called to do the search: `define-word' is called for `DEFINE' searches and `match-word' is called for matches. This callback returns an opaque entity, called "result handle", which is then passed to the `output' callback, which is responsible for outputting it. -- Guile Callback: define-word dbh word Virtual Table: `(cons "define" define-word)' Find definitions of word WORD in the database DBH. Return a result handle. If nothing is found, return `#f' or `'()'. The argument DBH is the database handle returned by `open-db'. -- Guile Callback: match-word dbh strat key Virtual Table: `(cons "match" match-word)' Find in the database DBH all headwords that match KEY, using strategy STRAT. Return a result handle. If nothing is found, return `#f' or `'()'. The KEY is a "Dico Key" object, which contains information about the word being looked for. To obtain the actual word, use the `dico-key->word' function (*note dico-key->word::). The argument DBH is a database handle returned by `open-db'. The matching strategy STRAT is a special Scheme object that can be accessed using a set of functions described below (*note Dico Scheme Primitives::). -- Guile Callback: result-count resh Virtual Table: `(cons "result-count" result-count)' Return the number of elements in the result set RESH. -- Guile Callback: output resh n Virtual Table: `(cons "output" output)' Output Nth result from the result set RESH. The argument RESH is a result handle returned by `define-word' or `match-word' callback. The data must be output to the current output port, e.g. using `display' or `format' primitives. If RESH represents a match result, the output must not be quoted or terminated by newlines. It is guaranteed that the `output' callback will be called as many times as there are elements in RESH (as determined by the `result-count' callback) and that for each subsequent call the value of N equals its value from the previous call incremented by one. At the first call N equals 0.  File: dico.info, Node: Dico Scheme Primitives, Next: Example Module, Prev: Guile API, Up: guile 5.5.4 Dico Scheme Primitives ---------------------------- GNU Dico provides the following Scheme primitives for accessing various fields of the `strat' and `key' arguments to `match' callback: -- Function: dico-key? OBJ Return `#t' if OBJ is a Dico key object. -- Function: dico-key->word KEY Extract the lookup word from the key object KEY. -- Function: dico-make-key STRAT WORD Create new key object from strategy STRAT and word WORD. -- Function: dico-strat-selector? STRAT Return true if STRAT has a selector (*note Selector::). -- Function: dico-strat-select? STRAT WORD KEY Return true if KEY matches WORD as per strategy selector STRAT. The KEY is a `Dico Key' object. -- Function: dico-strat-name STRAT Return the name of strategy STRAT. -- Function: dico-strat-description STRAT Return a textual description of the strategy STRAT. -- Function: dico-strat-default? STRAT Return `true' if STRAT is a default strategy. *Note default strategy: MATCH. -- Function: dico-register-strat STRAT DESCR [FUN] Register a new strategy. If FUN is given it will be used as a callback for that strategy. Notice, that you can use strategies implemented in Guile in your C code as well (*note strategy: MATCH.). The selector function must be declared as follows: (define (FUN key word) ...) It must return `#t' if KEY matches WORD, and `#f' otherwise.  File: dico.info, Node: Example Module, Prev: Dico Scheme Primitives, Up: guile 5.5.5 Example Module -------------------- In this subsection we will show how to build a simple `dicod' module written in Scheme. The source code of this module, called `listdict.scm' and a short database for it, `numerals-pl.db', are shipped with the distribution in the directory `examples'. The database is stored in a disk file in form of a list. The first two elements of this list contain database description and full information strings. Rest of elements are conses, whose `car' contains the headword, and `cdr' contains the corresponding dictionary article. Following is an example of such a database: ("Short English-Norwegian numerals dictionary" "Short English-Norwegian dictionary of numerals (1 - 7)" ("one" . "en") ("two" . "to") ("three" . "tre") ("four" . "fire") ("five" . "fem") ("six" . "seks") ("seven" . "sju")) We wish to declare such databases in `dicod.conf' the following way: database { name "numerals"; handler "guile example.db"; } Thus, the `rest' argument to `open-db' callback will be `("guile" "example.db")' (*note open-db::). Given this, we may write the callback as follows: (define (open-db name . rest) (let ((db (with-input-from-file (cadr rest) (lambda () (read))))) (cond ((list? db) (cons name db)) (else (format (current-error-port) "open-module: ~A: invalid format\n" (car args)) #f)))) The list returned by this callback will then be passed as a database handle to another callback functions. To facilitate access to particular elements of this list, it is convenient to define the following syntax: (define-syntax db:get (syntax-rules (info descr name corpus) ((db:get dbh name) ;; Return the name of the database. (list-ref dbh 0)) ((db:get dbh descr) ;; Return the desctiption. (list-ref dbh 1)) ((db:get dbh info) ;; Return the info string. (list-ref dbh 2)) ((db:get dbh corpus) ;; Return the word list. (list-tail dbh 3)))) Now, we can write `descr' and `info' callbacks: (define (descr dbh) (db:get dbh descr)) (define (info dbh) (db:get dbh info)) The two callbacks `define-word' and `match-word' provide the core module functionality. Their results will be passed to `output' and `result-count' callbacks as a "result handler" argument. In the spirit of Scheme, we make the result a list. Its `car' is a boolean value: `#t', if the result comes from `define-word' callback, and `#f' if it comes from `match-word'. The `cdr' of this list contains a list of matches. For `define-word', it is a list of conses copied from the database word list, whereas for `match-word', it is a list of headwords. The `define-word' callback returns all list entries whose `car's contain the look up word. It uses `mapcan' function, which is supposed to be defined elsewhere: (define (define-word dbh word) (let ((res (mapcan (lambda (elt) (and (string-ci=? word (car elt)) elt)) (db:get dbh corpus)))) (and res (cons #t res)))) The `match-word' callback (*note match-word::) takes three arguments: a database handler DBH, a strategy descriptor STRAT, and a word WORD to look for. The result handle it returns contains a list of headwords from the database that match WORD in the sense of STRAT. Thus, the behavior of `match-word' depends on the STRAT. To implement this, let's define a list of directly supported strategies (see below for definitions of particular `match-' functions): (define strategy-list (list (cons "exact" match-exact) (cons "prefix" match-prefix) (cons "suffix" match-suffix))) The `match-word' callback will then select an entry from that list and call its `cdr', e.g.: (define (match-word dbh strat key) (let ((sp (assoc (dico-strat-name strat) strategy-list))) (let ((res (cond (sp ((cdr sp) dbh strat (dico-key->word key))) If the requested strategy is not in that list, the function will use the selector function if it is available, and the default matching function otherwise: ((dico-strat-selector? strat) (match-selector dbh strat key)) (else (match-default dbh strat (dico-key->word key)))))) Notice the use of `dico-key->word' function to extract the actual lookup word from the key object. To summarize, the `match-word' callback is: (define (match-word dbh strat key) (let ((sp (assoc (dico-strat-name strat) strategy-list))) (let ((res (cond (sp ((cdr sp) dbh strat (dico-key->word key))) ((dico-strat-selector? strat) (match-selector dbh strat key)) (else (match-default dbh strat (dico-key->word key)))))) (if res (cons #f res) #f)))) Now, let's create the `match-' functions it uses. The `exact' strategy is easy to implement: (define (match-exact dbh strat word) (mapcan (lambda (elt) (and (string-ci=? word (car elt)) (car elt))) (db:get dbh corpus))) The `prefix' and `suffix' strategies are implemented using SRFI-13 (*note SRFI-13: (guile)SRFI-13.) functions `string-prefix-ci?' and `string-suffix-ci?', e.g.: (define (match-prefix dbh strat word) (mapcan (lambda (elt) (and (string-prefix-ci? word (car elt)) (car elt))) (db:get dbh corpus))) Notice that whereas the `prefix' strategy is defined by the server itself, the `suffix' strategy is an extension, and should therefore be registered: (dico-register-strat "suffix" "Match word suffixes") The `match-selector' function is pretty similar to its siblings, except that it uses `dico-strat-select?' (*note dico-strat-select?: Dico Scheme Primitives.) to select the matching elements. This also leads to this function expecting a "key" as its third argument, in contrast to the previous matchers, which expect the actual lookup word there: (define (match-selector dbh strat key) (mapcan (lambda (elt) (and (dico-strat-select? strat (car elt) key) (car elt))) (db:get dbh corpus))) Finally, the `match-default' is a variable that refers to the default matching strategy for this module, e.g.: (define match-default match-prefix) The two callbacks left to define are `result-count' and `output'. The first of them simply returns the number of elements in `cdr' of the result: (define (result-count rh) (length (cdr rh))) The behavior of `output' depends on whether the result is produced by `define-word' or by `match-word'. (define (output rh n) (if (car rh) ;; Result comes from DEFINE command. (let ((res (list-ref (cdr rh) n))) (display (car res)) (newline) (display (cdr res))) ;; Result comes from MATCH command. (display (list-ref (cdr rh) n)))) Finally, at the end of the module the callbacks are made known to `dicod' by the module initialization function: (define-public (example-init arg) (list (cons "open" open-module) (cons "descr" descr) (cons "info" info) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count))) Notice, that in this implementation `close-db' callback was not needed.  File: dico.info, Node: python, Next: stratall, Prev: guile, Up: Modules 5.6 `Python' ============ The `python' module provides an interface which allows programmers to write loadable modules in Python. The syntax for loading the module is: load-module NAME { command "python" " init-script=NAME" " load-path=PATH" " root-class=NAME"; } All parameters are optional: -- python module: load-path=PATH Augments the default search path for Python modules. The format of PATH is the usual UNIX path specification: a colon-separated list of directory names. -- python module: init-script=NAME Specifies the name of the initial Python source file. This file will be loaded and interpreted immediately after loading the module. -- python module: root-class=NAME Sets the name of the Python root class, which is responsible for the dictionary operations. A particular instance of the `python' module is loaded using the `handler' statement within a `database' block. This statement takes the same parameters as described above, plus any number of command line arguments, which will be passed to the root class constructor. * Menu: * Dictionary Class:: * Dico Python Primitives:: * Python Example:: An Example of Python Module  File: dico.info, Node: Dictionary Class, Next: Dico Python Primitives, Up: python 5.6.1 Python Dictionary Class ----------------------------- The dictionary class must define the following methods: -- Method on DictionaryClass: __init__ self *argv Class constructor. The ARGV array supplies positional arguments from the `handler' statement in the configuration file. -- Method on DictionaryClass: open self dbname Opens the database named DBNAME. Returns `True' on success and `False' on failure. -- Method on DictionaryClass: close self Closes the database. -- Method on DictionaryClass: descr self Returns a short description of the database. -- Method on DictionaryClass: info self Returns a text describing the database. -- Method on DictionaryClass: lang self Optional. Returns supported languages as `(SRC, DST)'. -- Method on DictionaryClass: define_word self word Defines WORD. Returns a result (an opaque Python object) if the definition was found or `False' otherwise. -- Method on DictionaryClass: match_word self strat word Searches for WORD in the database using strategy STRAT. Returns a result (an opaque Python object) if some matches were found or `False' otherwise. -- Method on DictionaryClass: output self result n Outputs Nth result from the result set RESULT. -- Method on DictionaryClass: result_count self result Returns number of elements in the result set. -- Method on DictionaryClass: compare_count self result Optional. Returns the number of comparisons performed when constructing the result set. -- Method on DictionaryClass: result_headers self result hdr Optional. Returns a dictionary of MIME headers. -- Method on DictionaryClass: free_result self result Reclaims any resources used by the result set.  File: dico.info, Node: Dico Python Primitives, Next: Python Example, Prev: Dictionary Class, Up: python 5.6.2 Dico Python Primitives ---------------------------- -- Python primitive: register_strat name descr [proc] Registers new match strategy. The arguments are: NAME Strategy name for use in the `MATCH' command. DESCR The dscription, which will appear in the output of `SHOW STRAT' command. PROC Optional selector procedure. If the PROC argument is present, it must be the name of a Python function declared as: def select(opcode key headword): Its arguments are: OPCODE Integer operation code. KEY An `DicoSelectionKey' object identifying the search term (*note DicoSelectionKey::). HEADWORD The headword being examined. At the beginning of the search, the function is called with the `DICO_SELECT_BEGIN' as its OPCODE argument. It must perform the necessary initialization and return. At the end of the search loop, the function is called with OPCODE `DICO_SELECT_END'. It must perform the necessary deinitialization procedures and exit. In both cases, the KEY and HEADWORD arguments are not defined. Within the search loop, the function will be called for each headword from the database. The OPCODE parameter will be `DICO_SELECT_RUN'. In this case the function must return `True' if the HEADWORD matches the KEY and `False' otherwise. -- Python primitive: register_markup name Registers a markup NAME. -- Python primitive: current_markup Returns the name of the current markup. * Menu: * DicoSelectionKey:: * DicoStrategy::  File: dico.info, Node: DicoSelectionKey, Next: DicoStrategy, Up: Dico Python Primitives 5.6.2.1 The `DicoSelectionKey' class .................................... The `DicoSelectionKey' class represents a search key and is used when looking for matches. Calling `str' on the object of that class returns the search term itself, as does the `word' method: -- Method on DicoSelectionKey: word Returns the search term. It is equivalent to the `__str__' attribute.  File: dico.info, Node: DicoStrategy, Prev: DicoSelectionKey, Up: Dico Python Primitives 5.6.2.2 The `DicoStrategy' class ................................ A match strategy is represented by an object of the `DicoStrategy' class. -- Variable of DicoStrategy: name The name of that strategy. -- Variable of DicoStrategy: descr Textual description of the strategy. -- Variable of DicoStrategy: has_selector `True' if this strategy has a selector (*note Python Selector::). -- Variable of DicoStrategy: name is_default `True' if this is the default strategy. -- Method on DicoStrategy: select headword key Returns `True' if KEY matches HEADWORD as per this strategy.  File: dico.info, Node: Python Example, Prev: Dico Python Primitives, Up: python 5.6.3 Python Example -------------------- In this subsection we will show a simple database module written in Python. This module handles simple textual databases in the following format: * Empty lines and lines beginning with double dash are ignored. * A line beginning with `descr:' introduces a short dictionary description for `SHOW DB'. The `descr:' prefix and the white space immediately following it are removed. E.g.: descr: Short English-Norwegian numerals dictionary * Lines beginning with `info:' provide a verbose description of the database. These lines are concatenated after removing the `info:' prefix and white space immediately following it. E.g.: info: A short English-Norwegian (Bokma*l) dictionary info: of numerals. info: info: This dictionary is public domain. * A line beginning with `lang:' defines source and destination languages for this dictionary. E.g.: lang: en : nb * Any line consisting of exactly two words defines a dictionary entry. E.g.: one en two to three tre four fire Now, let's create a module for handling this format. First, we need to import Dico primitives (*note Dico Python Primitives::) and the `sys' module. The latter is needed for output functions: import dico import sys Then, a result class will be needed for `match_word' and `define_word' methods. It will contain the actual data in the variable `result': class DicoResult: # actual data. result = {} # number of comparisons. compcount = 0 def __init__ (self, *argv): self.result = argv[0] if len (argv) == 2: self.compcount = argv[1] def count (self): return len (self.result) def output (self, n): pass def append (self, elt): self.result.append (elt) The following two classes extend `DicoResult' for use with `DEFINE' and `MATCH' operations. The `define_word' method will return an instance of the `DicoDefineResult' class: class DicoDefineResult (DicoResult): def output (self, n): print "%d. %s" % (n + 1, self.result[n]) print "---------", The `match_word' method will return an instance of the `MatchResult' class: class DicoMatchResult (DicoResult): def output (self, n): sys.stdout.softspace = 0 print self.result[n], Now, let's define the dictionary class: class DicoModule: # The dictionary converted to associative array. adict = {} # The database name. dbname = '' # The name of the corresponding disk file. filename = '' # A sort information about the database. mod_descr = '' # A verbose description of the database is kept. # as an array of strings. mod_info = [] # A list of source and destination languages: langlist = () The class constructor takes a single argument, defining the name of the database file: def __init__ (self, *argv): self.filename = argv[0] pass The `open' method opens the database and reads its data: def open (self, dbname): self.dbname = dbname file = open (self.filename, "r") for line in file: if line.startswith ('--'): continue if line.startswith ('descr: '): self.mod_descr = line[7:].strip (' \n') continue if line.startswith ('info: '): self.mod_info.append (line[6:].strip (' \n')) continue if line.startswith ('lang: '): s = line[6:].strip (' \n').split(':', 2) if (len(s) == 1): self.langlist = (s[0].split (), \ s[0].split ()) else: self.langlist = (s[0].split (), \ s[1].split ()) continue f = line.strip (' \n').split (' ', 1) if len (f) == 2: self.adict[f[0].lower()] = f[1].strip (' ') file.close() return True The database is kept entirely in memory, so there is no need for `close' method. However, it must be declared anyway: def close (self): return True The methods returning database information are trivial: def descr (self): return self.mod_descr def info (self): return '\n'.join (self.mod_info) def lang (self): return self.langlist The `define_word' method checks if the search term is present in the dictionary, and, if so, converts it to the `DicoDefineResult': def define_word (self, word): if self.adict.has_key (word): return DicoDefineResult ([self.adict[word]]) return False The `match_word' method supports the `exact' strategy natively via the `has_key' attribute of `adict': def match_word (self, strat, key): if strat.name == "exact": if self.adict.has_key (key.word.lower ()): return DicoMatchResult \ ([self.adict[key.word.lower()]]) Other strategies are supported as long as they have selectors: elif strat.has_selector: res = DicoMatchResult ([], len (self.adict)) for k in self.adict: if strat.select (k, key): res.append (k) if res.count > 0: return res return False The rest of methods rely on the result object to do the right thing: def output (self, rh, n): rh.output (n) return True def result_count (self, rh): return rh.count () def compare_count (self, rh): return rh.compcount  File: dico.info, Node: stratall, Next: substr, Prev: python, Up: Modules 5.7 `Stratall' ============== The `stratall' module provides a new strategy, called `all'. This strategy always returns a full list of headwords from the database, no matter what the actual search word is. To load this strategy, use the following configuration statement: load-module stratall; Using this strategy on a full set of databases (`MATCH * all ""') produces enormous amount of output, which may induce a considerable strain on the server, therefore it is advised to block such usage as suggested in *note Strategies and Default Searches::: strategy all { deny-all yes; }  File: dico.info, Node: substr, Next: word, Prev: stratall, Up: Modules 5.8 `Substr' ============ The `substr' module provides a `substr' search strategy. This strategy matches a substring anywhere in the keyword. For example: C: MATCH eng-deu substr orma S: 152 207 matches found: list follows S: eng-deu "abnormal" S: eng-deu "conformable" S: eng-deu "doorman" S: eng-deu "format" ... The loading procedure expects no arguments: load-module substr;  File: dico.info, Node: word, Next: nprefix, Prev: substr, Up: Modules 5.9 `Word' ========== The `word' module provides the following strategies: word Match separate words within headwords. first Match the first word within headwords. last Match the last word within headwords. The initialization procedure loads all three if given no arguments, as in load-module word; If arguments are given, the initialization procedure loads only those strategies that are listed in its command line. For example, the statement below loads only `first' and `last' strategies: load-module word { command "word first last"; } The following is an example of using one of those strategies in a dico session: C: MATCH devdict word government S: 152 1 matches found: list follows S: devdict "MONARCHICAL GOVERNMENT" S: . S: 250 Command complete  File: dico.info, Node: nprefix, Next: pcre, Prev: word, Up: Modules 5.10 `Nprefix' ============== The `nprefix' module provides a strategy similar to `prefix', but which returns the specified range of bytes. For example, the statement MATCH DICT nprefix SKIP#COUNT#STRING where SKIP and COUNT are positive integer numbers, returns at most COUNT headwords whose prefix matches STRING, omitting first SKIP unique matches. The entire `SKIP#COUNT#' construct is optional. If not supplied, the `nprefix' strategy behaves exactly as `prefix'. The module is loaded using this simple statement: load-module nprefix;  File: dico.info, Node: pcre, Next: ldap, Prev: nprefix, Up: Modules 5.11 `Pcre' =========== The `pcre' module provides a matching strategy using Perl-compatible regular expressions. The module is loaded using a simple statement: load-module pcre; The strategy has the same name as the module and is reflected in the server's HELP output as shown below: pcre "Match using Perl-compatible regular expressions" The headword argument to the `pcre' MATCH statement should be a valid Perl regular expression. It can optionally be enclosed in a pair of slashes, in which case one or more of the following flags can appear after the closing slash: `a' The regexp is "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. `e' Ignore whitespace and `#' comments in the expression. `i' Ignore case when matching. `G' Inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by `?'. The same can also be achieved by setting the `(?U)' option within the pattern. Any of these flags can also be used in reverted case, which also reverts its meaning. For example, `I' means case-sensitive matching. Here is an example of using this strategy in a dico session: MATCH ! pcre "/\\stext/i"  File: dico.info, Node: ldap, Next: pam, Prev: pcre, Up: Modules 5.12 `Ldap' =========== The `ldap' module loads the support for LDAP user databases. It is available if Dico has been configured with LDAP. The module needs no additional configuration parameters: load-module ldap; *Note ldap userdb::, for a description of its use.  File: dico.info, Node: pam, Prev: ldap, Up: Modules 5.13 `pam' ========== The `pam' module implements user authentication via PAM. It can be used only with `LOGIN' and `PLAIN' GSASL authentication methods. The module is loaded as follows: load-module pam { command "pam [service=SNAME]"; } where SNAME is the name of PAM service to use. If not supplied, `dicod' service will be used. The user database is normally initialized as: user-db "pam://localhost"; If `password-resource' statement is given, its value will be used as service name, instead of the one specified in the `load-module' statement, e.g.: user-db "pam://localhost" { password-resource "local"; } The `group-resource' statement is not used, because there is no mechanism to return textual data from PAM.  File: dico.info, Node: Interface, Next: dico client, Prev: Modules, Up: Top 6 Dico Module Interface *********************** This chapter describes the API for Dico loadable modules. * Menu: * dico_database_module:: * Strategies:: * Output::  File: dico.info, Node: dico_database_module, Next: Strategies, Up: Interface 6.1 dico_database_module ======================== Each module must export exactly one symbol of type `struct dico_database_module'. This symbol must be declared as DICO_EXPORT(NAME, module) where NAME is the name of the module file (without suffix). For example, a module `word.so' would have in its sourse the following declaration: struct dico_database_module DICO_EXPORT(word, module) = { ... }; The `dico_database_module' has the following members: -- dico_database_module: unsigned dico_version Interface version being used. It is recommended to use the macro `DICO_MODULE_VERSION', which keeps the version number of the current interface. -- dico_database_module: unsigned dico_capabilities Module capabilities. As of version 2.2, this member can be one of the following: `DICO_CAPA_DEFAULT' This module defines a handler for a specific database format. `DICO_CAPA_NODB' This module does not handle any databases. When this capability is specified, `dicod' will call only the `dico_init' member of the structure. This capability is used by modules defining new matching strategies or authentication methods. -- Dico Callback: int dico_init (int ARGC, char **ARGV) This callback is called right after loading the module. It is responsible for module initialization. The arguments are: ARGC Number of elements in ARGV. ARGV The command line given by `command' configuration statement (*note command: Handlers.), split into words. The element `ARGV[0]' is the name of the module. The element `ARGV[ARGC]' is `NULL'. Word splitting follows the rules similar to those used in shell. In particular, a quoted string (using both single and double quotes) is handled as a single word. If `dico_capabilities' is `DICO_CAPA_DEFAULT', this method is optional. If `dico_capabilities' is set to `DICO_CAPA_NODB', `dico_init' is mandatory and must be the only method defined. -- Dico Callback: dico_handle_t dico_init_db (const char *DB, int ARGC, char **ARGV) Initialize the database. This method is called as a part of database initialization routine at startup of `dicod', after processing `dictionary' configuration statement (*note Databases::). Its arguments are: DB The name of the database, as given by the `name' statement. ARGC Number of elements in ARGV. ARGV The command line given by `handler' configuration statement (*note handler: Databases.). The array is `NULL'-terminated. This method returns a "database handle", an opaque structure identifying the database. This handle will be passed as the first argument to other methods. On error, `dico_init_db' shall return `NULL'. Notice, that this function is not required to actually open the database, if the `open' notion is supported by the underlying mechanism. Another method, `dico_open' is responsible for that. -- Dico Callback: int dico_free_db (dico_handle_t DH) Reclaim any resources associated with database handle DH. This method is called as part of exit cleanup routine, before the main `dicod' process terminates. It shall return `0' on success, or any non-`0' value on failure. -- Dico Callback: int dico_open (dico_handle_t DH) Open the database identified by the handle DH. This method is called as part of child process initialization routine. It shall return `0' on success, or any non-`0' value on failure. The `dico_open' method is optional. -- Dico Callback: int dico_close (dico_handle_t DH) Close the database identified by the handle DH. This method is called as part of child process termination routine. It shall return `0' on success, or any non-`0' value on failure. The `dico_close' method is optional, but if `dico_open' is defined, `dico_close' must be defined as well. -- Dico Callback: char * dico_db_info (dico_handle_t DH) Return a database information string for the database identified by DH. This function is called on each `SHOW INFO' command, unless an informational text for this database is supplied in the configuration file (*note info: Databases.). This value must be allocated using malloc(3). The caller is responsible for freeing it when no longer needed. This method is optional. -- Dico Callback: char * dico_db_descr (dico_handle_t DH) Return a short database description string for the database identified by DH. This function is called on each `SHOW DB' command, unless a description for this database is supplied in the configuration file (*note descr: Databases.). This value must be allocated using malloc(3). The caller is responsible for freeing it when no longer needed. This method is optional. -- Dico Callback: dico_result_t dico_match (dico_handle_t DH, const dico_strategy_t STRAT, const char *WORD) Use the strategy STRAT to search in the database DH, and return all headwords matching WORD. This method returns a "result handle", an opaque pointer that can then be used to display the obtained results. It returns `NULL' if no matches were found. -- Dico Callback: dico_result_t dico_define (dico_handle_t DH, const char *WORD) Find definitions of headword WORD in the database identified by DH. This method returns a "result handle", an opaque pointer that can then be used to display the obtained results. It returns `NULL' if no matches were found. -- Dico Callback: int dico_output_result (dico_result_t RP, size_t N, dico_stream_t STR) The `dico_output_result' method outputs to stream STR the Nth result from result set RP. The latter is a result handle, obtained from a previous call to `dico_match' or `dico_define'. Returns `0' on success, or any non-`0' value on failure. It is guaranteed that the `dico_output_result' callback is called as many times as there are elements in RP (as determined by the `dico_result_count' callback, described below) and that for each subsequent call the value of N equals its value from the previous call incremented by one. At the first call N equals 0. -- Dico Callback: size_t dico_result_count (dico_result_t RP) Return the number of distinct elements in the result set identified by RP. The latter is a result handle, obtained from a previous call to `dico_match' or `dico_define'. -- Dico Callback: size_t dico_compare_count (dico_result_t RP) Return the number of comparisons performed when constructing the result set identified by RP. This method is optional. -- Dico Callback: void dico_free_result (dico_result_t RP) Free any resources used by the result set RP, which is a result handle, obtained from a previous call to `dico_match' or `dico_define'. -- Dico Callback: int dico_result_headers (dico_result_t RP, dico_assoc_list_t HDR) Populate associative list HDR with the headers describing result set RP. This callback is optional. If defined, it will be called before outputting the result set RP if `OPTION MIME' is in effect (*note OPTION MIME: OPTION.).  File: dico.info, Node: Strategies, Next: Output, Prev: dico_database_module, Up: Interface 6.2 Strategies ============== A search strategy is described by the following structure: struct dico_strategy { char *name; /* Strategy name */ char *descr; /* Strategy description */ dico_select_t sel; /* Selector function */ void *closure; /* Additional data for SEL */ int is_default; /* True, if this is a default strategy */ dico_list_t stratcl; /* Strategy access control list */ }; The first two members are mandatory and must be defined for each strategy: -- member of struct dico_strategy: `char *' name Short name of the strategy. It is used as second argument to the `MATCH' command (*note MATCH::) and is displayed in the first column of output by the `SHOW STRAT' command (*note SHOW STRAT: SHOW.). -- member of struct dico_strategy: `char *' descr Strategy description. It is the string shown in the second column of `SHOW STRAT' output (*note SHOW STRAT: SHOW.). -- member of struct dico_strategy: dico_select_t sel A "selector function", which is used in iterative matches to select matching headwords. The `sel' function is called for each headword in the database with the headword and search key as its arguments and returns 1 if the headword matches the key and 0 otherwise. The `dico_select_t' type is defined as: typedef int (*dico_select_t) (int, dico_key_t, const char *); *Note Selector::, for a detailed description. -- member of struct dico_strategy: `void *' closure An opaque data pointer intended for use by the selector function. -- member of struct dico_strategy: int is_default This member is set to 1 by the server if this strategy is selected as the default one (*note default strategy::). -- member of struct dico_strategy: dico_list_t stratcl A control list associated with this strategy. *Note Strategies and Default Searches::. * Menu: * Key:: * Selector::  File: dico.info, Node: Key, Next: Selector, Up: Strategies 6.2.1 Search Key Structure -------------------------- The `dico_key_t' is defined as a pointer to the structure `dico_key': struct dico_key { char *word; void *call_data; dico_strategy_t strat; int flags; }; The structure represents a search key for matching algorithms. Its members are: -- member of struct dico_key: `char *' word The search word or expression. -- member of struct dico_key: `void *' call_data A pointer to selector-specific data. If necessary, it can be initialized by the selector when called with the `DICO_SELECT_BEGIN' opcode and deallocated when called with the `DICO_SELECT_END' opcode. -- member of struct dico_key: dico_strategy_t strat A pointer to the strategy structure. -- member of struct dico_key: int flags Key-specific flags. These are used by the server. The following functions are defined to operate on search keys: -- function: int dico_key_init (struct dico_key *KEY, dico_strategy_t STRAT, const char *WORD) Initialize the key structure KEY with the given strategy STRAT and search word WORD. If STRAT has a selector function, it will be called with the `DICO_SELECT_BEGIN' opcode (*note DICO_SELECT_BEGIN: Selector.) to carry out the necessary initializations. The KEY itself may point to any kind of memory storage. -- function: void dico_key_deinit (struct dico_key *KEY) Deinitialize the `dico_key' structure initialized by a prior call to `dico_key_init'. If the key strategy has a selector, it will be called with the `DICO_SELECT_END' opcode. Note that this function makes no assumptions about the storage type of KEY. If it points to a dynamically allocated memory, it is the caller responsibility to free it. -- function: int dico_key_match (struct dico_key *KEY, const char *WORD) Match headword and key. Return 1 if they match, 0 if they don't match and -1 in case of error. This function calls the strategy selector with the `DICO_SELECT_RUN' opcode (*note DICO_SELECT_RUN: Selector.). It is an error if the strategy selector is not defined.  File: dico.info, Node: Selector, Prev: Key, Up: Strategies 6.2.2 Strategy Selectors ------------------------ Wherever possible, modules should implement strategies using effective look up algorithms. For example, `exact' and `prefix' strategies must normally be implemented using binary search in the database index. The `suffix' strategy can also be implemented using binary search if a special "reverse index" is built for the database (this is the approach taken by `outline' and `dictorg' modules). However, some strategies can only be implemented using a relatively expensive iteration over all keys in the database index. For example, `soundex' and `levenshtein' strategies cannot be implemented otherwise. A strategy that can be used in iterative look ups must define a "selector". Strategy selector is a function which is called for each database headword to determine whether it matches the search key. It is defined as follows: -- selector: int select (int OPCODE, dico_key_t KEY, const char *HEADWORD) A strategy selector. Its arguments are: OPCODE The operation code. Its possible values are `DICO_SELECT_BEGIN', `DICO_SELECT_RUN' and `DICO_SELECT_END', as described below. KEY The search key. HEADWORD The database headword. The selector function is called before entering the iteration loop with `DICO_SELECT_BEGIN' as its argument. If necessary, it can perform any additional initialization of the strategy, such as allocation of auxiliary data structures, etc. The `call_data' member of `dico_key_t' structure (*note call_data: dico_key.) should be used to keep the pointer to the auxiliary data. The function should return 0 if it successfully finished its initialization and non-zero otherwise. Once the iteration loop is finished, the selector will be called with `DICO_SELECT_END' as its first argument. This invocation is intended to deallocate any auxiliary memory and release any additional resources allocated at the initialization state. In these two additional invocations, the HEADWORD parameter will be `NULL'. Once the iteration loop is entered, the selector function will be called for each headword. Its OPCODE parameter will be `DICO_SELECT_RUN' and the HEADWORD parameter will point to the headword. The function should return 1 if the headword matches the key, 0 if it does not and a negative value in case of failure. To illustrate the concept of strategy selector, let's consider the implementation of the `soundex' strategy in `dicod'. This strategy computes a four-character soundex code for both search key and the headword and returns 1 (match) if both codes coincide. To speed up the process, the code for the search key is computed only once, at the initialization stage, and stored in a temporary memory assigned to the `key->call_data'. This memory is reclaimed at the terminating call: int soundex_sel(int cmd, dico_key_t key, const char *dict_word) { char dcode[DICO_SOUNDEX_SIZE]; switch (cmd) { case DICO_SELECT_BEGIN: key->call_data = malloc(DICO_SOUNDEX_SIZE); if (!key->call_data) return 1; dico_soundex(key->word, key->call_data); break; case DICO_SELECT_RUN: dico_soundex(dict_word, dcode); return strcmp(dcode, key->call_data) == 0; case DICO_SELECT_END: free(key->call_data); break; } return 0; }  File: dico.info, Node: Output, Prev: Strategies, Up: Interface 6.3 Output ========== The `dico_output_result' method is called when the server needs to output the result of a `define' or `match' command. It must be defined as follows: int output_result (dico_result_t RP, size_t N, dico_stream_t STR); The RP argument points to the result in question. From the server's point of view it is an opaque pointer. The application shall define its own result structure, so normally the first operation the `dico_output_result' method does is typecasting RP to a pointer to that structure in order to be able to access its members. A result can conceptually contain several "parts". For example, the result of a `DEFINE' command can contain several definitions of the term. Similarly, the result of `MATCH' contains one or more matches. The server obtains the exact number of parts in a result by calling the `dico_result_count' method (*note dico_result_count::). When outputting a result, the server calls the `dico_output_result' in a loop, once for each result part. It passes the ordinal (zero-based) number of the part that needs to be output in the N parameter. It is guaranteed that N increases by one for each subsequent call of `dico_output_result' with the same RP parameter. The STR parameter identifies the "output stream". The `dico_output_result' function must format the requested part from the result and output it to that stream. To do so it should use one of the following functions: -- Function: int dico_stream_write (dico_stream_t STR, const void *BUF, size_t COUNT) Writes COUNT bytes from the buffer pointed to by BUF to the output stream STR. Returns 0 on success, and non-zero on error. -- Function: int dico_stream_writeln (dico_stream_t STR, const char *BUF, size_t SIZE) Same as `dico_stream_write', but ends the output with a `newline' character (ASCII 10).  File: dico.info, Node: dico client, Next: gcider, Prev: Interface, Up: Top 7 Dico -- a client program. *************************** The `dico' program is a console-based utility for querying dictionary servers. It has two operation modes. In "single query mode", the utility performs a query, displays its result and exits immediately. This mode is entered if a word or a URL was given in the command line. In "interactive mode", the utility enters a read-and-eval loop, in which it reads requests from the keyboard, performs the necessary searches, and displays obtained results on the screen. * Menu: * Single Query Mode:: * Interactive Mode:: * Initialization File:: * Autologin:: * Dico invocation::  File: dico.info, Node: Single Query Mode, Next: Interactive Mode, Up: dico client 7.1 Single Query Mode ===================== The simplest way to use `dico' utility is to invoke it with a word as an argument, e.g.: $ dico entdeckung In the example above, the utility will search definitions of the word `entdeckung' using its default server name and database. The default server name is read from the initialization file (*note Initialization File::). If it is not present, a predefined value specified at configuration time (*note Default Server::) is used. The default database is `!', which means "search in all available databases until a match is found, and then display all matches in that database". There are two ways to change these defaults. First, you can use command line options. Secondly, you can use a DICT URL. Which method to use depends on your preferences. Both methods provide the same functionality for querying word definitions. However, command line options allow the user to query additional data from the server, which is impossible using URLs. * Menu: * dico options:: * urls::  File: dico.info, Node: dico options, Next: urls, Up: Single Query Mode 7.1.1 Dico Command Line Options ------------------------------- To connect to a particular dictionary server, use the `--host' option, for example: $ dico --host dico.org entdeckung To search in a particular database, use the `--database' (`-d') option. For example, to display definitions from all databases: $ dico --database '*' entdeckung Note single quotes around the asterisk. To get a list of databases offered by the server, use the `--dbs' (`-D') option. In this case you may not give any non-option arguments. For example: $ dico --dbs If you wish to get a list of matches, instead of definitions, use the `--match' (`-m') option. For example, the following invocation will display all matches from all the databases: $ dico --database '*' --match entdeckung The match mode uses `.' strategy by default (*note strategy: MATCH.), which means a server-dependent default strategy, which suits best for interactive spell checking. To select another strategy, use the `--strategy' (`-s') option. If the remote server supports `xlev' experimental capability (*note XLEV: Extended Commands, you may use the `--levdist' (`--levenshtein-distance') option to set maximum Levenshtein distance, for example: $ dico --levdist 2 --match entdeckung Note that setting the distance too high is impractical and may imply unnecessary strain on the server. To get a list of available matching strategies, with descriptions, use the `--strategies' (`-S') option.  File: dico.info, Node: urls, Prev: dico options, Up: Single Query Mode 7.1.2 DICT URL -------------- Another way to specify data for a query is by using URL, instead of a word to search, as in the example below: $ dico dict://gnu.org.ua/d:entdeckung A DICT URL consists of the following parts: dict://USER;PASS@HOST:PORT/d:WORD:DATABASE:N dict://USER;PASS@HOST:PORT/m:WORD:DATABASE:STRAT:N The `/d' syntax requests the definition of WORD, whereas the `/m' syntax queries for matches, and is similar to the `--match' option. Some or all of `USER;PASS@', `:PORT', DATABASE, STRAT, and and N may be omitted. The meaning of all URL parts and their default values (if appropriate) are explained in the table below: USER The user name to use in authentication. Similar to the `--user' option. If USER is omitted and cannot be retrieved by other means, no authentication is attempted. *Note Autologin::, for a detailed description of authentication procedure and sources which are used to obtain authentication credentials. PASS A shared key (password) for that user. This part is similar to the `--key' command line option. For compatibility with other URLs, `dico' tolerates a colon (instead of semicolon) as a delimiter between USER and PASS. If USER is given, but PASS is not, `dico' will ask you to supply a password interactively (*note Autologin::). HOST Host name or IP address of the server to query. Same as the `--host' command line option. PORT Port number or service name (from `/etc/services'). If it is not present, the default of 2628 is used. Same as the `--port' command line option. WORD The word to look for. DATABASE The database to search in. If not given, `!' is assumed. Same as the `--database' command line option. STRAT The matching strategy to use. If omitted, `.' is assumed. Same as the `--strategy' command line option. N Extract and display the Nth definition of the word. If omitted, all definitions are displayed. There is no command line option equivalent for this parameter, because it is used rarely. Trailing colons may be omitted. For example, the following URLs might specify definitions or matches: dict://dict.org/d:shortcake: dict://dict.org/d:shortcake:* dict://dict.org/d:shortcake:wordnet: dict://dict.org/d:shortcake:wordnet:1 dict://dict.org/d:abcdefgh dict://dict.org/d:sun dict://dict.org/d:sun::1 dict://dict.org/m:sun dict://dict.org/m:sun::soundex dict://dict.org/m:sun:wordnet::1 dict://dict.org/m:sun::soundex:1 dict://dict.org/m:sun:::  File: dico.info, Node: Interactive Mode, Next: Initialization File, Prev: Single Query Mode, Up: dico client 7.2 Interactive Mode ==================== If neither word nor URL nor any operation mode option were given on the command line, `dico' enters interactive mode. In this mode it reads commands from the standard input, executes them and displays results on the standard output. If the standard input is connected to a terminal, the readline and history facilities are enabled (*note Command Line Editing: (readline)Command Line Editing.). When in interactive mode, `dico' displays its prompt and waits for you to enter a command. The default prompt is the name of the program, followed by a `greater than' sign and a single space: dico> _ The input syntax is designed so as to save you the maximum amount of typing. If you type any word, the default action is to look up its definition using the default server and database settings, for example: dico> man From eng-swa, English-Swahili xFried/FreeDict Dictionary: man mwanamume To match the word, instead of defining it, prefix it with a slash, much as you do in `vi': dico> /man From eng-swa, English-Swahili xFried/FreeDict Dictionary: 0) ``can'' 1) ``man'' 2) ``many'' 3) ``map'' 4) ``may'' 5) ``men'' Displayed is a list of matches retrieved using the default strategy. To see a definition for a particular match, type the number shown at its left. For example, to define "men": dico> 5 From eng-swa, English-Swahili xFried/FreeDict Dictionary: men wanaume Define and match are two basic actions. To discern from them, the rest of `dico' commands begin with a "command prefix", a single punctuation character selected for this purpose. The default command prefix is a dot, but it can be changed using the `prefix' command (*note prefix: Other Commands.). We will discuss the `dico' commands in the following subsections. * Menu: * Server Commands:: * Database and Strategy:: * Informational Commands:: * History Commands:: * Pager:: * Program Settings:: * Session Transcript:: * Other Commands:: * Command Summary::  File: dico.info, Node: Server Commands, Next: Database and Strategy, Up: Interactive Mode 7.2.1 Server Commands --------------------- The `open' command establishes connection to a remote server. It takes up to two arguments, first of them specifying the IP or host name of the server, and the optional second one specifying the port number to connect to. For example: dico> .open gnu.org.ua If any or both of its arguments are absent, the `open' command reuses the value supplied with its previous invocation, or, if it is issued for the first time, the default values. The default for server name is `gnu.org.ua' and the default port number is 2628. Both values can be changed at configuration time, see *note Default Server:: for a detailed instruction. Note that you are not required to issue this command. If it is not given, `dico' will attempt to establish a connection using its default settings before executing any command that requires a connection to the server. The `close' command closes the connection. It does not take any arguments.  File: dico.info, Node: Database and Strategy, Next: Informational Commands, Prev: Server Commands, Up: Interactive Mode 7.2.2 Database and Strategy --------------------------- The `database' command changes or displays the database name which is used by define and match commands. To display the database name, type the command without arguments: dico> .database ! To change the database, give its name as an argument to the command: dico> .database * Once the connection with the server is established, you may use command line completion facility to select the database from among those offered by the server. Typing `TAB' will show you a list of databases that begin with the characters you typed: dico> .database enTAB en-pl-naut eng-afr eng-deu eng-swa If you supply enough characters to identify a single choice, `TAB' will automatically select it. In the example above, typing a `TAB' after dico> .database en- completes the database name to: dico> .database en-pl-naut The `strategy' command displays or changes the default strategy name. As with `database', the strategy completion is available for this command. dico> .strategy . dico> .strategy dlev If the remote server supports `xlev' experimental capability (*note XLEV: Extended Commands.), you can use the `distance' command to set the maximum Levenshtein distance for strategies that use Levenshtein algorithm. If used without arguments, this command displays the distance reported by the server and the configured distance, e.g.: dico> .distance Reported Levenshtein distance: 1 No distance configured If used with a single numeric argument, it attempts to set the distance to the supplied value.  File: dico.info, Node: Informational Commands, Next: History Commands, Prev: Database and Strategy, Up: Interactive Mode 7.2.3 Informational Commands ---------------------------- The `ls' command lists available strategies (*note SHOW STRAT: SHOW.): dico> .ls exact "Match words exactly" prefix "Match word prefixes" soundex "Match using SOUNDEX algorithm" all "Match everything (experimental)" lev "Match headwords within given Levenshtein distance" dlev "Match headwords within given Damerau-Levenshtein distance" re "POSIX 1003.2 (modern) regular expressions" regexp "Old (basic) regular expressions" suffix "Match word suffixes" rev-qu "Reverse search in Quechua databases" The `ld' command lists available databases (*note SHOW DB: SHOW.): dico> .ld eng-swa "English-Swahili xFried/FreeDict Dictionary" swa-eng "Swahili-English xFried/FreeDict Dictionary" afr-eng "Afrikaans-English FreeDict Dictionary" eng-afr "English-Afrikaans FreeDict Dictionary" The `info' command displays information about a database, whose name is given as its argument. If used without arguments, it displays information about the current database. dico> .info pl-en-naut pl-en-naut - A Polish-English dictionary of nautical terms. Copyright (C) 2008 Sergey Poznyakoff Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover and Back-Cover Texts.  File: dico.info, Node: History Commands, Next: Pager, Prev: Informational Commands, Up: Interactive Mode 7.2.4 History Commands ---------------------- Each issued command is stored in a history list and assigned a unique "event number". When `dico' exits, it saves the command history to a file named `.dico_history' in your home directory. Upon startup, it retrieves the history from this file, so the history is preserved between sessions. You can view the command history using the `history' command: dico> .history 1) .open dict.org 2) entdeckung 3) /geschwindigkeit A number of editing commands is provided, that allow you to refer to previous events from the history list and to edit them. For example, to re-issue the 3rd event from the above list, type `!3'. The command with this index will be inserted at the `dico' prompt and you will be given a possibility to edit it. For a detailed description of all history-editing commands, please refer to *note Using History Interactively: (history)Using History Interactively.  File: dico.info, Node: Pager, Next: Program Settings, Prev: History Commands, Up: Interactive Mode 7.2.5 Pager ----------- When a command produces output that contains more lines than there are rows on the terminal, `dico' attempts to use a "pager program" to display it. The name (and arguments) of the pager program are taken from the `dico' internal variable, or, if it is not set, from the `PAGER' environment variable. The `dico' pager setting can be examined or changed using the `pager' command. When used without arguments, it displays the current setting: dico> .pager less (Pager set from environment) When used with a single argument, it sets the pager: dico> .pager "less -R" The argument `-' (a dash) disables pager.  File: dico.info, Node: Program Settings, Next: Session Transcript, Prev: Pager, Up: Interactive Mode 7.2.6 Program Settings ---------------------- The commands described in this subsection are designed mostly for use in `dico' initialization file (*note Initialization File::). The `autologin' command sets the name of autologin file to be used for authentication. When used without arguments, it displays the current setting. The argument to `autologin' command is subject to "tilde expansion", i.e. if it begins with `~/', this prefix is replaced with the name of the current user home directory, followed by `/'. Similarly, a prefix `~LOGIN/' is replaced by the home directory for user LOGIN, followed by a slash. *Note Autologin::, for a detailed discussion of the autologin feature. The `quiet' command toggles the display of `dico' startup banner. When started, `dico' prints a short list of information useful for beginning users: the program version and warranty conditions and a command to get help, e.g.: dico 2.2 Copyright (C) 2005-2012 Sergey Poznyakoff License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type ? for help summary dico> If you find this output superfluous and useless, you can suppress it by setting quiet yes in your initialization file.  File: dico.info, Node: Session Transcript, Next: Other Commands, Prev: Program Settings, Up: Interactive Mode 7.2.7 Session Transcript ------------------------ "Session transcript" is a special mode, which displays raw DICT commands and answers as they are executed. It is useful for debugging purposes. You enable session transcript by issuing the following command: dico> .transcript yes # or dico> .transcript on Starting from then, each DICT transaction will be displayed on standard error output, for example: dico> .open dico: Debug: S:220 Pirx.gnu.org.ua dicod (dico 2.2) <32004.1216639476@gnu.org.ua> dico: Debug: C:CLIENT "dico 1.99.91" dico: Debug: S:250 ok dico: Debug: C:SHOW DATABASES dico: Debug: S:110 26 databases present ... dico: Debug: S:. dico: Debug: S:250 ok dico: Debug: C:SHOW STRATEGIES dico: Debug: S:111 10 strategies present: list follows dico: Debug: S:exact "Match words exactly" dico: Debug: S:prefix "Match word prefixes" dico: Debug: S:soundex "Match using SOUNDEX algorithm" ... dico: Debug: S:. dico: Debug: S:250 ok In the example above, ellipses are used to replace long lists of data. As you see, session transcripts may produce large amount of output. To turn the session transcript off, use the following command: dico> .transcript no # or dico> .transcript off Finally, to query the current state of session transcript, issue this command without arguments: dico> .transcript transcript is on  File: dico.info, Node: Other Commands, Next: Command Summary, Prev: Session Transcript, Up: Interactive Mode 7.2.8 Other Commands -------------------- The `prefix' command queries or changes the current command prefix: dico> .prefix Command prefix is . dico> .prefix @ dico> @prefix Command prefix is @ The `prompt' command changes the `dico' command line prompt. For example, to change it to `dico$', followed by a single space, type: dico> .prompt "dico$ " dico$ _ Note the use of quotes to include the space character in the argument. The `help' command displays a short command usage summary. For convenience, a single question mark can be used instead of it: dico> ? /WORD Match WORD. / Redisplay previous matches. NUMBER Define NUMBERth match. !NUMBER Edit NUMBERth previous command. .open [HOST [PORT]] Connect to a DICT server. .close Close the connection. ... The `version' command displays the package name and version number, and the `warranty' command displays the copyright statement. Finally, the `quit' command leaves the dico shell. Typing end-of-file character (`C-d') has the same effect.  File: dico.info, Node: Command Summary, Prev: Other Commands, Up: Interactive Mode 7.2.9 Dico Command Summary -------------------------- For convenience, this subsection lists all available `dico' commands along with their short description and a reference to the part of this manual where they are described in detail. The command names are given without prefix. `open HOST PORT' Connect to a DICT server. Both arguments are optional. If any of them is absent, the value supplied with the previous `open' command is used. If there was no previous value, the default is used, i.e., `gnu.org.ua' for HOST, and 2628 for PORT. *Note open: Server Commands. `close' Close the connection. *Note close: Server Commands. `autologin [FILE]' Set or display the autologin file name. *Note Autologin::. `sasl [BOOL]' Without argument, show whether the SASL authentication is enabled. With argument, enable or disable it, depending on the value of BOOL. *Note Autologin::. `database [NAME]' Set or display the current database name. *Note database: Database and Strategy. `strategy [NAME]' Set or display the current strategy name. *Note strategy: Database and Strategy. `distance [NUM]' Set or query Levenshtein distance. This command takes effect only if the remote server supports `xlev' experimental capability (*note XLEV: Extended Commands.). *Note distance: Database and Strategy. `ls' List available matching strategies. *Note ls: Informational Commands. `ld' List all accessible databases. *Note ld: Informational Commands. `info [DB]' Display information about the database DB, or the current database, if used without argument. `prefix [C]' Set or display the command prefix. *Note prefix: Other Commands. `transcript [BOOL]' Set or display session transcript mode. *Note Session Transcript::. `verbose [NUMBER]' Set or display debugging verbosity level. Currently (as of version 2.2) it is a no-op. `prompt STRING' Change command line prompt. *Note prompt: Other Commands. `pager STRING' Change or display pager settings. *Note Pager::. `history' Display command history. *Note History Commands::. `help' Display short command usage summary. *Note help: Other Commands. `version' Print program version. *Note version: Other Commands. `warranty' Print copyright statement. *Note warranty: Other Commands. `quiet BOOL' Toggle display of `dico' welcome banner. This command can be used only in initialization file. *Note quiet: Program Settings. `quit' Quit the shell. *Note quit: Other Commands.  File: dico.info, Node: Initialization File, Next: Autologin, Prev: Interactive Mode, Up: dico client 7.3 Initialization File ======================= When you start `dico', it automatically executes commands from its "initialization files" (or "init files", for short), normally called `.dico'. Two init files are read: the one located in your home directory, and the one from the current working directory. It is not an error if any or both of these files are absent. These files contain a series of `dico' commands, as described in *note Interactive Mode::, with the only difference that no command prefix is used by default. The `#' character introduces a comment: any characters from (and including) `#' up to the newline character are ignored(1). Init files are useful to change the defaults for your `dico' invocation. Consider, for example, this init file: # An example init file for `dico' # Turn the welcome banner off quiet yes # Set the location of autologin file autologin ~/.dicologin # Use this server by default open dict.org # Search in all databases database * # Finally, set the custom command prefix prefix : Notice, that if you wish to change your command prefix, it is preferable to do it as a last command in your init file, as shown in this example. ---------- Footnotes ---------- (1) The same holds true for interactive mode as well, but you will hardly need comments on a terminal.  File: dico.info, Node: Autologin, Next: Dico invocation, Prev: Initialization File, Up: dico client 7.4 Autologin ============= After connecting to a remote server, `dico' checks if the server supports authentication and attempts to authenticate itself if so. To do this `dico' needs a set of parameters called "user credentials". The exact set of credentials depends on the authentication mechanism being used, with user name and password being the two most important ones. The user credentials can be supplied from the following sources: 1. Command line options `--user' and `--password'. 2. An URL given as a command line argument (*note user: urls.). 3. Autologin files. These three sources are consulted in that order, i.e., a user name supplied with the `--user' command line option takes precedence over the one found in an URL and over any names supplied by autologin files. If, after consulting all these sources, the user name is established, while the password is not, the resulting action depends on whether the standard input is connected to a terminal. If it is, `dico' will ask the user to supply a password. If it is not, authentication is aborted and connection to the server is closed. Some authentication mechanisms require additional credentials. For example, GSSAPI authentication requires a "service name". These credentials can be supplied only in autologin file. "Autologin file" is a plaintext file that contains authentication information for various DICT servers. At most two autologin files are consulted: first the session-specific file, if it is supplied by `autologin' command (*note autologin: Program Settings.) or by the `--autologin' command line option, next the default file `.dicologin' in the user's home directory. The default autologin file is examined only if no matching record was found in the session-specific one. The autologin file format is similar to that of `.netrc' file used by `ftp' utility. Comments are introduced by a pound sign. Anything starting from `#' up to the end of physical line is ignored. Empty lines and comments are ignored. Non-empty lines constitute "statements". Tokens in a statement are separated with spaces, tabs, or newlines. A valid statement must begin with one of the following: `machine NAME' This statement contains parameters for authenticating on machine NAME. `default' This statement contains parameters for authenticating on any machine, except those explicitly listed in `machine' statements. There can be at most one `default' statement in autologin file. Its exact location does not matter, it will always be matched after all explicit `machine' statements. During the lookup, `dico' searches the autologin file for a `machine' statement whose NAME matches the remote server name as given by `--host' command line option, host part of an URL (*note urls::), or the argument to the `open' command (*note open: Server Commands.). If it reaches end of the file without having found such an entry, it uses the `default' value, if available. Once a matching entry is found, its subsequent tokens are analyzed. The following tokens are recognized: `login NAME' Supply user name for this server. `password STRING' Supply a password. `noauth' Do not perform authentication on this machine. `sasl' Enable SASL authentication. `nosasl' Disable SASL authentication. `mechanisms LIST' Declare acceptable SASL mechanisms. The LIST argument is a comma-separated list of mechanism names, without intervening whitespace. Multiple `mechanisms' may be given, in which case the corresponding lists are concatenated. `service NAME' Declare service name, for authentication methods that need it. If this token is omitted, the default service name `dico' is used. `realm NAME' Declare realm for authentication. `host NAME' Set host name for this machine. By default, it is determined automatically. Consider the following autologin entry, for example: machine a.net user smith password guessme machine b.net sasl mechanisms gssapi,digest-md5 realm example.net service dico user smith password guessme default noauth When connecting to the server `a.net', `dico' will attempt the usual APOP authentication as user `smith' with password `guessme'. When connecting to the machine `b.net', it will use SASL authentication, via either GSSAPI or DIGEST-MD5 mechanisms, with realm name `example.net', service name `dico' and the same user name and password, as for `a.net'. The authentication mechanism is suppressed if the `--noauth' option has been given in the command line, or a matching entry was found in one of the autologin files, which contained the `noauth' keyword.  File: dico.info, Node: Dico invocation, Prev: Autologin, Up: dico client 7.5 Dico invocation =================== This section contains a short summary of `dico' command line options. Command Line ------------ The following table summarizes the four existing ways of `dico' invocation: `dico [OPTIONS] WORD' Connect to the dictionary and define or match a WORD. *Note dico options::. `dico [OPTIONS] URL' Connect to the dictionary and define or match a word, supplied in the URL. *Note urls::. `dico [OPTIONS] OPMODE' Connect to the dictionary and query the information required by OPMODE option, which is one of `--dbs', `--strategies', `--serverhelp', `--info', or `--serverinfo'. See below (*note Operation modes: dico-opmode.) for a description. `dico [OPTIONS]' Start interactive shell. *Note Interactive Mode::. Server selection options: ------------------------- `--host=SERVER' Connect to this server. *Note -host: dico options. `--port=PORT' `-p PORT' Specify the port to connect to. The argument PORT can be either a port number or its symbolic service name, as listed in `/etc/services'. `--database=NAME' `-d NAME' Select a database to search. The NAME can be either a name of one of the databases offered by the server (as returned by `--dbs' option), or one of the predefined database names: `!' or `*'. *Note -database: dico options. `--source=ADDR' Set source address for TCP connections. Operation modifiers ------------------- `--match' `-m' Match instead of define. *Note -match: dico options. `--strategy=NAME' `-s NAME' Select a strategy for matching. The argument is either a name of one of the matching strategies supported by server (as displayed by `--strategies' option) or a dot (`.') meaning a server-dependent default strategy. This option implies `--match'. *Note -strategy: dico options. `--levdist=N' `--levenshtein-distance=N' Sets maximum Levenshtein distance. Allowed values of N are between 1 and 9 inclusively. This option has effect only if the remote server supports `xlev' extension (*note XLEV: Extended Commands.). *Note -levdist: dico options. `--quiet' `-q' Do not print the normal `dico' welcome banner when entering interactive shell. *Note quiet: Program Settings. Operation modes --------------- `--dbs' `-D' Show available databases. *Note -dbs: dico options. `--strategies' `-S' Show available search strategies. *Note -strategies: dico options. `--serverhelp' `-H' Show server help. `--info=DBNAME' `-i DBNAME' Show information about database DBNAME. `--serverinfo' `-I' Show information about the server. Authentication -------------- `--noauth' `-a' Disable authentication. *Note Autologin::. `--sasl' Enable SASL authentication, if the server supports it. *Note Autologin::. `--nosasl' Disable SASL authentication. *Note Autologin::. `--user=NAME' `-u NAME' Set user name for authentication. *Note Autologin::. `--key=STRING' `-k STRING' `--password=STRING' Set shared secret for authentication. *Note Autologin::. `--autologin=NAME' Set the name of autologin file to use. *Note Autologin::. `--client=STRING' `-c STRING' Additional text for client command, instead of the default `GNU dico 2.2'. Debugging options ----------------- `--transcript' `-t' Enable session transcript. *Note Session Transcript::, for a description. `--verbose' `-v' Increase debugging verbosity level. `--time-stamp' Include time stamp in the debugging output. `--source-info' Include source line information in the debugging output. Other options ------------- `--help' `-h' Display a short description of command line options. `--usage' Display a short usage message `--version' Print program version.  File: dico.info, Node: gcider, Next: Reporting Bugs, Prev: dico client, Up: Top 8 GCIDER ******** `Gcider' is a window-based application for browsing the "GNU Collaborative International Dictionary of English" (GCIDE). When started, it launches a copy of `dicod' with a specially crafted configuration file and interfaces with it via stdin/stdout. For operation it needs to know the location of the `dicod' binary and of the directory where the GCIDE files reside. When started for the first time it will present you with a dialog box to help it locate the needed components. The location of the `dicod' binary is normally guessed by scanning the `PATH' environment variable. The only parameter you need to supply is the directory where the dictionary files reside. Once these data are entered, the program will save them in its configuration file (located in `~/.gcider') and will reuse them in subsequent invocations. The `gcider' user documentation is available online at `http://dico.gnu.org.ua/gcider.html'. The program display is organized in three areas, ordered vertically. The topmost area is the "menu bar", which contains pull-down menus. It is followed by a "search control" area. It provides an input line for you to enter the term to look-up in the dictionary, a set of widgets for bringing back prior inputs from the history and for controlling the search types and matching strategies. The area that follows presents two windows, side by side. The leftmost one is the "article window", where definitions of the search terms are shown. The rightmost one is the "match list", which will present the results of the recent "match" command. Finally, at the very bottom of the `gcider' window is located the "status bar". Its purpose is twofold. First, it displays a status of the last search. Secondly, it provides a terse contextual help describing what you can do using the widget your mouse pointer points to. To look up a word, type it in the input line in the search area and hit `CR' or click on the `Define' button. The definition, if found, is then displayed in the article window. This text may contain "cross-references" to other words in the dictionary, which are shown underlined, to draw your attention. To define a cross-reference, click on it with your mouse. You can also define any other word from the text. To do so, select it and click on the right button. Then, in the menu that will appear, select `Define'. If you are not sure about the exact spelling of your search term, try searching for closest matches first. To do so, click on `Match' instead of `Define'. To find closest matches for a word in a definition, select the word (or part of it) and select `Match' in the contextual menu. In both cases, the program will try to match the word using the "strategy" selected currently in the strategy widget at the right of the search control area. Matching headwords will then be displayed in a listbox to the right of the article window. Clicking on a headword will bring its definition to the article window. To select a match strategy, click on the strategy widget and select the desired strategy in the pop-down list that will appear. The list contains short strategy names. To help you select the right one, the status line will show a full description of the currently highlighted strategy. Those search terms for which a definition was found are saved in a "history list". Several ways are provided to retrieve definitions from that list. First, clicking on the input widget brings a popdown list with all headwords from the history list shown in a reverse chronological order. Selecting a word from that list brings back its definition. Secondly, two special buttons to the right of the input widget can be used to navigate through the history. The button marked with a left arrow brings back previous definition, whereas the one marked with a right arrow brings back next definition. By default the history list can accommodate up to 500 search terms. Once this limit reached, adding a new term to the list discards the oldest item, so that the total list length remains the same. Actual length of the history list can be configured using the `Edit/Appearance' menu.  File: dico.info, Node: Reporting Bugs, Next: Available Strategies, Prev: gcider, Up: Top 9 How to Report a Bug ********************* Email bug reports to or . Please include a detailed description of the bug and information about the conditions under which it occurs, so we can reproduce it. To facilitate the task, the following list shows the basic set of information needed in order to find the bug: * Package version you use. The output of `dicod --version' will do. * A detailed description of the bug. * Conditions under which the bug appears. * It is often helpful to send the contents of `config.log' file along with your bug report. This file is created after running `./configure' in the source root directory of GNU Dico.  File: dico.info, Node: Available Strategies, Next: Dictionary Server Protocol, Prev: Reporting Bugs, Up: Top Appendix A Available Strategies ******************************* This appendix summarizes search strategies available for use in Dico 2.2. exact Match words exactly. This is a built-in strategy. prefix Match word prefixes. This is a built-in strategy. nprefix This strategy is similar to `prefix', except that it allows the user to limit the number of returned matches. If the search term has the structure `SKIP#COUNT#STRING', where SKIP and COUNT are integer numbers, then the `nprefix' strategy will return at most COUNT headwords that begin with STRING, omitting first SKIP unique matches. This strategy is implemented in the `nprefix' loadable module. *Note nprefix::. suffix Match word suffixes. This is a built-in strategy. soundex Match words using SOUNDEX algorithm(1). This strategy matches headwords that sound approximately the same as the search term. Note, that it is suitable only for English words. This is a built-in strategy. lev Match headwords within given Levenshtein distance (1 by default). This strategy accounts for the most usual spelling errors. The Levenshtein distance between two strings is the minimum number of "edits" needed to transform one string into the other. The edits are: insertion, deletion, or substitution of a single character. Thus, Levenshtein distance 1 means that only one such operation suffices to convert one string to another. This is the default for that strategy. This built-in strategy is used as a default one (*note default strategy::), unless the `default-strategy' configuration statement mandates otherwise. The dictionary server may optionally allow users to alter the Levenshtein distance using the extension command `XLEV'. This command is enabled by setting the `xlev' capability. *Note xlev: Capabilities, for a detailed description. nlev Match normalized headwords within given Levenshtein distance. This strategy is similar to `lev', except that it treats any runlength of whitespace characters appearing in a headword as a single space (ASCII 32) character. dlev Match headwords within given Damerau-Levenshtein distance (1 by default). The Damerau-Levenshtein distance extends the Levenshtein distance by an additional edit operation: transposition of two adjacent characters. This strategy is similar to `lev', but covers a much wider range of spelling and typographical errors. The distance threshold optionally be configured using the `XLEV' command (*note xlev: Capabilities.). ndlev This is the same as `dlev', except that it treats any runlength of whitespace characters appearing in a headword as a single space (ASCII 32) character. re Match using POSIX 1003.2 regular expressions. This strategy treats the search term as a regular expression (*note Extended regular expressions: (sed)Extended regexps.). regexp Match using basic regular expressions. pcre Match using Perl-compatible regular expressions. This strategy is implemented in the loadable module `pcre'. *Note pcre::. all Match everything. This experimental strategy ignores its argument and matches all headwords. It is implemented in the `stratall' module, which you must load if you wish to make that strategy available. *Note stratall::. substr Match a substring anywhere in the headword. This strategy is implemented as a loadable module. *Note substr::. word Match a word anywhere in the headword. This is one of the strategies provided by the `word' loadable module. *Note word::. first Match the first word within headwords. This strategy is implemented in `word' loadable module. *Note word::. last Match the last word within headwords. This strategy is implemented in `word' loadable module. *Note word::. ---------- Footnotes ---------- (1) See `http://en.wikipedia.org/wiki/Soundex'  File: dico.info, Node: Dictionary Server Protocol, Next: Time and Date Formats, Prev: Available Strategies, Up: Top Appendix B Dictionary Server Protocol ************************************* This appendix describes commands understood by Dico dictionary server. The examples provided follow the convention used in RFC documents: a text sent by the server is prefixed with `S', whereas a text sent by the client is prefixed with `C'. * Menu: * Initial Reply:: * Standard Commands:: * Extended Commands::  File: dico.info, Node: Initial Reply, Next: Standard Commands, Up: Dictionary Server Protocol B.1 Initial Reply ================= When a connection is established, the server sends an "initial reply" to the client. This reply has the following format: 220 HOSTNAME TEXT MSG-ID Its parts and their meaning are described in the following table: HOSTNAME The name of the host. It is determined automatically, unless set using `hostname' configuration file statement (*note hostname directive::). TEXT Arbitrary text, as set via `initial-banner-text' configuration statement (*note initial-banner-text: General Settings.). CAPABILITIES A comma-separated list of server capabilities. It is configured using `capability' statement (*note Capabilities::). MSG-ID A unique identifier similar to the format specified in RFC822 (ftp://ftp.rfc-editor.org/in-notes/rfc822), except that spaces and quoted pairs are not allowed within it. This identifier will be used by the client when formulating the authentication string used in the `AUTH' command (*note AUTH::). An example of initial reply follows: 220 Trurl.gnu.org.ua <520.1212912026@Trurl.gnu.org.ua>  File: dico.info, Node: Standard Commands, Next: Extended Commands, Prev: Initial Reply, Up: Dictionary Server Protocol B.2 Standard Commands ===================== The following are standard commands, defined in RFC2229. * Menu: * DEFINE:: * MATCH:: * SHOW:: * OPTION:: * AUTH:: * CLIENT:: * STATUS:: * HELP:: * QUIT::  File: dico.info, Node: DEFINE, Next: MATCH, Up: Standard Commands B.2.1 The DEFINE Command ------------------------ The `DEFINE' command searches for definitions of a word. -- Command: DEFINE db word Look up the word WORD in database DB. If DB is `!', then all the databases will be searched until the word is found, and all matches in that database will be returned. Similarly, if DB is `*', then all the databases will be searched and all matches in all databases will be returned. In these two cases, the databases are searched in the same order as that returned by `SHOW DB' command (*note SHOW DB: SHOW.). If the word was not found, response code 552 is returned. If the word is found, a response code 150 is sent, followed by the number of definitions found. Then, for each definition a response code 151 is returned, followed by the textual body of the definition. In a 151 response, the first three space-delimited parameters give the word looked for, the name and a short description of the database. The latter two are the same as shown in the output from `SHOW DB' command. The textual body of each definition is terminated with a dot (`.') on a line alone. If any line in the definition begins with a dot, it is duplicated to avoid confusion with body terminator. After all of the definitions have been sent, a status code 250 is sent. If `timing' is set to `true' in the configuration file, this latter response also carries timing information. *Note Tuning::, for more information about timing output. Possible responses from `DEFINE' command are: 550 Invalid database, use SHOW DB for a list 552 No match 150 N definitions found: list follows 151 WORD DATABASE NAME 250 ok (optional timing information here) Example transaction: C: DEFINE eng-swa man S: 150 1 definitions found: list follows S: 151 "man" eng-swa "English-Swahili xFried/FreeDict Dictionary" S: man S: S: mwanamume S: S: . S: 250 Command complete [d/m/c = 1/0/12 0.000r 0.000u 0.000s]  File: dico.info, Node: MATCH, Next: SHOW, Prev: DEFINE, Up: Standard Commands B.2.2 The MATCH Command ----------------------- The `MATCH' command searches for word in the database index. The searching algorithm is determined by "strategy". *Note Strategies::, for a list of strategies offered by GNU Dico. -- Command: MATCH database strategy word Match WORD in DATABASE using STRATEGY. As with `DEFINE', the DATABASE can be `!' or `*' (*Note DEFINE::, for a detailed description of these wildcards). The STRATEGY is either the name of a strategy to use, or a dot (`.'), meaning to use default strategy. The default strategy is set using `default-strategy' configuration file statement (*note default-strategy: General Settings. Its default value is `lev', which means `use Levenshtein algorithm' (*note Strategies::). If no matches are found in any of the searched databases, then response code 552 will be returned. Otherwise, response code 152 will be returned followed by a list of matched words, one per line, in the form: DATABASE WORD Thus, prepending a `DEFINE ' to each such response, one obtains a valid `DEFINE' command. The textual body of the match list is terminated with a line containing only a dot character. Following the list, response code 250 is sent, which includes timing information, if `timing' directive is set in the configuration file (*note Tuning::). Possible responses: 550 Invalid database, use SHOW DB for a list 551 Invalid strategy, use SHOW STRAT for a list 552 No match 152 N matches found: list follows 250 ok (optional timing information here) Examples: C: MATCH * . "weather" S: 152 12 matches found: list follows C: eng-afr "feather" C: eng-afr "leather" C: eng-afr "weather" C: eng-deu "feather" C: eng-deu "heather" C: eng-deu "leather" C: eng-deu "weather" C: eng-deu "wether" C: eng-deu "wheather" C: devils "WEATHER" S: . S: 250 Command complete [d/m/c = 0/12/100677 0.489r 0.479u 0.007s]  File: dico.info, Node: SHOW, Next: OPTION, Prev: MATCH, Up: Standard Commands B.2.3 The SHOW Command ---------------------- The `SHOW' command outputs various information about the server and databases. -- Command: SHOW DB -- Command: SHOW DATABASES Display the list of currently accessible databases, one per line, in the form: DATABASE DESCRIPTION The list is terminated with is a dot (`.') on a line alone. Possible responses: 110 N databases present 554 No databases present -- Command: SHOW STRAT -- Command: SHOW STRATEGIES Display the list of currently supported search strategies, one per line, in the form: STRATEGY DESCRIPTION The list is terminated with is a dot (`.') on a line alone. Possible responses: 111 N strategies available 555 No strategies available -- Command: SHOW INFO database Displays the information about the specified database. The information is a free-form text and is suitable for display to the user in the same manner as a definition. The textual body of the response is terminated with is a dot (`.') on a line alone. Possible responses: 550 Invalid database, use SHOW DB for a list 112 database information follows The textual body is retrieved from the `info' statement in the configuration file (*note info: Databases.), or, if it is not specified, from the database itself, using `dico_db_info' callback function (*note dico_db_info::). If neither source returns anything, the string `No information available.' is returned. -- Command: SHOW SERVER Return a server-specific information. Response: 114 server information follows The information follows, terminated with a dot on a line alone. The textual body returned by the `SHOW SERVER' command consists of two parts. It begins with a line containing host name of the server and, optionally an additional information about the daemon and the system it runs on. The exact look and amount of information in this line is controlled by `show-sys-info' configuration statement (*note show-sys-info: Security Settings.). This line is followed by the text supplied with `server-info' configuration statement (*note server-info: General Settings.).  File: dico.info, Node: OPTION, Next: AUTH, Prev: SHOW, Up: Standard Commands B.2.4 The OPTION Command ------------------------ The `OPTION' command allows to request optional features on the remote server. Currently the only implemented subcommand is: -- Command: OPTION MIME Requests that all text responses be prefaced by a MIME header (RFC2045 (ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt)) followed by a single blank line. After this command is issued, the server begins each textual response with a MIME header. This header consists of `Content-type' and `Content-transfer-encoding' headers, as supplied by the corresponding configuration file statements for this database (*Note content-type: Databases, *note content-transfer-encoding: Databases.). Any or both of these headers may be missing.  File: dico.info, Node: AUTH, Next: CLIENT, Prev: OPTION, Up: Standard Commands B.2.5 The AUTH Command ---------------------- The `AUTH' command allows client to authenticate itself to the server. Depending on the server configuration, authenticated users may get access to more databases (*note Database Visibility::) or more detailed server information (*note show-sys-info: Security Settings.). -- Command: AUTH username auth-string Authenticate client to the server using a username and password. The AUTH-STRING is computed as in the APOP protocol (RFC1939 (ftp://ftp.rfc-editor.org/in-notes/rfc1929.txt). Briefly, it is the MD5 checksum of the concatenation of the MSG-ID (*note Initial Reply::) and the "shared secret" that is stored both on the server and client machines. *Note Authentication::, for information on how to configure server for authenticating clients. This command is supported only if `auth' capability is requested in the configuration (*note auth: Capabilities.).  File: dico.info, Node: CLIENT, Next: STATUS, Prev: AUTH, Up: Standard Commands B.2.6 The CLIENT Command ------------------------ -- Command: CLIENT info Identify client to server. The INFO argument contains a string identifying the client program (e.g. its name and version number). This information can then be used in logging (*note %C: Access Log.).  File: dico.info, Node: STATUS, Next: HELP, Prev: CLIENT, Up: Standard Commands B.2.7 The STATUS Command ------------------------ -- Command: STATUS Display cumulative timing information. This command returns a `210' status code, followed by the timing information as described in *note Tuning::, e.g. C: STATUS S: 210 [d/m/c = 28/1045/119856 21.180r 10.360u 1.040s]  File: dico.info, Node: HELP, Next: QUIT, Prev: STATUS, Up: Standard Commands B.2.8 The HELP Command ---------------------- -- Command: HELP The `HELP' command provides a short summary of commands that are understood by the server. The response begins with a `113' code, followed by textual body defined in `help-text' configuration file statement (*note help-text: General Settings.), which is terminated by a dot on a line by itself. A `250' response code finishes the output. For example: 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide database information SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection . 250 Ok  File: dico.info, Node: QUIT, Prev: HELP, Up: Standard Commands B.2.9 The QUIT Command ---------------------- -- Command: QUIT Terminate connection. This command returns a response code 221, optionally followed by timing information (*note Tuning::).  File: dico.info, Node: Extended Commands, Prev: Standard Commands, Up: Dictionary Server Protocol B.3 Extended Commands ===================== In addition to the standard commands, the Dico server also offers a set of experimental or extended commands. -- Command: XIDLE This command displays the current inactivity timeout setting (*note inactivity-timeout::), and resets idle timer to 0. The timeout value is printed as the first word after a `110' reply code, e.g.: C: XIDLE S: 110 180 second(s) The value of `0' means there are no timeout. -- Command: XVERSION This command displays the daemon implementation and version number. It becomes available only if `xversion' capability was requested in the configuration file (*note xversion: Capabilities.). C: XVERSION S: 110 dicod (dico 2.2) -- Command: XLEV param If PARAM is the word `tell', displays the current value of Levenshtein threshold. If PARAM is a positive integer value, sets the Levenshtein threshold to this value. This command becomes available only if `xlev' capability was requested in the configuration file (*note xlev: Capabilities.). C: xlev tell S: 280 1 C: xlev 3 S: 250 ok - Levenshtein threshold set to 3 C: xlev tell S: 280 3  File: dico.info, Node: Time and Date Formats, Next: Libdico, Prev: Dictionary Server Protocol, Up: Top Appendix C Time and Date Formats ******************************** This appendix documents the time format specifications understood by the `%t' log format specifier (*note Access Log::). Essentially, it is a reproduction of the man page for GNU `strftime' function. Ordinary characters placed in the format string are reproduced without conversion. Conversion specifiers are introduced by a `%' character, and are replaced as follows: `%a' The abbreviated weekday name according to the current locale. `%A' The full weekday name according to the current locale. `%b' The abbreviated month name according to the current locale. `%B' The full month name according to the current locale. `%c' The preferred date and time representation for the current locale. `%C' The century number (year/100) as a 2-digit integer. `%d' The day of the month as a decimal number (range 01 to 31). `%D' Equivalent to `%m/%d/%y'. `%e' Like `%d', the day of the month as a decimal number, but a leading zero is replaced by a space. `%E' Modifier: use alternative format, see below (*note conversion specs::). `%F' Equivalent to `%Y-%m-%d' (the ISO 8601 date format). `%G' The ISO 8601 year with century as a decimal number. The 4-digit year corresponding to the ISO week number (see `%V'). This has the same format and value as `%y', except that if the ISO week number belongs to the previous or next year, that year is used instead. `%g' Like `%G', but without century, i.e., with a 2-digit year (00-99). `%h' Equivalent to `%b'. `%H' The hour as a decimal number using a 24-hour clock (range 00 to 23). `%I' The hour as a decimal number using a 12-hour clock (range 01 to 12). `%j' The day of the year as a decimal number (range 001 to 366). `%k' The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank. (See also `%H'.) `%l' The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank. (See also `%I'.) `%m' The month as a decimal number (range 01 to 12). `%M' The minute as a decimal number (range 00 to 59). `%n' A newline character. `%O' Modifier: use alternative format, see below (*note conversion specs::). `%p' Either `AM' or `PM' according to the given time value, or the corresponding strings for the current locale. Noon is treated as `pm' and midnight as `am'. `%P' Like `%p' but in lowercase: `am' or `pm' or a corresponding string for the current locale. `%r' The time in `a.m.' or `p.m.' notation. In the POSIX locale this is equivalent to `%I:%M:%S %p'. `%R' The time in 24-hour notation (`%H:%M'). For a version including the seconds, see `%T' below. `%s' The number of seconds since the Epoch, i.e., since 1970-01-01 00:00:00 UTC. `%S' The second as a decimal number (range 00 to 61). `%t' A tab character. `%T' The time in 24-hour notation (`%H:%M:%S'). `%u' The day of the week as a decimal, range 1 to 7, Monday being 1. See also `%w'. `%U' The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also `%V' and `%W'. `%V' The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. See also `%U' and `%W'. `%w' The day of the week as a decimal, range 0 to 6, Sunday being 0. See also `%u'. `%W' The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01. `%x' The preferred date representation for the current locale without the time. `%X' The preferred time representation for the current locale without the date. `%y' The year as a decimal number without a century (range 00 to 99). `%Y' The year as a decimal number including the century. `%z' The time-zone as hour offset from GMT. Required to emit RFC822-conformant dates (using `%a, %d %b %Y %H:%M:%S %z') `%Z' The time zone or name or abbreviation. `%+' The date and time in `date(1)' format. `%%' A literal `%' character. Some conversion specifiers can be modified by preceding them by the `E' or `O' modifier to indicate that an alternative format should be used. If the alternative format or specification does not exist for the current locale, the behaviour will be as if the unmodified conversion specification were used. The Single Unix Specification mentions `%Ec', `%EC', `%Ex', `%EX', `%Ry', `%EY', `%Od', `%Oe', `%OH', `%OI', `%Om', `%OM', `%OS', `%Ou', `%OU', `%OV', `%Ow', `%OW', `%Oy', where the effect of the `O' modifier is to use alternative numeric symbols (say, roman numerals), and that of the `E' modifier is to use a locale-dependent alternative representation.  File: dico.info, Node: Libdico, Next: Copying This Manual, Prev: Time and Date Formats, Up: Top Appendix D The Libdico Library ****************************** * Menu: * strat:: * argcv:: * lists:: * assoc:: * diag:: * filter:: * parseopt:: * stream:: * url:: * utf8:: * util:: * xlat::  File: dico.info, Node: strat, Next: argcv, Up: Libdico D.1 Strategies ============== ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== struct dico_strategy { char *name; char *descr; dico_select_t sel; void *closure; int is_default; }; -- Function: dico_strategy_t dico_strategy_dup (const dico_strategy_t STRAT) -- Function: dico_strategy_t dico_strategy_find (const char *NAME) -- Function: int dico_strategy_add (const dico_strategy_t STRAT) -- Function: dico_iterator_t dico_strategy_iterator (void) -- Function: void dico_strategy_iterate (dico_list_iterator_t ITR, void *DATA) -- Function: size_t dico_strategy_count (void) -- Function: int dico_set_default_strategy (const char *NAME) -- Function: const dico_strategy_t dico_get_default_strategy (void) -- Function: int dico_strategy_is_default_p (dico_strategy_t STRAT)  File: dico.info, Node: argcv, Next: lists, Prev: strat, Up: Libdico D.2 argcv ========= ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- enum: dico_argcv_quoting_style -- Variable: enum dico_argcv_quoting_style dico_argcv_quoting_style -- Function: int dico_argcv_get (const char *COMMAND, const char *DELIM, const char *CMNT, int *ARGC, char ***ARGV) -- Function: int dico_argcv_get_n (const char *COMMAND, int LEN, const char *DELIM, const char *CMNT, int *ARGC, char ***ARGV) -- Function: int dico_argcv_get_np (const char *COMMAND, int LEN, const char *DELIM, const char *CMNT, int FLAGS, int *ARGC, char ***ARGV, char **ENDP) -- Function: int dico_argcv_string (int ARGC, const char **ARGV, char **STRING) -- Function: void dico_argcv_free (int ARGC, char **ARGV) -- Function: void dico_argv_free (char **ARGV) -- Function: int dico_argcv_unquote_char (int C) -- Function: int dico_argcv_quote_char (int C) -- Function: size_t dico_argcv_quoted_length (const char *STR, int *QUOTE) -- Function: void dico_argcv_unquote_copy (char *DST, const char *SRC, size_t N) -- Function: void dico_argcv_quote_copy (char *DST, const char *SRC) -- Function: void dico_argcv_remove (int *ARGC, char ***ARGV, int (*SEL) (const char *, void *), void *DATA)  File: dico.info, Node: lists, Next: assoc, Prev: argcv, Up: Libdico D.3 Lists ========= ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- Type: dico_list_t -- Type: dico_iterator_t -- Function Type: dico_list_iterator_t typedef int (*dico_list_iterator_t)(void *item, void *data); -- Function Type: dico_list_comp_t typedef int (*dico_list_comp_t)(const void *, const void *); -- Function: dico_list_t dico_list_create (void) -- Function: void dico_list_destroy (dico_list_t *LIST, dico_list_iterator_t FREE, void *DATA) -- Function: void dico_list_iterate (dico_list_t LIST, dico_list_iterator_t ITR, void *DATA) -- Function: void * dico_list_item (dico_list_t LIST, size_t N) -- Function: size_t dico_list_count (dico_list_t LIST) -- Function: int dico_list_append (dico_list_t LIST, void *DATA) -- Function: int dico_list_prepend (dico_list_t LIST, void *DATA) -- Function: int dico_list_push (dico_list_t LIST, void *DATA) -- Function: int dico_list_insert_sorted (dico_list_t LIST, void *DATA, dico_list_comp_t CMP) -- Function: dico_list_t dico_list_intersect (dico_list_t A, dico_list_t B, dico_list_comp_t CMP) -- Function: int dico_list_intersect_p (dico_list_t A, dico_list_t B, dico_list_comp_t CMP) -- Function: void * dico_list_pop (dico_list_t LIST) -- Function: void * dico_list_locate (dico_list_t LIST, void *DATA, dico_list_comp_t CMP) -- Function: void * dico_list_remove (dico_list_t LIST, void *DATA, dico_list_comp_t CMP) -- Function: void * dico_iterator_current (dico_iterator_t ITR) -- Function: dico_iterator_t dico_iterator_create (dico_list_t LIST) -- Function: void dico_iterator_destroy (dico_iterator_t *PITR) -- Function: void * dico_iterator_first (dico_iterator_t ITR) -- Function: void * dico_iterator_next (dico_iterator_t ITR) -- Function: void * dico_iterator_remove_current (dico_iterator_t ITR) -- Function: void dico_iterator_set_data (dico_iterator_t ITR, void *DATA)  File: dico.info, Node: assoc, Next: diag, Prev: lists, Up: Libdico D.4 Associative lists ===================== ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== struct dico_assoc { char *key; char *value; }; -- Type: dico_assoc_list_t -- Function: dico_assoc_list_t dico_assoc_create (void) -- Function: void dico_assoc_destroy (dico_assoc_list_t *PASSOC) -- Function: int dico_assoc_add (dico_assoc_list_t ASSOC, const char *KEY, const char *VALUE) -- Function: const char * dico_assoc_find ( dico_assoc_list_t ASSOC, const char *KEY) -- Function: void dico_assoc_remove ( dico_assoc_list_t ASSOC, const char *KEY)  File: dico.info, Node: diag, Next: filter, Prev: assoc, Up: Libdico D.5 Diagnostics Functions ========================= ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== L_DEBUG L_INFO L_NOTICE L_WARN L_ERR L_CRIT L_ALERT L_EMERG -- Variable: const char * dico_program_name -- Variable: const char * dico_invocation_name -- Function: void dico_set_program_name (char *NAME) -- Function Type: void dico_log_printer_t ( int LVL, int EXITCODE, int ERRCODE, const char *FMT, va_list AP) -- Function: void dico_set_log_printer (dico_log_printer_t PRT) -- Function: void dico_vlog ( int LVL, int ERRCODE, const char *FMT, va_list AP) -- Function: void dico_log (int LVL, int ERRCODE, const char *FMT, ...) -- Function: void dico_die (int EXITCODE, int LVL, int ERRCODE, char *FMT, ...) -- Function: int dico_str_to_diag_level (const char *STR) -- Function: dico_stream_t dico_log_stream_create (int LEVEL)  File: dico.info, Node: filter, Next: parseopt, Prev: diag, Up: Libdico D.6 Filter ========== -- Define: FILTER_ENCODE -- Define: FILTER_DECODE -- Function Type: filter_xcode_t typedef int (*filter_xcode_t) (const char *, size_t, char *, size_t, size_t *, size_t, size_t *); -- Function: dico_stream_t filter_stream_create ( dico_stream_t STR, size_t MIN_LEVEL, size_t MAX_LINE_LENGTH, filter_xcode_t XCODE, int MODE) -- Function: dico_stream_t dico_codec_stream_create ( const char *ENCODING, int MODE, dico_stream_t TRANSPORT) -- Function: dico_stream_t dico_base64_stream_create ( dico_stream_t STR, int MODE) -- Function: dico_stream_t dico_qp_stream_create ( dico_stream_t STR, int MODE) -- Function: int dico_base64_input (char C) -- Function: int dico_base64_decode ( const char *IPTR, size_t ISIZE, char *OPTR, size_t OSIZE, size_t *PNBYTES, size_t LINE_MAX, size_t *PLINE_LEN) -- Function: int dico_base64_encode ( const char *IPTR, size_t ISIZE, char *OPTR, size_t OSIZE, size_t *PNBYTES, size_t LINE_MAX, size_t *PLINE_LEN) -- Function: int dico_qp_decode ( const char *IPTR, size_t ISIZE, char *OPTR, size_t OSIZE, size_t *PNBYTES, size_t LINE_MAX, size_t *PLINE_LEN) -- Function: int dico_qp_encode ( const char *IPTR, size_t ISIZE, char *OPTR, size_t OSIZE, size_t *PNBYTES, size_t LINE_MAX, size_t *PLINE_LEN)  File: dico.info, Node: parseopt, Next: stream, Prev: filter, Up: Libdico D.7 parseopt ============ ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== `DICO_PARSEOPT_PARSE_ARGV0' `DICO_PARSEOPT_PERMUTE' -- Enumeration: dico_opt_type `dico_opt_null' `dico_opt_bool' `dico_opt_bitmask' `dico_opt_bitmask_rev' `dico_opt_long' `dico_opt_string' `dico_opt_enum' `dico_opt_const' `dico_opt_const_string' -- struct: dico_option struct dico_option { const char *name; size_t len; enum dico_opt_type type; void *data; union { long value; const char **enumstr; } v; int (*func) (struct dico_option *, const char *); }; -- Macro: DICO_OPTSTR name -- Function: int dico_parseopt (struct dico_option *OPT, int ARGC, char **ARGV, int FLAGS, int *INDEX)  File: dico.info, Node: stream, Next: url, Prev: parseopt, Up: Libdico D.8 stream ========== ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- Function: int dico_stream_create (dico_stream_t *PSTREAM, int FLAGS, void *DATA) `DICO_STREAM_READ' `DICO_STREAM_WRITE' `DICO_STREAM_SEEK' -- Function: int dico_stream_open (dico_stream_t STREAM) -- Function: void dico_stream_set_open ( dico_stream_t STREAM, int (*OPENFN) (void *, int)) -- Function: void dico_stream_set_seek ( dico_stream_t STREAM, int (*FUN_SEEK) (void *, off_t, int, off_t *)) -- Function: void dico_stream_set_size ( dico_stream_t STREAM, int (*SIZEFN) (void *, off_t *)) -- Function: void dico_stream_set_read ( dico_stream_t STREAM, int (*READFN) (void *, char *, size_t, size_t *)) -- Function: void dico_stream_set_write ( dico_stream_t STREAM, int (*WRITEFN) (void *, const char *, size_t, size_t *)) -- Function: void dico_stream_set_flush ( dico_stream_t STREAM, int (*FLUSHFN) (void *)) -- Function: void dico_stream_set_close ( dico_stream_t STREAM, int (*CLOSEFN) (void *)) -- Function: void dico_stream_set_destroy ( dico_stream_t STREAM, int (*DESTROYFN) (void *)) -- Function: void dico_stream_set_ioctl ( dico_stream_t STREAM, int (*CTL) (void *, int, void *)) -- Function: void dico_stream_set_error_string ( dico_stream_t STREAM, const char *(*ERROR_STRING) (void *, int)) -- Function: int dico_stream_set_buffer ( dico_stream_t STREAM, enum dico_buffer_type TYPE, size_t size) -- Enumeration: dico_buffer_type `dico_buffer_none' `dico_buffer_line' `dico_buffer_full' -- Function: off_t dico_stream_seek ( dico_stream_t STREAM, off_t OFFSET, int WHENCE) `DICO_SEEK_SET' `DICO_SEEK_CUR' `DICO_SEEK_END' -- Function: int dico_stream_size (dico_stream_t STREAM, off_t *PSIZE) -- Function: int dico_stream_read_unbuffered ( dico_stream_t STREAM, void *BUF, size_t SIZE, size_t *PREAD) -- Function: int dico_stream_write_unbuffered ( dico_stream_t STREAM, const void *BUF, size_t SIZE, size_t *PWRITE) -- Function: int dico_stream_read ( dico_stream_t STREAM, void *BUF, size_t SIZE, size_t *PREAD) -- Function: int dico_stream_readln ( dico_stream_t STREAM, char *BUF, size_t SIZE, size_t *PREAD) -- Function: int dico_stream_getdelim ( dico_stream_t STREAM, char **PBUF, size_t *PSIZE, int DELIM, size_t *PREAD) -- Function: int dico_stream_getline ( dico_stream_t STREAM, char **PBUF, size_t *PSIZE, size_t *PREAD) -- Function: int dico_stream_write ( dico_stream_t STREAM, const void *BUF, size_t SIZE) -- Function: int dico_stream_writeln ( dico_stream_t STREAM, const char *BUF, size_t SIZE) -- Function: int dico_stream_ioctl ( dico_stream_t STREAM, int CODE, void *PTR) -- Function: const char * dico_stream_strerror ( dico_stream_t STREAM, int RC) -- Function: int dico_stream_last_error (dico_stream_t STREAM) -- Function: void dico_stream_clearerr (dico_stream_t STREAM) -- Function: int dico_stream_eof (dico_stream_t STREAM) -- Function: int dico_stream_flush (dico_stream_t STREAM) -- Function: int dico_stream_close (dico_stream_t STREAM) -- Function: void dico_stream_destroy (dico_stream_t *STREAM) -- Function: off_t dico_stream_bytes_in (dico_stream_t STREAM) -- Function: off_t dico_stream_bytes_out (dico_stream_t STREAM)  File: dico.info, Node: url, Next: utf8, Prev: stream, Up: Libdico D.9 url ======= ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- struct: dico_url #define DICO_REQUEST_DEFINE 0 #define DICO_REQUEST_MATCH 1 struct dico_request { int type; char *word; char *database; char *strategy; unsigned long n; }; struct dico_url { char *string; char *proto; char *host; int port; char *path; char *user; char *passwd; dico_assoc_list_t args; struct dico_request req; }; -- Pointer: dico_url_t -- Function: int dico_url_parse (dico_url_t *PURL, const char *STR) -- Function: void dico_url_destroy (dico_url_t *PURL) -- Function: const char * dico_url_get_arg ( dico_url_t URL, const char *ARGNAME) -- Function: char * dico_url_full_path (dico_url_t URL)  File: dico.info, Node: utf8, Next: util, Prev: url, Up: Libdico D.10 UTF-8 ========== ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- Function: size_t utf8_char_width (const unsigned char *CP) -- Function: size_t utf8_strlen (const char *STR) -- struct: utf8_iterator struct utf8_iterator { char *string; char *curptr; unsigned curwidth; }; -- Function: int utf8_iter_isascii (struct utf8_iterator ITR) -- Function: int utf8_iter_end_p (struct utf8_iterator *ITR) -- Function: int utf8_iter_first (struct utf8_iterator *ITR, unsigned char *PTR) -- Function: int utf8_iter_next (struct utf8_iterator *ITR) -- Function: int utf8_mbtowc_internal (void *DATA, int (*READ) (void*), unsigned int *PWC) -- Function: int utf8_wctomb (unsigned char *R, unsigned int WC) -- Function: int utf8_symcmp (unsigned char *A, unsigned char *B) -- Function: int utf8_symcasecmp (unsigned char *A, unsigned char *B) -- Function: int utf8_strcasecmp (unsigned char *A, unsigned char *B) -- Function: int utf8_strncasecmp (unsigned char *A, unsigned char *B, size_t MAXLEN) -- Function: unsigned utf8_wc_toupper (unsigned WC) -- Function: int utf8_toupper (char *S, size_t LEN) -- Function: unsigned utf8_wc_tolower (unsigned WC) -- Function: int utf8_tolower (char *S, size_t LEN) -- Function: size_t utf8_wc_strlen (const unsigned *S) -- Function: unsigned * utf8_wc_strdup (const unsigned *S) -- Function: size_t utf8_wc_hash_string (const unsigned *WS, size_t N_BUCKETS) -- Function: int utf8_wc_strcmp (const unsigned *A, const unsigned *B) -- Function: int utf8_wc_to_mbstr (const unsigned *WORDBUF, size_t WORDLEN, char *S, size_t SIZE) -- Function: int utf8_mbstr_to_wc (const char *STR, unsigned **WPTR) -- Function: int utf8_mbstr_to_norm_wc (const char *STR, unsigned **WPTR) -- Function: int dico_levenshtein_distance (const char *A, const char *B, int FLAGS) `DICO_LEV_NORM' `DICO_LEV_DAMERAU' -- Function: int dico_soundex (const char *S, char CODESTR[DICO_SOUNDEX_SIZE]) -- Define: DICO_SOUNDEX_SIZE 5  File: dico.info, Node: util, Next: xlat, Prev: utf8, Up: Libdico D.11 util ========= ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- Function: char * dico_full_file_name (const char *DIR, const char *FILE) -- Function: size_t dico_trim_nl (char *BUF) -- Function: size_t dico_trim_ws (char *BUF)  File: dico.info, Node: xlat, Prev: util, Up: Libdico D.12 xlat ========= ================================================================== *Editor's note:* The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised. ================================================================== -- struct: xlat_tab struct xlat_tab { char *string; int num; }; -- Function: int xlat_string (struct xlat_tab *TAB, const char *STRING, size_t LEN, int FLAGS, int *RESULT) -- Function: int xlat_c_string (struct xlat_tab *TAB, const char *STRING, int FLAGS, int *RESULT); `XLAT_ICASE'  File: dico.info, Node: Copying This Manual, Next: Concept Index, Prev: Libdico, Up: Top Appendix E GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. dico-2.2/doc/dico.info-2000066400000000000000000001441631172612674100150120ustar00rootroot00000000000000This is dico.info, produced by makeinfo version 4.13 from /home/gray/src/dico/doc/dico.texi. INFO-DIR-SECTION Dictionary START-INFO-DIR-ENTRY * Dico: (dico). A modular dictionary server package. * dicod: (dico) Dicod. Dictionary server program. * dico: (dico) dico client. Dictionary client program. END-INFO-DIR-ENTRY Published by the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover, and no Back-Cover texts. A copy of the license is included in the section entitled "GNU Free Documentation License". De'die' a` la me'moire de Jacques Brel.  File: dico.info, Node: Concept Index, Prev: Copying This Manual, Up: Top Concept Index ************* This is a general index of all issues discussed in this manual. [index] * Menu: * #include: Pragmatic Comments. (line 12) * #include_once: Pragmatic Comments. (line 31) * #line: Pragmatic Comments. (line 36) * % formats: Access Log. (line 21) * --with-wordnet, configure option.: wordnet. (line 16) * --without-guile, configuration option: Guile Support. (line 12) * --without-preprocessor, configuration option: Default Preprocessor. (line 25) * --without-python, configuration option: Python Support. (line 10) * -E, introduced: Configuration. (line 20) * .dico: Initialization File. (line 6) * .dico_history: History Commands. (line 6) * .dicologin: Autologin. (line 35) * /etc/ld.so.conf: Handlers. (line 75) * __init__ on DictionaryClass: Dictionary Class. (line 9) * access control lists: ACL. (line 6) * access log: Access Log. (line 6) * access-log-file: Access Log. (line 11) * access-log-format: Access Log. (line 19) * acl: ACL. (line 11) * ACL: ACL. (line 6) * alias: Command Aliases. (line 11) * all: ACL. (line 36) * all, a strategy: Available Strategies. (line 94) * allow: ACL. (line 25) * Ambrose Bierce: outline. (line 44) * anon-group: SASL. (line 49) * Apache: Access Log. (line 6) * article: Overview. (line 6) * AUTH: AUTH. (line 12) * authenticated: ACL. (line 39) * authentication <1>: Autologin. (line 6) * authentication: Authentication. (line 6) * authentication database: Authentication. (line 21) * authentication database configuration: Authentication. (line 89) * authentication database definition: Authentication. (line 89) * authentication database URL: Authentication. (line 33) * authentication database, text: text userdb. (line 6) * authentication resource: Authentication. (line 76) * autologin: Program Settings. (line 9) * autologin feature: Autologin. (line 6) * autologin file: Autologin. (line 35) * block statement: Statements. (line 126) * boolean value: Statements. (line 26) * call_data: Key. (line 22) * capability: Capabilities. (line 10) * CLIENT: CLIENT. (line 7) * close: Server Commands. (line 25) * close on DictionaryClass: Dictionary Class. (line 17) * close-db: Guile API. (line 42) * closure: Strategies. (line 43) * command: Handlers. (line 23) * command line options: Dicod Invocation. (line 6) * Comments in a configuration file: Comments. (line 6) * comments, pragmatic: Pragmatic Comments. (line 6) * compare_count on DictionaryClass: Dictionary Class. (line 44) * config, --config option, introduced: Configuration. (line 6) * config, --config option, summary: Dicod Invocation. (line 14) * config-help, --config-help option, introduced: Configuration. (line 25) * config-help, --config-help option, summary: Dicod Invocation. (line 92) * configuration file: Configuration. (line 6) * configuration file statements: Statements. (line 6) * connection-acl: Security Settings. (line 10) * content-transfer-encoding: Databases. (line 79) * content-type: Databases. (line 69) * credentials: Autologin. (line 6) * current_markup: Dico Python Primitives. (line 55) * daemon operation mode: Daemon Mode. (line 6) * database <1>: Database and Strategy. (line 6) * database <2>: dictorg. (line 65) * database <3>: Databases. (line 9) * database: Overview. (line 6) * database description: Overview. (line 21) * database handler, defined: Handlers. (line 10) * database layer: Intro. (line 6) * database module, defined: Handlers. (line 6) * database name: Overview. (line 21) * database visibility: Database Visibility. (line 6) * database, authentication: Authentication. (line 21) * databases, defining: Databases. (line 6) * dbdir <1>: gcide. (line 17) * dbdir: dictorg. (line 28) * debug: guile. (line 35) * debug, --debug option, summary: Dicod Invocation. (line 75) * Default preprocessor: Default Preprocessor. (line 6) * default searches: Strategies and Default Searches. (line 6) * default strategy: Overview. (line 82) * default, autologin keyword: Autologin. (line 59) * default-strategy: General Settings. (line 86) * DEFAULT_DICT_SERVER: Default Server. (line 6) * DEFAULT_PREPROCESSOR: Default Preprocessor. (line 6) * DEFINE: DEFINE. (line 9) * define, --define option, summary: Dicod Invocation. (line 8) * define-word: Guile API. (line 94) * define_word on DictionaryClass: Dictionary Class. (line 29) * deny: ACL. (line 28) * deny-all: Strategies and Default Searches. (line 28) * deny-length-eq: Strategies and Default Searches. (line 48) * deny-length-ge: Strategies and Default Searches. (line 44) * deny-length-gt: Strategies and Default Searches. (line 41) * deny-length-le: Strategies and Default Searches. (line 38) * deny-length-lt: Strategies and Default Searches. (line 35) * deny-length-ne: Strategies and Default Searches. (line 51) * deny-word: Strategies and Default Searches. (line 31) * descr <1>: Strategies. (line 27) * descr <2>: DicoStrategy. (line 13) * descr: Guile API. (line 51) * descr on DictionaryClass: Dictionary Class. (line 20) * description: Databases. (line 33) * description, database: Overview. (line 21) * Devil's Dictionary: outline. (line 44) * devils.out: outline. (line 44) * Dico overview: Intro. (line 6) * dico, a program: dico client. (line 6) * dico-key->word: Dico Scheme Primitives. (line 13) * dico-key?: Dico Scheme Primitives. (line 10) * dico-make-key: Dico Scheme Primitives. (line 16) * dico-register-strat: Dico Scheme Primitives. (line 36) * dico-strat-default?: Dico Scheme Primitives. (line 32) * dico-strat-description: Dico Scheme Primitives. (line 29) * dico-strat-name: Dico Scheme Primitives. (line 26) * dico-strat-select?: Dico Scheme Primitives. (line 22) * dico-strat-selector?: Dico Scheme Primitives. (line 19) * dico_argcv_free: argcv. (line 28) * dico_argcv_get: argcv. (line 18) * dico_argcv_get_n: argcv. (line 20) * dico_argcv_get_np: argcv. (line 23) * dico_argcv_quote_char: argcv. (line 34) * dico_argcv_quote_copy: argcv. (line 42) * dico_argcv_quoted_length: argcv. (line 37) * dico_argcv_quoting_style: argcv. (line 13) * dico_argcv_remove: argcv. (line 45) * dico_argcv_string: argcv. (line 26) * dico_argcv_unquote_char: argcv. (line 32) * dico_argcv_unquote_copy: argcv. (line 40) * dico_argv_free: argcv. (line 30) * dico_assoc_add: assoc. (line 25) * dico_assoc_create: assoc. (line 20) * dico_assoc_destroy: assoc. (line 22) * dico_assoc_find: assoc. (line 28) * dico_assoc_list_t: assoc. (line 18) * dico_assoc_remove: assoc. (line 31) * dico_base64_decode: filter. (line 32) * dico_base64_encode: filter. (line 36) * dico_base64_input: filter. (line 28) * dico_base64_stream_create: filter. (line 23) * dico_buffer_type: stream. (line 55) * DICO_CAPA_DEFAULT: dico_database_module. (line 27) * dico_capabilities: dico_database_module. (line 27) * dico_close: dico_database_module. (line 103) * dico_codec_stream_create: filter. (line 20) * dico_compare_count: dico_database_module. (line 170) * dico_database_module, a structure: dico_database_module. (line 6) * dico_db_descr: dico_database_module. (line 122) * dico_db_info: dico_database_module. (line 112) * dico_define: dico_database_module. (line 142) * dico_die: diag. (line 46) * DICO_EXPORT: dico_database_module. (line 6) * dico_free_db: dico_database_module. (line 88) * dico_free_result: dico_database_module. (line 176) * dico_full_file_name: util. (line 14) * dico_get_default_strategy: strat. (line 37) * dico_init: dico_database_module. (line 42) * dico_init_db: dico_database_module. (line 63) * dico_invocation_name: diag. (line 31) * dico_iterator_create: lists. (line 59) * dico_iterator_current: lists. (line 57) * dico_iterator_destroy: lists. (line 61) * dico_iterator_first: lists. (line 63) * dico_iterator_next: lists. (line 65) * dico_iterator_remove_current: lists. (line 67) * dico_iterator_set_data: lists. (line 70) * dico_iterator_t: lists. (line 15) * dico_key: Key. (line 6) * dico_key_deinit: Key. (line 46) * dico_key_init: Key. (line 37) * dico_key_match: Key. (line 56) * dico_key_t: Key. (line 6) * dico_levenshtein_distance: utf8. (line 73) * dico_list_append: lists. (line 35) * dico_list_comp_t: lists. (line 20) * dico_list_count: lists. (line 33) * dico_list_create: lists. (line 23) * dico_list_destroy: lists. (line 26) * dico_list_insert_sorted: lists. (line 41) * dico_list_intersect: lists. (line 44) * dico_list_intersect_p: lists. (line 47) * dico_list_item: lists. (line 31) * dico_list_iterate: lists. (line 29) * dico_list_iterator_t: lists. (line 17) * dico_list_locate: lists. (line 52) * dico_list_pop: lists. (line 49) * dico_list_prepend: lists. (line 37) * dico_list_push: lists. (line 38) * dico_list_remove: lists. (line 55) * dico_list_t: lists. (line 13) * dico_log: diag. (line 43) * dico_log_printer_t: diag. (line 36) * dico_log_stream_create: diag. (line 50) * dico_match: dico_database_module. (line 133) * DICO_MODULE_VERSION: dico_database_module. (line 22) * dico_open: dico_database_module. (line 95) * dico_opt_type: parseopt. (line 17) * dico_option: parseopt. (line 36) * DICO_OPTSTR: parseopt. (line 49) * dico_output_result <1>: Output. (line 6) * dico_output_result: dico_database_module. (line 150) * dico_parseopt: parseopt. (line 52) * dico_program_name: diag. (line 29) * dico_qp_decode: filter. (line 40) * dico_qp_encode: filter. (line 44) * dico_qp_stream_create: filter. (line 26) * dico_result_count: dico_database_module. (line 165) * dico_result_headers: dico_database_module. (line 182) * DICO_SELECT_BEGIN <1>: Selector. (line 38) * DICO_SELECT_BEGIN: Key. (line 22) * DICO_SELECT_BEGIN, Python: Dico Python Primitives. (line 36) * DICO_SELECT_END <1>: Selector. (line 46) * DICO_SELECT_END: Key. (line 22) * DICO_SELECT_END, Python: Dico Python Primitives. (line 40) * DICO_SELECT_RUN <1>: Selector. (line 54) * DICO_SELECT_RUN: Key. (line 56) * DICO_SELECT_RUN, Python: Dico Python Primitives. (line 46) * dico_select_t: Strategies. (line 31) * dico_set_default_strategy: strat. (line 35) * dico_set_log_printer: diag. (line 38) * dico_set_program_name: diag. (line 33) * dico_soundex: utf8. (line 79) * DICO_SOUNDEX_SIZE: utf8. (line 80) * dico_str_to_diag_level: diag. (line 48) * dico_strategy_add: strat. (line 26) * dico_strategy_count: strat. (line 33) * dico_strategy_dup: strat. (line 22) * dico_strategy_find: strat. (line 24) * dico_strategy_is_default_p: strat. (line 39) * dico_strategy_iterate: strat. (line 31) * dico_strategy_iterator: strat. (line 28) * dico_stream_bytes_in: stream. (line 116) * dico_stream_bytes_out: stream. (line 118) * dico_stream_clearerr: stream. (line 106) * dico_stream_close: stream. (line 112) * dico_stream_create: stream. (line 14) * dico_stream_destroy: stream. (line 114) * dico_stream_eof: stream. (line 108) * dico_stream_flush: stream. (line 110) * dico_stream_getdelim: stream. (line 87) * dico_stream_getline: stream. (line 90) * dico_stream_ioctl: stream. (line 99) * dico_stream_last_error: stream. (line 104) * dico_stream_open: stream. (line 21) * dico_stream_read: stream. (line 81) * dico_stream_read_unbuffered: stream. (line 75) * dico_stream_readln: stream. (line 84) * dico_stream_seek: stream. (line 64) * dico_stream_set_buffer: stream. (line 54) * dico_stream_set_close: stream. (line 42) * dico_stream_set_destroy: stream. (line 45) * dico_stream_set_error_string: stream. (line 51) * dico_stream_set_flush: stream. (line 39) * dico_stream_set_ioctl: stream. (line 48) * dico_stream_set_open: stream. (line 24) * dico_stream_set_read: stream. (line 33) * dico_stream_set_seek: stream. (line 27) * dico_stream_set_size: stream. (line 30) * dico_stream_set_write: stream. (line 36) * dico_stream_size: stream. (line 72) * dico_stream_strerror: stream. (line 102) * dico_stream_write <1>: stream. (line 93) * dico_stream_write: Output. (line 38) * dico_stream_write_unbuffered: stream. (line 78) * dico_stream_writeln <1>: stream. (line 96) * dico_stream_writeln: Output. (line 43) * dico_trim_nl: util. (line 16) * dico_trim_ws: util. (line 18) * dico_url: url. (line 13) * dico_url_destroy: url. (line 41) * dico_url_full_path: url. (line 46) * dico_url_get_arg: url. (line 44) * dico_url_parse: url. (line 39) * dico_url_t: url. (line 37) * dico_version: dico_database_module. (line 22) * dico_vlog: diag. (line 41) * dicod, description: Dicod. (line 6) * dicod, operation modes: Dicod. (line 10) * dicod.conf: Configuration. (line 6) * DICT protocol: Intro. (line 6) * dict server, default: Default Server. (line 6) * dictorg database declaration: dictorg. (line 55) * dictorg database format: Intro. (line 20) * dictorg handler definition: dictorg. (line 18) * dictorg initialization options: dictorg. (line 28) * dictorg module: dictorg. (line 6) * disable-mechanism: SASL. (line 30) * distance: Database and Strategy. (line 43) * distance, Levenshtein: Available Strategies. (line 40) * dlev, a strategy: Available Strategies. (line 63) * enable-mechanism: SASL. (line 33) * escape sequence: Statements. (line 34) * exact, a strategy: Available Strategies. (line 10) * FILTER_DECODE: filter. (line 9) * FILTER_ENCODE: filter. (line 7) * filter_stream_create: filter. (line 17) * filter_xcode_t: filter. (line 11) * first, a strategy: Available Strategies. (line 108) * flags: Key. (line 31) * foreground, --foreground option, introduced: Daemon Mode. (line 38) * foreground, --foreground option, summary: Dicod Invocation. (line 18) * free_result on DictionaryClass: Dictionary Class. (line 51) * GCIDE: gcider. (line 6) * gcide: Intro. (line 32) * gcide module: gcide. (line 6) * gcider: gcider. (line 6) * GNU Collaborative International Dictionary of English <1>: gcider. (line 6) * GNU Collaborative International Dictionary of English <2>: gcide. (line 6) * GNU Collaborative International Dictionary of English: Intro. (line 32) * group <1>: ACL. (line 42) * group: Server Settings. (line 17) * group-resource: Authentication. (line 80) * gsasl: SASL. (line 6) * Guile: guile. (line 6) * Guile API: Guile API. (line 6) * guile module: guile. (line 6) * Guile strategy and key functions: Dico Scheme Primitives. (line 6) * guile, configuration: Guile Support. (line 6) * handler: Databases. (line 17) * has_selector: DicoStrategy. (line 16) * headword: Overview. (line 6) * HELP: HELP. (line 7) * help: Other Commands. (line 23) * help, --help option, summary: Dicod Invocation. (line 101) * help-text: General Settings. (line 64) * here-document: Statements. (line 74) * history: History Commands. (line 12) * host, autologin keyword: Autologin. (line 104) * hostname: General Settings. (line 33) * ident-keyfile: Server Settings. (line 116) * ident-timeout: Server Settings. (line 120) * identity-check: Server Settings. (line 111) * idxdir: gcide. (line 36) * inactivity-timeout: Server Settings. (line 98) * include-dir, --include-dir option, summary: Dicod Invocation. (line 42) * index-cache-size: gcide. (line 40) * index-program: gcide. (line 47) * inetd operation mode: Inetd Mode. (line 6) * inetd, --inetd option, introduced: Inetd Mode. (line 6) * inetd, --inetd option, summary: Dicod Invocation. (line 71) * inetd.conf: Inetd Mode. (line 6) * info <1>: Informational Commands. (line 29) * info <2>: Guile API. (line 64) * info: Databases. (line 46) * info on DictionaryClass: Dictionary Class. (line 23) * information, database: Overview. (line 21) * init file: Initialization File. (line 6) * init-args: guile. (line 24) * init-fun <1>: Guile Initialization. (line 13) * init-fun: guile. (line 24) * init-script <1>: Guile Initialization. (line 13) * init-script: guile. (line 24) * init-script=: python. (line 24) * initial-banner-text: General Settings. (line 10) * initialization file: Initialization File. (line 6) * invocation: Dicod Invocation. (line 6) * is_default: Strategies. (line 46) * key (a Scheme object) functions: Dico Scheme Primitives. (line 6) * lang: Guile API. (line 77) * lang on DictionaryClass: Dictionary Class. (line 26) * last, a strategy: Available Strategies. (line 112) * ld: Informational Commands. (line 21) * LD_LIBRARY_PATH: Handlers. (line 75) * ldap module: ldap. (line 6) * lev, a strategy: Available Strategies. (line 37) * Levenshtein distance: Available Strategies. (line 40) * libWN: wordnet. (line 12) * lint, --lint option, introduced: Configuration. (line 15) * lint, --lint option, summary: Dicod Invocation. (line 96) * list: Statements. (line 114) * listen: Server Settings. (line 45) * load path: Handlers. (line 61) * load-module: Handlers. (line 16) * load-module, shortcut form: Handlers. (line 44) * load-path: guile. (line 41) * load-path=: python. (line 19) * log-facility: Logging and Debugging. (line 14) * log-print-severity: Logging and Debugging. (line 19) * log-tag: Logging and Debugging. (line 10) * LOG_FACILITY: Other Settings. (line 6) * logging requests: Access Log. (line 6) * logging, configuration: Logging and Debugging. (line 6) * login, autologin keyword: Autologin. (line 76) * ls: Informational Commands. (line 6) * LTDL_LIBRARY_PATH: Handlers. (line 73) * m4: Preprocessor. (line 6) * machine, autologin keyword: Autologin. (line 55) * MATCH: MATCH. (line 11) * match-word: Guile API. (line 101) * match_word on DictionaryClass: Dictionary Class. (line 33) * max-children: Server Settings. (line 93) * mechanisms, autologin keyword: Autologin. (line 91) * merge-defs: wordnet. (line 80) * mode: Server Settings. (line 31) * module load path: Handlers. (line 61) * module-load-path: Handlers. (line 93) * Modules: Modules. (line 6) * multi-line comments: Comments. (line 14) * name <1>: Strategies. (line 21) * name <2>: DicoStrategy. (line 10) * name: Databases. (line 13) * name, database: Overview. (line 21) * ndlev, a strategy: Available Strategies. (line 77) * nlev, a strategy: Available Strategies. (line 57) * no-preprocessor, --no-preprocessor option, introduced: Configuration. (line 20) * no-preprocessor, --no-preprocessor option, summary: Dicod Invocation. (line 39) * no-transcript, --no-transcript option, summary: Dicod Invocation. (line 66) * noauth, autologin keyword: Autologin. (line 82) * nodebug: guile. (line 38) * nosasl, autologin keyword: Autologin. (line 88) * noshow-dictorg-entries: dictorg. (line 70) * nosort: dictorg. (line 70) * notrim-ws: dictorg. (line 70) * nprefix module: nprefix. (line 6) * nprefix, a strategy: Available Strategies. (line 16) * open: Server Commands. (line 6) * open on DictionaryClass: Dictionary Class. (line 13) * open-db: Guile API. (line 17) * operation modes of dicod: Daemon Mode. (line 6) * OPTION MIME: OPTION. (line 10) * option, authentication: Authentication. (line 67) * options: Authentication. (line 68) * options, dicod.: Dicod Invocation. (line 6) * outline dictionary: outline. (line 18) * outline mode: outline. (line 11) * outline module: outline. (line 6) * output <1>: Output. (line 6) * output: Guile API. (line 120) * output on DictionaryClass: Dictionary Class. (line 38) * PAGER: Pager. (line 6) * pager: Pager. (line 6) * PAM: pam. (line 6) * pam module: pam. (line 6) * password, autologin keyword: Autologin. (line 79) * password-resource: Authentication. (line 77) * Patrick J. Cassidy: Intro. (line 32) * pcre module: pcre. (line 6) * pcre, a strategy: Available Strategies. (line 90) * Perl-compatible regular expressions: pcre. (line 6) * pidfile: Server Settings. (line 79) * pos: wordnet. (line 55) * pp-setup: Preprocessor. (line 17) * pragmatic comments: Pragmatic Comments. (line 6) * prefix: Other Commands. (line 6) * prefix, a strategy: Available Strategies. (line 13) * prepend-load-path: Handlers. (line 99) * preprocessor: Preprocessor. (line 6) * preprocessor, --preprocessor option, summary: Dicod Invocation. (line 32) * preprocessor, default: Default Preprocessor. (line 6) * prompt: Other Commands. (line 14) * protocol layer: Intro. (line 6) * Python: python. (line 6) * python module: python. (line 6) * python, configuration: Python Support. (line 6) * quiet: Program Settings. (line 20) * QUIT: QUIT. (line 7) * quit: Other Commands. (line 39) * quoted string: Statements. (line 34) * re, a strategy: Available Strategies. (line 82) * realm: SASL. (line 46) * realm, autologin keyword: Autologin. (line 101) * regexp, a strategy: Available Strategies. (line 87) * regexp, Perl-compatible: pcre. (line 6) * register_markup: Dico Python Primitives. (line 52) * register_strat: Dico Python Primitives. (line 7) * resource, authentication: Authentication. (line 76) * restart procedure: Daemon Mode. (line 20) * restarting dicod: Daemon Mode. (line 20) * result-count: Guile API. (line 116) * result_count on DictionaryClass: Dictionary Class. (line 41) * result_headers on DictionaryClass: Dictionary Class. (line 48) * RFC 2229: Intro. (line 6) * root-class=: python. (line 29) * sasl: SASL. (line 10) * SASL: SASL. (line 6) * sasl, autologin keyword: Autologin. (line 85) * Scheme: guile. (line 6) * Scheme strategy and key functions: Dico Scheme Primitives. (line 6) * sel: Strategies. (line 31) * select: Selector. (line 25) * select on DicoStrategy: DicoStrategy. (line 22) * server-info: General Settings. (line 42) * service: SASL. (line 43) * service, autologin keyword: Autologin. (line 97) * SHOW DATABASES: SHOW. (line 11) * SHOW DB: SHOW. (line 10) * SHOW INFO: SHOW. (line 40) * SHOW SERVER: SHOW. (line 57) * SHOW STRAT: SHOW. (line 25) * SHOW STRATEGIES: SHOW. (line 26) * show-dictorg-entries: dictorg. (line 31) * show-sys-info: Security Settings. (line 24) * shutdown-timeout: Server Settings. (line 107) * SIGHUP: Daemon Mode. (line 14) * SIGHUP handling: Daemon Mode. (line 20) * SIGINT: Daemon Mode. (line 14) * signals handled by dicod: Daemon Mode. (line 14) * SIGQUIT: Daemon Mode. (line 14) * SIGTERM: Daemon Mode. (line 14) * simple statements: Statements. (line 6) * single query mode: Single Query Mode. (line 6) * single-line comments: Comments. (line 6) * single-process, --single-process option, summary: Dicod Invocation. (line 47) * sort: dictorg. (line 40) * soundex, a strategy: Available Strategies. (line 30) * source-info, --source-info option, summary: Dicod Invocation. (line 81) * statement, block: Statements. (line 126) * statement, simple: Statements. (line 6) * statements, configuration file: Statements. (line 6) * STATUS: STATUS. (line 7) * stderr, --stderr option, introduced: Daemon Mode. (line 38) * stderr, --stderr option, summary: Dicod Invocation. (line 22) * strat: Key. (line 28) * stratall module: stratall. (line 6) * stratcl: Strategies. (line 50) * strategy <1>: Database and Strategy. (line 35) * strategy <2>: Strategies and Default Searches. (line 21) * strategy: Overview. (line 70) * strategy functions, Guile: Dico Scheme Primitives. (line 6) * strategy functions, Scheme: Dico Scheme Primitives. (line 6) * strategy, default: Overview. (line 82) * string, quoted: Statements. (line 34) * string, unquoted: Statements. (line 30) * substr module: substr. (line 6) * substr, a strategy: Available Strategies. (line 100) * suffix, a strategy: Available Strategies. (line 27) * suppress-pr: gcide. (line 53) * syslog, --syslog option, summary: Dicod Invocation. (line 25) * system information: Security Settings. (line 28) * terminating dicod: Daemon Mode. (line 27) * termination procedure: Daemon Mode. (line 27) * text authentication database: text userdb. (line 6) * tilde expansion: Program Settings. (line 9) * time formats, for --time-format option: Time and Date Formats. (line 6) * timing: Tuning. (line 12) * trace-grammar, --trace-grammar option, summary: Dicod Invocation. (line 84) * trace-lex, --trace-lex option, summary: Dicod Invocation. (line 88) * transcript <1>: Session Transcript. (line 6) * transcript: Logging and Debugging. (line 23) * transcript, --transcript option, summary: Dicod Invocation. (line 55) * trim-ws: dictorg. (line 48) * two-layer model: Intro. (line 6) * URL, authentication database: Authentication. (line 33) * URL, using to query DICT server: urls. (line 6) * usage, --usage option, summary: Dicod Invocation. (line 105) * user: Server Settings. (line 9) * user-db: Authentication. (line 31) * utf8_char_width: utf8. (line 13) * utf8_iter_end_p: utf8. (line 26) * utf8_iter_first: utf8. (line 29) * utf8_iter_isascii: utf8. (line 24) * utf8_iter_next: utf8. (line 31) * utf8_iterator: utf8. (line 17) * utf8_mbstr_to_norm_wc: utf8. (line 70) * utf8_mbstr_to_wc: utf8. (line 67) * utf8_mbtowc_internal: utf8. (line 34) * utf8_strcasecmp: utf8. (line 42) * utf8_strlen: utf8. (line 15) * utf8_strncasecmp: utf8. (line 45) * utf8_symcasecmp: utf8. (line 40) * utf8_symcmp: utf8. (line 38) * utf8_tolower: utf8. (line 53) * utf8_toupper: utf8. (line 49) * utf8_wc_hash_string: utf8. (line 60) * utf8_wc_strcmp: utf8. (line 62) * utf8_wc_strdup: utf8. (line 57) * utf8_wc_strlen: utf8. (line 55) * utf8_wc_to_mbstr: utf8. (line 65) * utf8_wc_tolower: utf8. (line 51) * utf8_wc_toupper: utf8. (line 47) * utf8_wctomb: utf8. (line 36) * version: Other Commands. (line 36) * version, --version option, summary: Dicod Invocation. (line 108) * virtual functions, guile module: Virtual Functions. (line 6) * visibility, database: Database Visibility. (line 6) * visibility-acl: Database Visibility. (line 21) * warranty: Other Commands. (line 36) * webalizer: Access Log. (line 127) * wn.h: wordnet. (line 16) * wnhome: wordnet. (line 37) * wnsearchdir: wordnet. (line 40) * word: Key. (line 19) * word module: word. (line 6) * word on DicoSelectionKey: DicoSelectionKey. (line 11) * word, a strategy: Available Strategies. (line 104) * wordnet: Intro. (line 27) * wordnet module: wordnet. (line 6) * XIDLE: Extended Commands. (line 10) * xlat_c_string: xlat. (line 22) * xlat_string: xlat. (line 20) * xlat_tab: xlat. (line 13) * XLEV: Extended Commands. (line 29) * XVERSION: Extended Commands. (line 21) dico-2.2/doc/dico.texi000066400000000000000000006107361172612674100146750ustar00rootroot00000000000000\input texinfo @c -*-texinfo-*- @smallbook @c %**start of header @setfilename dico.info @settitle GNU Dico Manual @c %**end of header @setchapternewpage odd @defcodeindex pr @defcodeindex op @defcodeindex kw @defcodeindex fl @syncodeindex fn cp @syncodeindex vr cp @syncodeindex ky cp @syncodeindex pg cp @syncodeindex tp cp @syncodeindex op cp @syncodeindex pr cp @syncodeindex kw cp @syncodeindex fl cp @include version.texi @include rendition.texi @include macros.texi @ifinfo @dircategory Dictionary @direntry * Dico: (dico). A modular dictionary server package. * dicod: (dico) Dicod. Dictionary server program. * dico: (dico) dico client. Dictionary client program. @end direntry @end ifinfo @copying Published by the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Copyright @copyright{} 2008, 2010, 2012 Sergey Poznyakoff Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover, and no Back-Cover texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end copying @titlepage @title GNU Dico Manual @subtitle version @value{VERSION}, @value{UPDATED} @author Sergey Poznyakoff. @page @vskip 0pt plus 1filll @insertcopying @end titlepage @headings off @ifnothtml @page @w{ } @sp 9 @end ifnothtml @quotation @i{D@'edi@'e @`a la m@'emoire de Jacques Brel.} @end quotation @w{ } @page @w{ } @page @headings on @ifnothtml @page @summarycontents @end ifnothtml @page @contents @ifnottex @node Top @top Dico Manual This edition of the @cite{GNU Dico Manual}, last updated @value{UPDATED}, documents Dico Version @value{VERSION}. @end ifnottex @menu * Preface:: * Overview:: * Intro:: Introduction to Dico. * Building:: Building the Package. * Dicod:: The dicod daemon. * Modules:: Dicod modules shipped with Dico. * Interface:: How to write your own Dico module. * dico client:: The client program. * gcider:: A window-based browser for GCIDE. * Reporting Bugs:: How to Report a Bug. Appendices * Available Strategies:: * Dictionary Server Protocol:: * Time and Date Formats:: * Libdico:: * Copying This Manual:: The GNU Free Documentation License. * Concept Index:: Index of Concepts. @detailmenu --- The Detailed Node Listing --- Building the Package * Default Preprocessor:: * Default Server:: * Guile Support:: * Python Support:: * Other Settings:: The @command{dicod} daemon. * Daemon Mode:: * Inetd Mode:: * Configuration:: * Exit Codes:: * Dicod Invocation:: Configuration * Syntax:: Configuration file syntax. * Server Settings:: * Authentication:: * SASL:: SASL Authentication. * ACL:: Access Control Lists * Security Settings:: * Logging and Debugging:: * Access Log:: * General Settings:: * Capabilities:: * Handlers:: * Databases:: * Strategies and Default Searches:: * Tuning:: * Command Aliases:: * Preprocessor:: Using preprocessor to improve the configuration. Configuration File Syntax * Comments:: * Pragmatic Comments:: * Statements:: Authentication * text userdb:: Flat Text Databases. * ldap userdb:: LDAP Databases. Databases * Database Visibility:: Modules * outline:: * dictorg:: * gcide:: * wordnet:: * guile:: * python:: * stratall:: * substr:: * word:: * nprefix:: * pcre:: * ldap:: * pam:: @command{Gcide} * idxgcide:: @command{Guile} * Virtual Functions:: * Guile Initialization:: * Guile API:: * Dico Scheme Primitives:: * Example Module:: Dico Module Interface * dico_database_module:: * Strategies:: * Output:: Strategies * Key:: * Selector:: Dico --- a client program. * Single Query Mode:: * Interactive Mode:: * Initialization File:: * Autologin:: * Dico invocation:: Single Query Mode * dico options:: * urls:: Interactive Mode * Server Commands:: * Database and Strategy:: * Informational Commands:: * History Commands:: * Pager:: * Program Settings:: * Session Transcript:: * Other Commands:: * Command Summary:: Dictionary Server Protocol * Initial Reply:: * Standard Commands:: * Extended Commands:: Standard Commands * DEFINE:: * MATCH:: * SHOW:: * OPTION:: * AUTH:: * CLIENT:: * STATUS:: * HELP:: * QUIT:: The Libdico Library * strat:: * argcv:: * lists:: * assoc:: * diag:: * filter:: * parseopt:: * stream:: * url:: * utf8:: * util:: * xlat:: @end detailmenu @end menu @node Preface @unnumbered Preface A @dfn{dictionary server} is a program that provides dictionary services to other computers using the client-server model. The dictionary services include listing the available databases, searching for a specific term in one or more databases, displaying the definitions found, etc. GNU Dico is an implementation of dictionary server, which supports a wide variety of database formats and is easily extensible using several scripting languages. Apart from the server, the package contains a console dictionary client and a window-based browser for GCIDE dictionary. @node Overview @chapter Overview @cindex database @cindex headword @cindex article A dictionary server operates on a set of @dfn{databases}. Each database contains a set of @dfn{headwords} with corresponding @dfn{articles}, therefore it can be regarded as a dictionary, in which articles supply definitions (or translations) for headwords. The server offers facilities for searching headwords in the databases and for fetching articles from them. This chapter provides an overview of the dictionary protocol and defines basic terms and notions used throughout this manual. When describing the protocol, the following typographic conventions are used: the data sent by the client are prefixed with @samp{C:} and the data sent in response by the server are prefixed with @samp{S:}. @cindex name, database @cindex database name @cindex information, database @cindex database description @cindex description, database @cindex database description Each database has a unique name -- a string of characters that serves to identify this particular database in a set of available databases. Two more pieces of textual data are associated with a database. The @dfn{database information} string (or @dfn{info}, for short), supplies a short description of the database. It is a sentence, tersely describing the database, e.g.@: @samp{English-German Dictionary}. The @dfn{database description} provides a full description of the dictionary, with author credits and copyright information. The length of this description is not limited. Both pieces of information can be requested by the remote user. The command @code{SHOW DB} lists all available databases along with their descriptions: @example C: SHOW DB S: 110 3 databases present S: jargon "Jargon File (4.3.1, 29 Jun 2001)" S: deu-eng "German-English Freedict dictionary" S: en-pl-naut "English-Polish dictionary of nautical terms" S: . S: 250 ok @end example Each line of output lists a name of the dictionary, and the corresponding description. The @code{SHOW INFO} command displays full information about a database, whose name is given as its argument: @example C: SHOW INFO en-pl-naut S: 112 information for en-pl-naut S: English-Polish dictionary of nautical terms S: S: Permission is granted to copy, distribute and/or modify S: this document under the terms of the GNU Free Docu- S: mentation License, Version 1.2 or any later version S: published by the Free Software Foundation; with no S: Invariant Sections, no Front-Cover and Back-Cover Texts S: . S: 250 ok @end example A definition for any given headword can be requested using the @code{DEFINE} command. It takes two arguments, the name of the database and the headword to look for in that database, e.g.: @example DEFINE en-pl-naut sprit @end example If the headword is found in the database, its definition is displayed, otherwise a diagnostic message is returned, telling that the headword was not found. @cindex strategy A special mechanism is provided for looking up the headword in a database (or databases). The @code{MATCH} command returns headwords that match a given string (a @dfn{search key}) using a particular @dfn{strategy}. In other words, a strategy identifies the algorithm for comparing two strings: a headword and the search key. A strategy is identified by its name. For example, the strategy @samp{exact} means literal comparison and returns only those headwords that match the key exactly. The strategy @samp{prefix} matches word prefixes. These two strategies are always present. Depending on the configuration, the server may offer other strategies as well. @xref{Available Strategies}, for a complete list of strategies implemented in GNU Dico @value{VERSION}. @anchor{default strategy} @cindex default strategy @cindex strategy, default One of the strategies is selected as a @dfn{default strategy}. Usually such strategy tolerates possible typing errors and allows the user to find matching headwords even if he does not know exactly how the word in question is spelled. The default strategy is denoted as @samp{.} (a dot). The @code{MATCH} command takes three arguments: the name of the database to search, the strategy and the search key. For example: @example S: MATCH wn prefix sail C: 152 4 matches found: list follows C: wn "sail" C: wn "sail through" C: wn "sailboat" C: wn "sailcloth" C: . C: 250 Ok @end example Two database names are special. The @samp{*} means search in all databases and return all matches. The @samp{!} means search in all databases until the match is found in one of them and return only matches from that particular database. These are basic facilities provided by the DICT protocol. For a complete and detailed description of the protocol, see @ref{Dictionary Server Protocol}. @node Intro @chapter Introduction to GNU Dico @cindex Dico overview @cindex two-layer model @cindex protocol layer @cindex database layer @cindex RFC 2229 @cindex DICT protocol GNU Dico is an implementation of @acronym{DICT} dictionary server (described in @acronym{RFC} 2229) and a set of accompanying utilities. The GNU Dico server uses two-layer model. The @dfn{protocol layer} is responsible for the correct @acronym{DICT} protocol dialog and is provided by the @command{dicod} server binary. The @dfn{database layer} is responsible for searching and retrieving data from dictionary databases. This layer is provided by external @dfn{loadable modules}. Thus, Dico does not impose any specific dictionary database format. A single server can handle databases in various formats, provided that appropriate modules are available. Several database modules are shipped with GNU Dico. The following is a short introductions for some of them. @xref{Modules}, for a complete list of available modules with detailed descriptions. @table @asis @item dictorg @cindex dictorg database format This module provides full support for the format designed by the @cite{@acronym{DICT} development group} (@uref{http://dict.org}). This is a @i{de facto} standard for @acronym{DICT} databases. A number of dictionary databases in this format are provided by the @cite{FreeDict} project (@uref{http://freedict.org}). @item wordnet @cindex wordnet Support for @samp{WordNet} databases. WordNet is a lexical database for the English language developed in the Princeton University and distributed under a BSD style license. @item gcide @cindex gcide @cindex GNU Collaborative International Dictionary of English @cindex Patrick J.@: Cassidy Support for @samp{GNU Collaborative International Dictionary of English}. This dictionary derived from Webster's Revised Unabridged Dictionary, supplemented with some of the definitions from WordNet. It was edited by Patrick J.@: Cassidy, proof-read and supplemented by volunteers from around the world. It is available from @uref{http://gcide.gnu.org.ua}. @item guile This module provides an interface to Guile, the @dfn{GNU's Ubiquitous Intelligent Language for Extensions} (@uref{http://www.gnu.org/software/guile}) and allows you to write Dico modules in Scheme programming language. @item python This module provides an interface to Python (@uref{http://www.python.org}) and can be used to write Dico modules in it. @item outline This module handles simple databases in GNU Emacs @dfn{outline} format. It is designed mostly for test purposes. @end table This manual describes how to configure and use the Dico dictionary system. It also describes the @acronym{API} for writing Dico modules in @acronym{C}, @acronym{Scheme} or Python. @node Building @chapter Building the Package Building Dico is quite straightforward. You run @command{./configure}, then @command{make}, followed by @command{make install}, and you are done. Actions the @command{configure} script performs are controlled by a set of command line options and variables. Some of these options are generic, i.e. common for all packages using the GNU @command{autoconf} system. For a detailed description of these option see the @file{INSTALL} file shipped with the sources. Yet another options are specific for Dico. We will describe them in this chapter. @menu * Default Preprocessor:: * Default Server:: * Guile Support:: * Python Support:: * Other Settings:: @end menu @node Default Preprocessor @section Default Preprocessor @cindex Default preprocessor @cindex preprocessor, default @vrindex DEFAULT_PREPROCESSOR The runtime configuration system uses @command{m4} to preprocess the configuration file (@pxref{Preprocessor}), which makes the configuration extremely flexible. We recommend to use GNU m4 as a preprocessor@footnote{@uref{http://www.gnu.org/software/m4}}. However, any other implementation of @command{m4} can be used as well. The @command{configure} script tries to determine full file name of the preprocessor binary and the necessary command line options. In case it makes a wrong guess, you can instruct it to use a particular preprocessor by using @env{DEFAULT_PREPROCESSOR} configuration variable. For example, the following @command{configure} invocation instructs it to use @command{/usr/local/bin/gm4}: @example $ ./configure DEFAULT_PREPROCESSOR="/usr/local/bin/gm4 -s" @end example Note the use of the @option{-s} preprocessor option. It instructs @command{m4} to produce line directives which help @command{dicod} produce correct diagnostics about eventual configuration errors. Unless your @command{m4} implementation does not have this feature, we recommend to always use it in @env{DEFAULT_PREPROCESSOR} value. @opindex --without-preprocessor, configuration option Finally, if you do not wish to use preprocessor at all, you can disable it using @option{--without-preprocessor} option to @command{configure}. @node Default Server @section Default Server @cindex dict server, default @vrindex DEFAULT_DICT_SERVER Unless given an explicit dictionary server, the @command{dico} client program attempts to connect to the server @indicateurl{dict://dico.gnu.org.ua}. You may change this default by defining the @env{DEFAULT_DICT_SERVER} variable. For example, the following command line selects @samp{dict.org} as the default server: $ ./configure DEFAULT_DICT_SERVER=dict.org The value of the @env{DEFAULT_DICT_SERVER} variable can be either a hostname or IP address of the server. It can also be followed by a colon and a port specification, either as a decimal number or as a service name from @file{/etc/services}. @node Guile Support @section Guile Support @cindex guile, configuration The @dfn{GNU's Ubiquitous Intelligent Language for Extensions}, or @dfn{Guile}@footnote{@uref{http://www.gnu.org/software/guile}.} can be used to write database modules for GNU Dico. This requires Guile version 1.8.4 or newer. The @command{configure} script will probe for the presence of Guile on your system and automatically enable its use if its version number is high enough. @opindex --without-guile, configuration option If you do not wish to use Guile, use @option{--without-guile} to disable it. @node Python Support @section Python Support @cindex python, configuration The support for Python (@uref{http://www.python.org}) is enabled automatically if @command{configure} detects that Python version 2.5 or later is installed on your machine. @opindex --without-python, configuration option If you do not wish to use Python, use @option{--without-python} to disable it. @node Other Settings @section Other Configure Settings @vrindex LOG_FACILITY The @command{dicod} daemon uses @command{syslogd} for diagnostics. The default syslog facility can be set using @env{LOG_FACILITY} configuration variable. Its allowed arguments are @samp{user}, @samp{daemon}, @samp{auth}, @samp{authpriv}, @samp{mail}, @samp{cron}, and @samp{local0} through @samp{local7}. Case is not significant. In addition, these words can be prefixed with @samp{log_}. By default, the @samp{daemon} facility is used. @node Dicod @chapter The @command{dicod} daemon. @cindex @command{dicod}, description The main component of GNU Dico is the @command{dicod} daemon. It is responsible for serving client requests and for coordinating the work of dictionary modules. @cindex @command{dicod}, operation modes There are two @dfn{operation modes}: @samp{daemon} and @samp{inetd}. @menu * Daemon Mode:: * Inetd Mode:: * Configuration:: * Exit Codes:: * Dicod Invocation:: @end menu @node Daemon Mode @section Daemon Operation Mode @cindex operation modes of @command{dicod} @cindex daemon operation mode The @samp{daemon} mode is enabled by @code{mode daemon} statement in the configuration file (@pxref{mode statement}). It is also the default mode. In daemon mode @command{dicod} listens for incoming requests on one or several network interfaces. Unless the @command{--foreground} option is specified, it detaches itself from the controlling terminal and switches to background (becomes a @dfn{daemon}). When an incoming connection arrives, it forks a subprocess for handling it. @cindex signals handled by @command{dicod} @cindex SIGTERM @cindex SIGQUIT @cindex SIGINT @cindex SIGHUP In this mode the following signals cause @command{dicod} to terminate: @samp{SIGTERM}, @samp{SIGQUIT}, and @samp{SIGINT}. The @samp{SIGHUP} signal causes the program to restart. This works only if both the program name and its configuration file name (if given using @option{--config} option) are absolute file names. @cindex SIGHUP handling @cindex restart procedure @cindex restarting @command{dicod} Upon receiving @samp{SIGHUP}, @command{dicod} first verifies if the configuration file does not contain fatal errors. To do that, the program executes a copy of itself with the @option{--lint} option (@pxref{--lint}) and analyzes its return code. Only if this check passes, @command{dicod} restarts itself. This ensures that the daemon will not terminate due to unnoticed errors in its configuration file. @cindex termination procedure @cindex terminating @command{dicod} Upon receiving @samp{SIGTERM}, @samp{SIGQUIT}, or @samp{SIGINT}, the program stops accepting incoming requests and sends the @samp{SIGTERM} signal to all active subprocesses. Then it waits a predefined amount of time for all processes to terminate (@pxref{shutdown-timeout}). Any subprocesses that do not terminate after this time are sent the @samp{SIGKILL} signal. Then, the database modules are unloaded and @command{dicod} terminates. Several command line options are provided that modify the behavior of @command{dicod} in this mode. These options are mainly designed for debugging and error-hunting purposes. @xopindex{foreground, introduced} @xopindex{stderr, introduced} The @option{--foreground} option instructs the server to remain attached to the controlling terminal and stay in the foreground. It is often used with @option{--stderr} option, which instructs @command{dicod} to output all diagnostic to the standard error output, instead of syslog which is used by default. @node Inetd Mode @section Inetd Operation Mode @cindex inetd operation mode @xopindex{inetd, introduced} @flindex inetd.conf In @samp{inetd} operation mode @command{inetd} receives requests from standard input and sends its replies to the standard output. This mode is enabled by @code{mode inetd} statement (@pxref{mode statement}) in configuration file, or by the @option{--inetd} command line option (@pxref{--inetd}). This mode is usually used when invoking @command{dicod} from @file{inetd.conf} file, as in example below: @example dict stream tcp nowait nobody /usr/bin/dicod --inetd @end example @node Configuration @section Configuration @cindex configuration file @flindex dicod.conf @xopindex{config, introduced} Upon startup, @command{dicod} reads its settings and database definitions from a @dfn{configuration file} @file{dicod.conf}. By default it is located in @var{$sysconfidr} (i.e., in most cases @file{/usr/local/etc}, or @file{/etc}), but an alternative location may be specified using the @option{--config} command line option (@pxref{--config}). If any errors are encountered in the configuration file, the program reports them on the standard error and exits with a non-zero status. @xopindex{lint, introduced} To test the configuration file without starting the server, use the @option{--lint} (@option{-t}) command line option. It causes @command{dicod} to check its configuration file and exit with status 0 if no errors were detected, and with status 1 otherwise. @opindex -E, introduced @xopindex{no-preprocessor, introduced} Before parsing, the configuration file is preprocessed using @command{m4} (@pxref{Preprocessor}). To examine the preprocessed configuration without actually parsing it, use the @option{-E} command line option. To avoid preprocessing it, use the @option{--no-preprocessor} option. @xopindex{config-help, introduced} The rest of this section describes configuration file syntax in detail. You can receive a concise summary of all configuration directives any time by running @command{dicod --config-help}. @menu * Syntax:: Configuration file syntax. * Server Settings:: * Authentication:: * SASL:: SASL Authentication. * ACL:: Access Control Lists * Security Settings:: * Logging and Debugging:: * Access Log:: * General Settings:: * Capabilities:: * Handlers:: * Databases:: * Strategies and Default Searches:: * Tuning:: * Command Aliases:: * Preprocessor:: Using preprocessor to improve the configuration. @end menu @node Syntax @subsection Configuration File Syntax A @command{dicod} configuration consists of statements and comments. There are three classes of lexical tokens: keywords, values, and separators. Blanks, tabs, newlines and comments, collectively called @dfn{white space} are ignored except as they serve to separate tokens. Some white space is required to separate otherwise adjacent keywords and values. @menu * Comments:: * Pragmatic Comments:: * Statements:: @end menu @node Comments @subsubsection Comments @cindex Comments in a configuration file @cindex single-line comments @dfn{Comments} may appear anywhere where white space may appear in the configuration file. There are two kinds of comments: single-line and multi-line comments. @dfn{Single-line} comments start with @samp{#} or @samp{//} and continue to the end of the line: @example # This is a comment // This too is a comment @end example @cindex multi-line comments @dfn{Multi-line} or @dfn{C-style} comments start with the two characters @samp{/*} (slash, star) and continue until the first occurrence of @samp{*/} (star, slash). Multi-line comments cannot be nested. @node Pragmatic Comments @subsubsection Pragmatic Comments @cindex comments, pragmatic @cindex pragmatic comments Pragmatic comments are similar to usual comments, except that they cause some changes in the way the configuration is parsed. Pragmatic comments begin with a @samp{#} sign and end with the next physical newline character. As of GNU Dico version @value{VERSION}, the following pragmatic comments are understood: @table @code @kwindex #include @item #include <@var{file}> @itemx #include @var{file} Include the contents of the @var{file}. If @var{file} is an absolute file name, both forms are equivalent. Otherwise, the form with angle brackets searches for the file in the @dfn{include search path}, while the second one looks for it in the current working directory first, and, if not found there, in the include search path. The default include search path is: @enumerate 1 @item @file{@var{prefix}/share/dico/@value{VERSION}/include} @item @file{@var{prefix}/share/dico/include} @end enumerate @noindent where @var{prefix} is the installation prefix. New directories can be appended in front of it using @option{-I} (@option{--include-dir}) command line option (@pxref{--include-dir}). @kwindex #include_once @item #include_once <@var{file}> @itemx #include_once @var{file} Same as @code{#include}, except that, if the @var{file} has already been included, it will not be included again. @kwindex #line @item #line @var{num} @itemx #line @var{num} "@var{file}" This line causes @command{dicod} to believe, for purposes of error diagnostics, that the line number of the next source line is given by @var{num} and the current input file is named by @var{file}. If the latter is absent, the remembered file name does not change. @item # @var{num} "@var{file}" This is a special form of @code{#line} statement, understood for compatibility with the @sc{c} preprocessor. @end table In fact, these statements provide a rudimentary preprocessing features. For more sophisticated ways to modify configuration before parsing, see @ref{Preprocessor}. @node Statements @subsubsection Statements @cindex statements, configuration file @cindex configuration file statements @cindex statement, simple @cindex simple statements A @dfn{simple statement} consists of a keyword and a value separated by any amount of whitespace. It is terminated with a semicolon (@samp{;}), unless the value is a @dfn{here-document} (see below), in which case semicolon is optional. Examples of simple statements: @example timing yes; access-log-file /var/log/access_log; @end example A @dfn{keyword} begins with a letter and may contain letters, decimal digits, underscores (@samp{_}) and dashes (@samp{-}). Examples of keywords are: @samp{group}, @samp{identity-check}. A @dfn{value} can be one of the following: @table @asis @item number A number is a sequence of decimal digits. @item boolean @cindex boolean value A boolean value is one of the following: @samp{yes}, @samp{true}, @samp{t} or @samp{1}, meaning @dfn{true}, and @samp{no}, @samp{false}, @samp{nil}, @samp{0} meaning @dfn{false}. @item unquoted string @cindex string, unquoted An unquoted string may contain letters, digits, and any of the following characters: @samp{_}, @samp{-}, @samp{.}, @samp{/}, @samp{@@}, @samp{*}, @samp{:}. @item quoted string @cindex quoted string @cindex string, quoted @cindex escape sequence A quoted string is any sequence of characters enclosed in double-quotes (@samp{"}). A backslash appearing within a quoted string introduces an @dfn{escape sequence}, which is replaced with a single character according to the following rules: @float Table, backslash-interpretation @caption{Backslash escapes} @multitable @columnfractions 0.30 .5 @item Sequence @tab Replaced with @item \a @tab Audible bell character (@acronym{ASCII} 7) @item \b @tab Backspace character (@acronym{ASCII} 8) @item \f @tab Form-feed character (@acronym{ASCII} 12) @item \n @tab Newline character (@acronym{ASCII} 10) @item \r @tab Carriage return character (@acronym{ASCII} 13) @item \t @tab Horizontal tabulation character (@acronym{ASCII} 9) @item \v @tab Vertical tabulation character (@acronym{ASCII} 11) @item \\ @tab A single backslash (@samp{\}) @item \" @tab A double-quote. @end multitable @end float In addition, the sequence @samp{\@var{newline}} is removed from the string. This allows you to split long strings over several physical lines, e.g.: @example @group "a long string may be\ split over several lines" @end group @end example If the character following a backslash is not one of those specified above, the backslash is ignored and a warning is issued. Two or more adjacent quoted strings are concatenated, which gives another way to split long strings over several lines to improve readability. For instance, the following fragment produces the same result as the example above: @example @group "a long string may be" " split over several lines" @end group @end example @anchor{here-document} @item Here-document @cindex here-document A @dfn{here-document} is a special construct that allows the user to introduce strings of text containing embedded newlines. The @code{<<@var{word}} construct instructs the parser to read all the following lines up to the line containing only @var{word}, with possible trailing blanks. Any lines thus read are concatenated together into a single string. For example: @example @group < <1645.1212874507@@example.net> C: client "Kdict" S: 250 ok C: show db S: 110 16 databases present S: afr-deu "Afrikaans-German Freedict dictionary" S: afr-eng "Afrikaans-English FreeDict Dictionary" [...] S: . S: 250 ok @end example (The first line is split in two to fit in the printed page width.) This option produces lots of output and can significantly slow down the server. Use it only if you are debugging @command{dicod} or some remote client. Never use it in a production environment. @end deffn @node Access Log @subsection Access Log @cindex access log @cindex logging requests @cindex Apache GNU Dico provides a feature similar to Apache's @code{CustomLog}, which keeps a log of @code{MATCH} and @code{DEFINE} requests. To enable this feature, specify the name of the log file using the following directive: @deffn {Configuration} access-log-file @var{string} Sets access log file name. @example access-log-file /var/log/dico/access.log; @end example @end deffn The format of log file entries is defined via the @code{access-log-format} directive: @deffn {Configuration} access-log-format @var{string} Sets format string for access log file. @end deffn @cindex % formats Its argument can contain literal characters, which are copied into the log file verbatim, and @dfn{format specifiers}, i.e. special sequences which begin with @samp{%} and are replaced in the log file as shown in the table below. @table @code @item %% The percent sign. @item %a Remote @acronym{IP}-address. @item %A Local @acronym{IP}-address. @item %B Size of response in bytes. @item %b Size of response in bytes in @acronym{CLF} format, i.e. a @samp{-} rather than a @samp{0} when no bytes are sent. @item %C Remote client (from @code{CLIENT} command (@pxref{CLIENT}). @item %D The time taken to serve the request, in microseconds. @item %d Request command verb in abbreviated form, suitable for use in @acronym{URL}s, i.e.@: @samp{d} for @code{DEFINE}, and @samp{m} for @code{MATCH}. @xref{urls}. @item %h Remote host. @item %H Request command verb (@code{DEFINE} or @code{MATCH}). @item %l Remote logname (from identd, if supplied). This will return a dash unless @code{identity-check} is set to true. @xref{identity-check}. @item %m The search strategy. @item %p The canonical port of the server serving the request. @item %P The @acronym{PID} of the child that serviced the request. @item %q The database from the request. @item %r Full request. @item %@{@var{n}@}R The @var{n}th token from the request (@var{n} is 0-based). @item %s Reply status. For multiple replies, the form @samp{%s} returns the status of the first reply, while @samp{%>s} returns that of the last reply. @item %t Time the request was received in the standard Apache format, e.g.: @example [04/Jun/2008:11:05:22 +0300] @end example @item %@{@var{format}@}t The time, in the form given by @var{format}, which should be a valid @code{strftime} format. @xref{Time and Date Formats}, for a detailed description. The standard @samp{%t} format is equivalent to @example [%d/%b/%Y:%H:%M:%S %z] @end example @item %T The time taken to serve the request, in seconds. @item %u Remote user from @code{AUTH} command. @item %v The host name of the server serving the request. @xref{hostname directive}. @item %V Actual host name of the server (in case it was overridden in configuration). @item %W The word from the request. @end table For the reference, here is the list of format specifiers that have different meaning than in Apache: @samp{%C}, @samp{%H}, @samp{%m}, @samp{%q}. The following format specifiers are unique to @command{dicod}: @samp{%d}, @samp{%@{@var{n}@}R}, @samp{%V}, @samp{%W}. The absence of @code{access-log-format} directive is equivalent to the following statement: @example access-log-format "%h %l %u %t \"%r\" %>s %b"; @end example @cindex webalizer It was chosen so as to be compatible with Apache access logs and be easily parsable by existing log analyzing tools, such as @command{webalizer}. Extending this format string with the client name produces a log format similar to Apache @samp{combined log}: @example access-log-format "%h %l %u %t \"%r\" %>s %b \"\" \"%C\""; @end example @node General Settings @subsection General Settings Settings described in this subsection configure the basic behavior of the @acronym{DICT} daemon. @deffn {Configuration} initial-banner-text @var{string} Display the @var{string} in the textual part of the initial server reply. @anchor{initial reply} When connection is established, the server sends an @dfn{initial reply} to the client, that looks like in the example below: @example 220 example.org <520.1212912026@@example.org> @end example @xref{Initial Reply}, for a detailed description of its parts. The part of this reply after the host name is modifiable and can contain arbitrary text. You can use @code{initial-banner-text} to append any additional information there. Note, that @var{string} may not contain newlines or angle brackets. For example: @example initial-banner-text "Please authenticate yourself,"; @end example This statement produces the following initial reply (split over two lines for readability): @example 220 example.org Please authenticate yourself, <520.1212912026@@Texample.org> @end example @end deffn @anchor{hostname directive} @deffn {Configuration} hostname @var{string} Sets the hostname. By default, the server determines it automatically. If, however, it makes a wrong guess, you can fix it using this directive. The server hostname is used, among others, in the initial reply after @samp{220} code (see above) and may also be displayed in the access log file using the @samp{%v} escape (@pxref{Access Log}). @end deffn @deffn {Configuration} server-info @var{string} Sets the server description to be shown in reply to @code{SHOW SERVER} (@pxref{SHOW, SHOW SERVER}) command. The first line of the reply, after the usual @samp{114} response line, shows the name of host where the server is running. If the settings of @code{show-sys-info} (@pxref{Security Settings, show-sys-info}) permit, some additional information about the system is printed. The lines that follow are taken from the @code{server-info} directive. It is common to specify @var{string} using ``here-document'' syntax (@pxref{here-document}), e.g.: @example server-info < if you have questions or suggestions. EOT; @end example @end deffn @deffn {Configuration} help-text @var{string} Sets the text to be displayed in reply to the @acronym{HELP} command. The default reply to @acronym{HELP} command displays a list of commands understood by the server with a short description of each. If the @var{string} begins with a plus sign, it will be appended to the default reply: @example help-text <<-EOT + The commands beginning with an X are extensions. EOT; @end example If the @var{string} begins with any other character, except @samp{+}, it will replace the default help output. For example: @example help-text <<-EOT There is no help. See RFC 2229 for detailed information. EOT; @end example @end deffn @deffn {Configuration} default-strategy @var{string} Sets the name of the default matching strategy (@pxref{MATCH}). By default, Levenshtein matching is used, which is equivalent to @example default-strategy lev; @end example @end deffn @node Capabilities @subsection Server Capabilities @dfn{Capabilities} are certain server features that can be enabled or disabled at the system administrator's will. @deffn {Configuration} capability @var{list} Requests additional capabilities from the @var{list}. @end deffn The argument to @code{capability} directive must contain names of existing @command{dicod} capabilities. These are listed in the following table: @table @asis @item auth The @code{AUTH} command is supported. @xref{Authentication}. @item mime The @code{OPTION MIME} command is supported. Notice that @acronym{RFC} 2229 requires all servers to support that command, so you should always specify this capability. @item xversion The @code{XVERSION} command is supported. It is a GNU extension that displays the @command{dicod} implementation and version number. @xref{Extended Commands, XVERSION}. @item xlev The @code{XLEV} command is supported. This command allows the remote party to set and query maximal Levenshtein distance for @code{lev} matching strategy. @xref{MATCH, strategy}. @xref{Extended Commands, XLEV}. @end table The capabilities set using this directive are displayed in the initial server reply (@pxref{initial reply}), and their descriptions are added to the @code{HELP} command output (unless specified otherwise by the @code{help} statement). @node Handlers @subsection Database Modules and Handlers @cindex database module, defined A @dfn{database module} is an external piece of software designed to handle a particular format of dictionary databases. This piece of software is built as a shared library that @command{dicod} loads at run time. @cindex database handler, defined A @dfn{handler} is an instance of the database module loaded by @command{dicod} and configured for a specific database or a set of databases. Database handlers are defined using the following block statement: @deffn {Configuration} load-module @var{string} @{ @dots{} @} Create an instance of a database module. The argument specifies a unique name which will be used by subsequent parts of the configuration to refer to this handler. The ellipsis in the description above represents sub-statements. As of Dico version @value{VERSION} only one sub-statement is defined: @deffn {load-module config} command @var{string} Sets the command line for this handler. It is similar to the shell's command line in that it consists of a name of database module, optionally followed by a whitespace-separated list of its arguments. The name of the module specifies the disk file to load (see below for a detailed description of the loading sequence). Both command name and arguments are passed to the module @dfn{initialization function} (@pxref{dico_init}). @end deffn @end deffn For example: @example @group load-module dict @{ command "dictorg dbdir=/var/dicodb"; @} @end group @end example @noindent This statement defines a handler named @samp{dict}, which loads the module @file{dictorg} and passes its initialization function a single argument, @samp{dbdir=/var/dicodb}. If the module name is not an absolute file name, as in this example, the loadable module will be searched in the module load path. @cindex load-module, shortcut form A common case is when the module does not require initialization arguments and its command string is the same as its name, e.g.: @example @group load-module outline @{ command "outline"; @} @end group @end example The configuration syntax provides a shortcut for such usage: @example load-module outline; @end example If @code{load-module} is used this way, it accepts a single string or a list of strings as its argument. In the latter case, it loads all modules listed in the argument. For example: @example load-module (stratall,substr,word); @end example @cindex module load path @cindex load path A @dfn{module load path} is an internal list of directories which @command{dicod} scans in order to find a loadable file name specified in the @code{command} statement. By default the search order is as follows: @enumerate 1 @item Optional @dfn{prefix} search directories specified by the @code{prepend-load-path} directive (see below). @item GNU Dico module directory: @file{$prefix/lib/dico}. @item Additional search directories specified by the @code{module-load-path} directive (see below). @item @vrindex LTDL_LIBRARY_PATH The value of the environment variable @env{LTDL_LIBRARY_PATH}. @item @flindex /etc/ld.so.conf @vrindex LD_LIBRARY_PATH The system dependent library search path (e.g. on GNU/Linux it is defined by the file @file{/etc/ld.so.conf} and the environment variable @env{LD_LIBRARY_PATH}). @end enumerate The value of @env{LTDL_LIBRARY_PATH} and @env{LD_LIBRARY_PATH} must be a colon-separated list of absolute directory names, for example @samp{/usr/lib/mypkg:/lib/foo}. In any of these directories, @command{dicod} first attempts to find and load the given filename. If this fails, it tries to append the following suffixes to it: @enumerate 1 @item the libtool archive suffix @samp{.la} @item the suffix used for native dynamic libraries on the host platform, e.g., @samp{.so}, @samp{.sl}, etc. @end enumerate @deffn {Configuration} module-load-path @var{list} This directive adds the directories listed in its argument to the module load path. Example: @example module-load-path (/usr/lib/dico,/usr/local/dico/lib); @end example @end deffn @deffn {Configuration} prepend-load-path @var{list} Same as @code{module-load-path}, but adds directories to the beginning of the module load path. @end deffn @node Databases @subsection Databases @cindex databases, defining Dictionary databases are defined using the @code{database} block statement. @deffn {Configuration} database @{ @var{statements} @} Defines a dictionary database. At least two sub-statements must be defined for each database: @code{name} and @code{handler}. @end deffn @deffn {Database} name @var{string} Sets the name of this database (a single word). This name will be used to identify this database in @acronym{DICT} commands. @end deffn @deffn {Database} handler @var{string} Specifies the handler name for this database and any arguments for it. This handler must be previously defined using the @code{load-module} statement (@pxref{Handlers}). @end deffn For example, the following fragment defines a database named @samp{en-de}, which is handled by @samp{dictord} handler. The handler is passed one argument, @code{database=en-de}: @example database @{ name "en-de"; handler "dictorg database=en-de"; @} @end example More directives are available to fine-tune the database. @deffn {Database} description @var{string} Supplies a short description, to be shown in reply to @command{SHOW DB} command. The @var{string} may not contain new-lines. Use this statement if the database itself does not supply a description, or if its description is malformed. In any case, if the @code{description} directive is specified, its value takes precedence over the description string retrieved from the database itself. @xref{SHOW, SHOW DB}, for a description of @code{SHOW DB} command. @end deffn @deffn {Database} info @var{string} Supplies a full description of the database. This description is shown in reply to @code{SHOW INFO} (@pxref{SHOW, SHOW INFO}) command. The @var{string} is usually a multi-line text, so it is common to use here-document syntax (@pxref{here-document}), e.g.: @example @group info <<- EOT This is a foo-bar dictionary. Copyright (C) 2008 foo-bar dict group. Distributed under the terms of GNU Free Documentation license. EOT; @end group @end example Use this statement if the database itself does not supply a full description, or if its full description is malformed. As with @code{description}, the value of @code{info} takes precedence over info strings retrieved from the database. @end deffn The following two directives control the content type and transfer encoding used when formatting replies from this database if @code{OPTION MIME} (@pxref{OPTION, OPTION MIME}) is in effect: @deffn {Database} content-type @var{string} Sets the content type of the reply. E.g.: @example directory @{ name "foo"; handler "dictorg"; content-type "text/html"; ... @} @end example @end deffn @deffn {Database} content-transfer-encoding @var{enum} Sets transfer encoding to use when sending @acronym{MIME} replies for this database. Allowed values for @var{enum} are: @table @asis @item base64 Use @acronym{BASE64} encoding. @item quoted-printable Use quoted-printable encoding. @end table @end deffn @menu * Database Visibility:: @end menu @node Database Visibility @subsubsection Database Visibility @cindex database visibility @cindex visibility, database A property called @dfn{database visibility} is associated with each dictionary database. It determines whether the database appears in the output of @code{SHOW DB} command, and takes part in dictionary searches. By default, all databases are defined as publicly visible. You can, however, limit their visibility on global as well as on per-directory basis. This can be achieved using @dfn{visibility @acronym{ACL}s}. In general, the visibility of a database is controlled by two access control lists: a global visibility @acronym{ACL} and a database visibility @acronym{ACL}. The latter takes precedence over the former. Both @acronym{ACL}s are defined using the @code{visibility-acl} statement: @deffn {Configuration} visibility-acl @var{acl-name} Sets name of the @acronym{ACL} that controls the database visibility. When used in global scope, this statement sets the global visibility @acronym{ACL}. If used within a @code{database} block, it sets the visibility @acronym{ACL} for that particular database. @end deffn Consider the following example: @example acl glob-vis @{ allow authenticated; deny all; @} acl local-nets @{ allow from (192.168.10.0/24, /tmp/dicod.sock); @} visibility-acl glob-vis; database @{ name "terms"; visibility-acl local-nets; @} @end example In this configuration, the @samp{terms} database is visible to everybody coming from the @samp{192.168.10.0/24} network and from the @acronym{UNIX} socket @file{/tmp/dicod.sock}, without authorization. It is not visible to users coming from elsewhere, unless they authenticate themselves. @node Strategies and Default Searches @subsection Strategies and Default Searches @cindex default searches A @dfn{default search} is a @code{MATCH} request with @samp{*} or @samp{!} as the database argument (@pxref{MATCH}). The former means search in all available databases, the latter means search in all databases until a match is found. Default searches may be quite expensive and may cause considerable strain on the server. For example, the command @code{MATCH * priefix ""} returns all entries from all available databases, which would consume a lot of resources both on the server and on the client side. To minimize harmful effects from such potentially dangerous requests, it is possible to limit the use of certain strategies in default searches. @deffn {Configuration} strategy @var{name} @{ @var{statements} @} Restricts the use of the strategy @var{name} in default searches. @end deffn The @var{statements} define conditions the 4th argument of a @code{MATCH} command must match in order to deny the request. The following statements are defined: @deffn {Configuration} deny-all @var{bool} Unconditionally deny this strategy in default searches. @end deffn @deffn {Configuration} deny-word @var{list} Deny this strategy if the search word matches one of the words from @var{list}. @end deffn @deffn {Configuration} deny-length-lt @var{number} Deny if length of the search word is less than @var{number}. @end deffn @deffn {Configuration} deny-length-le @var{number} Deny if length of the search word is less than or equal to @var{number}. @end deffn @deffn {Configuration} deny-length-gt @var{number} Deny if length of the search word is greater than @var{number}. @end deffn @deffn {Configuration} deny-length-ge @var{number} Deny if length of the search word is greater than or equal to @var{number}. @end deffn @deffn {Configuration} deny-length-eq @var{number} Deny if length of the search word is equal to @var{number}. @end deffn @deffn {Configuration} deny-length-ne @var{number} Deny if length of the search word is not equal to @var{number}. @end deffn For example, the following statement denies the use of @samp{prefix} strategy in default searches if its argument is an empty string: @example strategy prefix @{ deny-length-eq 0; @} @end example If the @code{dicod} daemon is configured this way, it will always return a @samp{552} reply on commands @code{MATCH * prefix ""} or @code{MATCH ! prefix ""}. However, the use of empty prefix on a concrete database, as in @code{MATCH eng-deu prefix ""}, will still be allowed. @node Tuning @subsection Tuning While tuning your server, it is often necessary to get timing information which shows how much time is spent serving certain requests. This can be achieved using the @code{timing} configuration directive: @deffn {Configuration} timing @var{boolean} Provide timing information after successful completion of an operation. This information is displayed after the following requests: @code{MATCH}, @code{DEFINE}, and @code{QUIT}. It consists of the following parts: @example [d/m/c = @var{nd}/@var{nm}/@var{nc} @var{RT}r @var{UT}u @var{ST}s] @end example @noindent where: @table @var @item nd Number of processed define requests. It is @samp{0} after a @code{MATCH} request. @item nm Number of processed match requests. It is @samp{0} after a @code{DEFINE} request. @item nc Number of comparisons made. This value may be inaccurate if the underlying database module is not able to count comparisons. @item RT Real time spent serving the request. @item UT Time in user space spent serving the request. @item ST Time in kernel space spent serving the request. @end table An example of a server reply with timing information follows: @example 250 Done [d/m/c = 0/63/107265 2.293r 1.120u 0.010s] @end example @end deffn You can also add timing information to your access log files, see @ref{Access Log, %T}. @node Command Aliases @subsection Command Aliases @dfn{Aliases} allow a string to be substituted for a word when it is used as the first word of a command. The daemon maintains a list of aliases that are created using the @code{alias} configuration file statement: @deffn {Configuration} alias @var{word} @var{command} Creates a new alias. @end deffn Aliases are useful to facilitate manual interaction with the server, as they allow the administrator to create abbreviations for some frequently typed commands. For example, the following alias creates new command @code{d} which is equivalent to @code{DEFINE *}: @example alias d DEFINE "*"; @end example Aliases may be recursive, i.e. the first word of @var{command} may refer to another alias. For example: @example alias d DEFINE; alias da d "*"; @end example This configuration will produce the following expansion: @example da word @result{} DEFINE * word @end example To prevent endless loops, recursive expansion is stopped if the first word of the replacement text is identical to an alias expanded earlier. @node Preprocessor @subsection Using Preprocessor to Improve the Configuration. @cindex preprocessor @cindex m4 Before parsing its configuration file, @command{dicod} preprocesses it. The built-in preprocessor handles only file inclusion and @code{#line} statements (@pxref{Pragmatic Comments}), while the rest of traditional preprocessing facilities, such as macro expansion, is supported via @command{m4}, which is used as an external preprocessor. The detailed description of @command{m4} facilities lies far beyond the scope of this document. You will find a complete user manual in @ifnothtml @ref{Top, GNU M4 manual, GNU M4, m4, GNU M4 macro processor}. @end ifnothtml @ifhtml @uref{http://www.gnu.org/software/m4/manual}. @end ifhtml For the rest of this subsection we assume the reader is sufficiently acquainted with @command{m4} macro processor. @flindex pp-setup The external preprocessor is invoked with @option{-s} flag, instructing it to include line synchronization information in its output. This information is then used by the parser to display meaningful diagnostic. An initial set of macro definitions is supplied by the @file{pp-setup} file, located in @file{@var{$prefix}/share/dico/@var{version}/include} directory (where @var{version} means the version of GNU Dico package). The default @file{pp-setup} file renames all @command{m4} built-in macros so they all start with the prefix @samp{m4_}. This is similar to GNU m4 @option{--prefix-builtin} option, but has an advantage that it works with non-GNU @command{m4} implementations as well. As an example of how the use of preprocessor may improve @command{dicod} configuration, consider the following fragment taken from one of the installations of GNU Dico. This installation offers quite a few Freedict dictionaries. The database definition for each of them is almost the same, except for the dictionary name and eventual description entry for several databases that miss it. To avoid repeating the same text over again, we define the following macro: @example @group # defdb(@sc{name}[, @sc{descr}]) # @r{Produce a standard definition for a database @sc{name}}. # @r{If @sc{descr} is given, use it as a description}. m4_define(`defdb', ` database @{ name "$1"; handler "dictorg database=$1";m4_dnl m4_ifelse(`$2',,,` description "$2";') @} ') @end group @end example It takes two arguments. The first one, @sc{name}, defines the dictionary name visible in the output of @code{SHOW DB} command. Optional second argument may be used to supply a description string for the databases that miss it. Given this macro, the database definitions look like: @example @group defdb(eng-swa) defdb(swa-eng) defdb(afr-eng, Afrikaans-English Dictionary) defdb(eng-afr, English-Afrikaans Dictionary) @end group @end example @node Exit Codes @section Dicod Exit Codes Apart from issuing a descriptive error message, @command{dicod} attempts to indicate the reason of its termination by its error code. As usual, a zero exit code indicates normal termination. The table below summarizes all possible error codes. For each error code, it indicates its decimal value and its symbolic name from @file{include/sysexits.h} (if available). @table @asis @item 0 @itemx EX_OK Program terminated correctly. @item 2 Only child instances of @command{dicod} exit with this code. It indicates that the child did not receive any @samp{DICT} command within the time out interval (@pxref{inactivity-timeout}). @item 64 @itemx EX_USAGE The program was invoked incorrectly, e.g. an invalid option was given, or an erroneous argument was supplied to an option. @item 67 @item EX_NOUSER @command{Dicod} cannot switch to the privileges of the user it is configured to run as (@pxref{user statement}). @item 69 @itemx EX_UNAVAILABLE The server exited due to some error not otherwise described in this table. @item 70 @item EX_SOFTWARE Some internal software error occurred. @item 71 @itemx EX_OSERR Some system error occurred, e.g. the program ran out of memory, or file descriptors, or @samp{fork} failed, etc. @item 78 @itemx EX_CONFIG An error in the configuration file was detected. @end table @node Dicod Invocation @section Dicod Invocation @cindex invocation @cindex command line options @cindex options, @command{dicod}. This section summarizes @command{dicod} command line options. @table @option @opsummary{define} @item --define=@var{symbol}[=@var{value}] @itemx -D @var{symbol}[=@var{value}] Define the preprocessor symbol @var{symbol}. Optional @var{value} supplies the new symbol value. This option is passed to the preprocessor verbatim. @opsummary{config} @item --config=@var{file} Read this configuration file instead of the default @file{@var{$sysconfdir}/dicod.conf}. @xref{Configuration}. @opsummary{foreground} @item -f @itemx --foreground Operate in foreground. @xref{Daemon Mode}. @opsummary{stderr} @item --stderr Output the diagnostics to stderr. @xref{Daemon Mode, --stderr}. @opsummary{syslog} @item --syslog After successful startup, output any diagnostic to syslog. This is the default. @item -E Preprocess configuration file and exit. @xref{Preprocessor}. @opsummary{preprocessor} @item --preprocessor=@var{prog} Use @var{prog} as a preprocessor for configuration file. The default preprocessor command line is @command{m4 -s}, unless overridden while configuring the package (@pxref{Default Preprocessor}). @xref{Preprocessor}. @opsummary{no-preprocessor} @item --no-preprocessor Do not use external preprocessor. @xref{Preprocessor}. @opsummary{include-dir} @item -I @var{dir} @itemx --include-dir=@var{dir} Add the directory @var{dir} to the list of directories to be searched for preprocessor include files. @xref{Preprocessor}. @opsummary{single-process} @item -s @itemx --single-process In daemon mode, process connections in the main process, without starting subprocesses for each connection (@pxref{Daemon Mode}). This means that the daemon is able to serve only one client at a time. The @option{--single-process} option is provided for debugging purposes only. Never use it in production environment. @opsummary{transcript} @item -T @itemx --transcript Enable session transcript. This instructs @command{dicod} to log all commands it receives and all responses it sends during the session. Transcript is logged via the default logging channel (@pxref{Logging and Debugging}). If logging via syslog, the @samp{debug} priority is used. See also @ref{Session Transcript}, for a description of the similar mode in @command{dico}, the client program. @opsummary{no-transcript} @item --no-transcript Disable transcript mode. This is the default. Use this option if you wish to temporarily disable transcript mode, enabled in the configuration file (@pxref{Logging and Debugging, transcript}). @opsummary{inetd} @item -i @itemx --inetd Run in inetd mode. @xref{Inetd Mode}. @opsummary{debug} @item -x @itemx --debug=@var{level} Set debug verbosity level. The @var{level} argument is an integer ranging from @samp{0} (no debugging) to @samp{100} (maximum debugging information). @opsummary{source-info} @item --source-info Include source line information in the debugging output. @opsummary{trace-grammar} @item --trace-grammar Trace parsing of the config file. The option is provided for debugging purposes. @opsummary{trace-lex} @item --trace-lex Trace the configuration file lexer. The option is provided for debugging purposes. @opsummary{config-help} @item --config-help Show a summary of the configuration file syntax and allowed statements. @xref{Configuration}. @opsummary{lint} @item -t @itemx --lint Check configuration file syntax and exit with code @samp{0} if it is OK, or with @samp{78} if there are errors. @xref{Configuration}. @opsummary{help} @item -h @itemx --help Display a short command line option summary and exit. @opsummary{usage} @item --usage List all available command line options and exit. @opsummary{version} @item --version Print program version and exit. @end table @node Modules @chapter Modules @cindex Modules GNU Dico comes with a set of loadable modules for handling various database formats and extending the server functionality. Modules are binary loadable files, installed in @file{@var{$prefix}/lib/dico}. They are configurable on per-module (@pxref{Handlers, command}) and per-database (@pxref{Databases, handler}) basis. In this chapter we will describe the modules included in the distribution of GNU Dico version @value{VERSION}. @menu * outline:: * dictorg:: * gcide:: * wordnet:: * guile:: * python:: * stratall:: * substr:: * word:: * nprefix:: * pcre:: * ldap:: * pam:: @end menu @node outline @section @command{Outline} @cindex outline module The @command{outline} module supports databases written in @dfn{Emacs outline mode}. It is not designed for storing large amounts of data, its purpose rather is to handle small databases that can be composed easily and quickly using the Emacs editor. @cindex outline mode The outline mode is described in @ref{Outline Mode, Outline Mode, Outline Mode, emacs, The Emacs Editor}. In short, it is a usual plain text file, containing @dfn{header lines} and @dfn{body lines}. Header lines start with one or more stars, the number of starts indicating the nesting level of the heading in the document structure: one star for chapters, two stars for sections, etc. Body lines are anything that is not header lines. @cindex outline dictionary The outline dictionary must have at least a chapter named @samp{Dictionary}, which contains the dictionary corpus. Within it, each section is treated as a dictionary article, its header line giving the headword, and its body lines supplying the article itself. Apart from this, two more chapters have special meaning. The @samp{Description} chapter gives a short description to be displayed on @code{SHOW DB} command, and the @samp{Info} chapter supplies a full database description for @code{SHOW INFO} output. Both chapters are optional. All three reserved chapter names are case-insensitive. To summarize, the structure of an outline database is: @example * Description @var{line} * Info @var{text} * Dictionary ** @var{line} @var{text} [@r{any number of entries follows}] @end example @cindex Ambrose Bierce @cindex Devil's Dictionary @flindex devils.out As an example of outline format, the GNU Dico package includes Ambrose Bierce's @cite{Devil's Dictionary} in this format, see @file{examples/devdict.out}. The initialization of the @command{outline} module does not require any command line parameters. To declare a database, supply its full file name to the database @code{handler} directive, as shown in the example below: @example @group load-module outline; database @{ name "devdict"; handler "outline /var/db/devdict.out"; @} @end group @end example @node dictorg @section @command{Dictorg} @cindex dictorg module The @command{dictorg} module supports dictionaries in the format designed by @cite{@acronym{DICT} development group} (@uref{http://dict.org}). Lots of free dictionaries in this format are available from the @uref{http://freedict.org, @cite{FreeDict} project}. A dictionary in this format consists of two files: a @dfn{dictionary database file}, named @file{@var{name}.dict} or @file{@var{name}.dict.dz} (a compressed form), and an @dfn{index file}, which lists article headwords with the corresponding offsets in the database. The index file is named @file{@var{name}.index}. The common part of these two file names, @var{name}, is called the @dfn{base name} for that dictionary. @cindex dictorg handler definition An instance of the @command{dictorg} module is created using the following statement: @example load-module @var{inst-name} @{ command "dictorg [@var{options}]"; @} @end example @noindent where square brackets denote optional part. Valid @var{options} are the following: @cindex dictorg initialization options @table @option @kwindex dbdir @item dbdir=@var{dir} Look for databases in directory @var{dir}. @kwindex show-dictorg-entries @item show-dictorg-entries @dfn{Dictorg entries} are special database entries that keep some service information, such as database description, etc. Such entries are marked with headwords that begin with @samp{00-database-}. By default they are exempt from database look-ups and cannot be retrieved using @code{MATCH} or @code{DEFINE} command. Using @option{show-dictorg-entries} removes this limitation. @kwindex sort @item sort Sort the database index after loading. This option is designed for use with some databases that have malformed indexes. At the time of this writing the @samp{eng-swa} database from @cite{FreeDict} requires this option. Using @code{sort} may considerably slow down initial database loading. @kwindex trim-ws @item trim-ws Remove trailing whitespace from dictionary headwords at start up. This might be necessary for some databases. @end table The values set via these options become defaults for all databases using this module instance, unless overridden in their declarations. @cindex dictorg database declaration A database that uses this module must be declared as follows: @example @group database @{ handler "@var{inst-name} database=@var{file} [@var{options}]"; ... @} @end group @end example @noindent where @var{inst-name} is the instance name used in the @code{load-module} declaration above. @kwindex database The @code{database} argument specifies the base name of the database. Unless @var{file} begins with a slash, the value of @code{dbdir} initialization option is prepended to it. If @code{dbdir} is not given and @var{file} does not begin with a slash, an error is signalled. @kwindex noshow-dictorg-entries @kwindex nosort @kwindex notrim-ws The @var{options} above are the same options as described in initialization procedure: @code{show-dictorg-entries}, @code{sort}, and @code{trim-ws}. If used, they override initialization settings for that particular database. Forms prefixed with @samp{no} can be used to disable the corresponding option for this database. For example, @code{notrim-ws} cancels the effect of @code{trim-ws} used when initializing the module instance. @node gcide @section @command{Gcide} @cindex gcide module @cindex GNU Collaborative International Dictionary of English The @command{gcide} module provides support for GNU Collaborative International Dictionary of English. This dictionary can be downloaded from @uref{ftp://ftp.gnu.org/gnu/gcide}. It consists of a set of files named from @file{CIDE.A} through @file{CIDE.Z}, written using a special markup. See @uref{http://gcide.gnu.org.ua}, for a detailed information about the dictionary. The @command{gcide} module is started via the following statement: @example load-module gcide; @end example @kwindex dbdir The database is initialized as follows: @example @group database @{ handler "gcide dbdir=@var{directory} [@var{options}]"; ... @} @end group @end example The @samp{dbdir} parameter supplies the name of the directory where database files are located. Upon startup, the module scans the dictionary files and creates an index file, named @file{GCIDE.IDX}, if it does not already exist. The file is created using an ancillary program @command{idxgcide}, described below. Unless specified otherwise, this file is created in the same directory where the database files are located, therefore the directory must be writable for the user @command{dicod} is started as. Other options are: @deffn {gcide parameter} idxdir directory Specifies the directory where the @file{CIDE.IDX} index file resides or should reside. @end deffn @deffn {gcide parameter} index-cache-size size Sets the maximum number of index pages the module keeps in memory simultaneously. The default value is 16. The pages are cached using the @dfn{last recently used} algorithm. Raising this value will make dictionary accesses faster at the expense of using more memory. @end deffn @deffn {gcide parameter} index-program progname Specifies the full name of the index program. Usually this option is not needed, because the module is configured to start the @command{idxgcide} utility from its default location. It is mostly useful for the module developers. @end deffn @deffn {gcide parameter} suppress-pr This parameter suppresses the output of @samp{pr} (pronunciation) tags. According to GCIDE docs, @cite{very few of the pronunciation fields have been filled in}, so it might be reasonable to avoid displaying them at all. @end deffn Starting from version 0.51, GCIDE contains the file @file{INFO}, which provides basic information about the dictionary. The @command{gcide} module returns contents of this file at the @samp{SHOW INFO} request. The first line of this file (with the trailing newline and final point removed) is returned as the short database description. Here's a full example of a @samp{gcide} as used in @indicateurl{dico.gnu.org.ua}: @example @group load-module gcide; database @{ name "gcide"; handler "gcide dbdir=/var/dictdb/gcide-0.51 suppress-pr"; languages-from "en"; languages-to "en"; @} @end group @end example @menu * idxgcide:: @end menu @node idxgcide @subsection @command{idxgcide} The @command{idxgcide} utility is used by the @command{gcide} module to index the GCIDE dictionary. You can start it manually to reindex the database. It can be needed, for example, if you install a modified version of the dictionary. The program is installed in @dfn{libexecdir}. The usage is: @example idxgcide [@var{options}] @var{dbdir} [@var{idxdir}] @end example The only mandatory argument @var{dbdir} specifies the name of the directory where the GCIDE dictionary is installed. The optional @var{idxdir} argument specifies the directory for the index file, if it differs from @var{dbdir}. Available @var{options} are: @table @option @item --debug @itemx -d Debug lexical analyzer. @item --dry-run @itemx -n Do nothing, but print everything. This implies @option{--verbose}. @item --verbose @itemx -v Increase output verbosity. This option can be specified multiple times, each occurrence increasing the verbosity level by one. By default the utility outputs only errors and warnings. At level one, it prints additionally the names of source files that are being indexed at the moment. At level two (the maximum level implemented at the moment) it outputs each headword being indexed along with its location. This is useful only for debugging. @item --page-size=@var{number} @itemx -p @var{number} Defines the size of index file page. The @var{number} specifies the size in bytes. The following case-insensitive suffixes can be used: @samp{k} (@samp{kb}), @samp{m} (@samp{mb}) or @samp{g} (@samp{gb}), specifying kilobytes, megabytes and gigabytes (ouch!) correspondingly. The default page size is 10240 bytes. @end table @node wordnet @section @command{Wordnet} @cindex wordnet module @dfn{WordNet} is a lexical database for the English language, created and maintained at the Cognitive Science Laboratory of Princeton University@footnote{See @uref{http://wordnet.princeton.edu/wordnet/}, for a detailed information, including links to download.}. It groups English words into sets of synonyms called @dfn{synsets}, provides short, general definitions, and records the various semantic relations between these synonym sets. @cindex libWN Dico provides a @command{wordnet} module for reading WordNet lexical database files. The module relies on @file{libWN}, the support library distributed with the WordNet database. @findex wn.h @opindex --with-wordnet, @command{configure} option. The module is compiled automatically if the configure script was able to find the library and its header file @file{wn.h}. If it was not, use the @option{--with-wordnet} configure option to specify the location where these files can be found. For example, if WordNet was installed using the default procedure, then the following option will do the job: @example ./configure --with-wordnet=/usr/local/WordNet-3.0 @end example This command tells Dico to look for WordNet library files in @file{/usr/@/local/@/WordNet-3.0/@/lib} and for include files in @file{/usr/@/local/@/WordNet-3.0/@/include}. A compiled module is installed using the following statement: @example load-module wordnet @{ command "wordnet [@var{parameters}]"; @} @end example Optional parameters are: @deffn {wordnet module parameter} wnhome dir Base directory for WordNet files. @end deffn @deffn {wordnet module parameter} wnsearchdir dir Directory in which the WordNet database has been installed. @end deffn Normally, these values are set at compile time and you won't need to override them. The use of these parameters may, however, be necessary if the database is moved or installed in a non-standard location. One or more WordNet database instances can be defined. They all will be sharing the same database. The reason for having several database instances is that they may have different output options. For example, you may configure one database to return word definitions and another one to act as a thesaurus. Dico version @value{VERSION} defines the following database parameters: @deffn {wordnet database parameter} pos value Select part of speech to be displayed by this database. By default, all parts of speech are displayed. Valid values are: @table @asis @item all Display all parts of speech. This is the default. @item noun Display only nouns. @item verb Display only verbs. @item adj @itemx adjective Display only adjectives. @item adv @itemx adverb Display only adverbs. @item satellite @itemx adjsat Display only @dfn{satellites}. @end table @end deffn @deffn {wordnet database parameter} merge-defs When specified, this parameter instructs the WordNet database to merge all definitions with the same part of speech into a single definition, which will be returned in the usual dictionary fashion, e.g.: @example @group sail n. 1. a large piece of fabric (usually canvas fabric) by means of which wind is used to propel a sailing vessel Synonyms: @{canvas@}, @{canvass@}, @{sheet@} 2. an ocean trip taken for pleasure Synonyms: @{cruise@} 3. any structure that resembles a sail v. 1. traverse or travel on (a body of water); "We sailed the Atlantic"; "He sailed the Pacific all alone" 2. move with sweeping, effortless, gliding motions @end group @end example By default, each definition is returned as a separate entry. @end deffn As an example, the following is the database definition the author uses on his server: @example @group database @{ name "WordNet"; handler "wordnet merge-defs"; languages-from "en"; languages-to "en"; description "WordNet dictionary, version 3.0"; @} @end group @end example @node guile @section @command{Guile} @cindex guile module @cindex Guile @cindex Scheme @dfn{Guile} is an acronym for @dfn{GNU's Ubiquitous Intelligent Language for Extensions}. It provides a Scheme interpreter conforming to the R5RS language specification and a number of convenience functions. For information about the language, refer to @ref{Top,,,r5rs,Revised(5) Report on the Algorithmic Language Scheme}. For a detailed description of Guile and its features, see @ref{Top,,Overview,guile,The Guile Reference Manual}. The @command{guile} module provides an interface to Guile that allows for writing GNU Dico modules in Scheme. The module is loaded using the following configuration file statement: @example @group load-module @var{mod-name} @{ command "guile [@var{options}]" " init-script=@file{@var{script}}" " init-args=@var{args}" " init-fun=@var{function}"; @} @end group @end example @kwindex init-script @kwindex init-args @kwindex init-fun The @code{init-script} parameter specifies the name of a Scheme source file to be loaded in order to initialize the module. The @code{init-args} parameter supplies additional arguments to the module. They will be accessible to the @file{@var{script}} via @code{command-line} function. This parameter is optional. The @code{init-fun} parameter specifies the name of a function that will be invoked to perform initialization of the module and of particular databases. @xref{Guile Initialization}, for a description of initialization sequence. Optional arguments, @var{options}, are: @table @code @kwindex debug @item debug Enable Guile debugging and stack traces. @kwindex nodebug @item nodebug Disable Guile debugging and stack traces (default). @kwindex load-path @item load-path=@var{path} Append directories from @var{path} to the list of directories which should be searched for Scheme modules and libraries. The @var{path} must be a list of directory names, separated by colons. This option modifies the value of Guile's @code{%load-path} variable. @c FIXME: Texi2html is unable to handle \, in the section title. This @c conditional overrides this bug. @ifnothtml @xref{Build Config, %load-path, {Configuration\, Build and Installation}, guile, The Guile Reference Manual}. @end ifnothtml @ifhtml See the section @uref{http://www.gnu.org/software/guile/manual/html_node/Build-Config.html, Configuration and Installation} in the Guile Reference Manual. @end ifhtml @end table @anchor{guile-cmdline} @noindent Guile databases are declared using the following syntax: @example @group database @{ name "@var{dbname}"; handler "@var{mod-name} [@var{options}] @var{cmdline}"; @} @end group @end example @noindent where: @table @var @item dbname gives the name for this database, @item mod-name the name given to Guile module in @code{load-module} statement (see above), @item options @kwindex init-script @kwindex init-args @kwindex init-fun options that override global settings given in the @code{load-module} statement. The following options are understood: @code{init-script}, @code{init-args}, and @code{init-fun}. Their meaning is the same as for @code{load-module} statement (see above), except that they affect only this particular database. @item cmdline the command line that will be passed to the Guile @code{open-db} callback function (@pxref{open-db}). @end table @menu * Virtual Functions:: * Guile Initialization:: * Guile API:: * Dico Scheme Primitives:: * Example Module:: @end menu @node Virtual Functions @subsection Virtual Functions @cindex virtual functions, guile module A database handled by the @command{guile} module is assigned a @var{virtual function table}. This table is an association list which keeps Scheme @dfn{call-back functions} implemented to perform particular tasks on that database. In this list, the @code{car} of each element contains the name of a function, and its @code{cdr} gives the corresponding function. The defined function names and their semantics are: @table @asis @item open Open the database. @item close Close the database. @item descr Return a short description of the database. @item info Return a full information about the database. @item define Define a word. @item match Look up a word in the database. @item output Output a search result. @item result-count Return number of entries in the result. @end table For example, the following is a valid virtual function table: @smalllisp @group (list (cons "open" open-module) (cons "close" close-module) (cons "descr" descr) (cons "info" info) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count)) @end group @end smalllisp Apart from a per-database virtual table, there is also a global virtual function table, which supplies entries missing in the former. Both tables are created during the module initialization, as described in the next subsection. The purposes of particular virtuals functions are described in @ref{Guile API}. @node Guile Initialization @subsection Guile Initialization The following configuration statement causes loading and initialization of the @command{guile} module: @example @group load-module @var{mod-name} @{ command "guile init-script=@var{script}" " init-fun=@var{function}"; @} @end group @end example @kwindex init-script @kwindex init-fun Upon module initialization stage, the module attempts to load the file named @file{@var{script}}. The file is loaded using @code{primitive-load} call (@pxref{Loading, primitive-load, Loading, guile, The Guile Reference Manual}), i.e. the load paths are not searched, so @var{script} must be an absolute path name. The @code{init-fun} parameter supplies the name of the @dfn{initialization function}. This Scheme function constructs virtual function tables for the module itself and for each database that uses this module. It must be declared as follows: @smalllisp (define (@var{function} arg) ...) @end smalllisp This function is called several times. First of all, it is called after the @var{script} is loaded. This time it is given @code{#f} as its argument, and its return value is saved as a global function table. Then, it is called for each @code{database} statement that has @var{mod-name} (used in @code{load-module} above) in its @code{handler} keyword, e.g.: @example @group database @{ name @var{db-name}; handler "@var{mod-name} @dots{}"; @} @end group @end example This time, it is given @var{db-name} as its argument and the value it returns is stored as the virtual function table for this particular database. The following example function returns a complete virtual function table: @smalllisp @group (define-public (my-dico-init arg) (list (cons "open" open-module) (cons "close" close-module) (cons "descr" descr) (cons "info" info) (cons "lang" lang) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count))) @end group @end smalllisp @node Guile API @subsection Guile API @cindex Guile API This subsection describes callback functions that a Guile database module must provide. Each description begins with the function prototype and its entry in the virtual function table. Callback functions can be subdivided into two groups: database functions and search functions. Database callback functions are responsible for opening and closing databases and for returning information about them. @anchor{open-db} @deffn {Guile Callback} open-db name . args Virtual table: @code{(cons "open" open-db)}@* Open the database. The argument @var{name} contains database name as given in the @code{name} statement of the corresponding @code{database} block (@pxref{Databases}). Optional argument @var{args} is a list of command line parameters obtained from @var{cmdline} in @code{handler} statement (@pxref{guile-cmdline}). For example, if the configuration file contained: @example @group database @{ name "foo"; handler "guile db=file 1 no"; @} @end group @end example @noindent then the @code{open-db} callback will be called as: @smalllisp (open-db "foo" '("db=file" "1" "no")) @end smalllisp The @code{open-db} callback returns a @dfn{database handle}, i.e. an opaque object that will subsequently be used to identify this database. This value, hereinafter named @var{dbh}, will be passed to another callback functions that need to access the database. The return value @code{#f} or @code{'()} indicates an error. @end deffn @deffn {Guile Callback} close-db dbh Virtual Table: @code{(cons "close" close-db)}@* Close the database. This function is called during the cleanup procedure, before termination of @code{dicod}. The argument @code{dbh} is a database handle returned by @code{open-db}. The return value from @code{close-db} is ignored. To communicate errors to the daemon, throw an exception. @end deffn @deffn {Guile Callback} descr dbh Virtual Table: @code{(cons "descr" descr)}@* Return a short textual description of the database, for use in @code{SHOW DB} output. If there is no description, returns @code{#f} or @code{'()}. The argument @var{dbh} is a database handle returned by @code{open-db}. This callback is optional. If it is not defined, or if it returns @code{#f} (@code{'()}), the text from @code{description} statement is used (@pxref{Databases, description}). Otherwise, if no @code{description} statement is present, an empty string will be returned. @end deffn @deffn {Guile Callback} info dbh Virtual Table: @code{(cons "info" info)}@* Return a verbose, eventually multi-line, textual description of the database, for use in @code{SHOW INFO} output. If there is no description, returns @code{#f} or @code{'()}. The argument @var{dbh} is a database handle returned by @code{open-db}. This callback is optional. If it is not defined, or if it returns @code{#f} (@code{'()}), the text from @code{info} statement is used (@pxref{Databases, info}). If there is no @code{info} statement, the string @samp{No information available} is used. @end deffn @deffn {Guile Callback} lang dbh Virtual Table: @code{(cons "lang" lang)}@* Return a @code{cons} of languages supported by this database: Its @code{car} is a list of source languages, and its @code{cdr} is a list of destination languages. For example, the following return value indicates that the database contains translations from English to French and Spanish: @example (cons (list "en") (list "fr" "es")) @end example @end deffn A database is searched in a two-phase process. First, an appropriate callback is called to do the search: @code{define-word} is called for @code{DEFINE} searches and @code{match-word} is called for matches. This callback returns an opaque entity, called @dfn{result handle}, which is then passed to the @code{output} callback, which is responsible for outputting it. @deffn {Guile Callback} define-word dbh word Virtual Table: @code{(cons "define" define-word)}@* Find definitions of word @var{word} in the database @var{dbh}. Return a result handle. If nothing is found, return @code{#f} or @code{'()}. The argument @var{dbh} is the database handle returned by @code{open-db}. @end deffn @anchor{match-word} @deffn {Guile Callback} match-word dbh strat key Virtual Table: @code{(cons "match" match-word)}@* Find in the database @var{dbh} all headwords that match @var{key}, using strategy @var{strat}. Return a result handle. If nothing is found, return @code{#f} or @code{'()}. The @var{key} is a @dfn{Dico Key} object, which contains information about the word being looked for. To obtain the actual word, use the @code{dico-key->word} function (@pxref{dico-key->word}). The argument @var{dbh} is a database handle returned by @code{open-db}. The matching strategy @var{strat} is a special Scheme object that can be accessed using a set of functions described below (@pxref{Dico Scheme Primitives}). @end deffn @deffn {Guile Callback} result-count resh Virtual Table: @code{(cons "result-count" result-count)}@* Return the number of elements in the result set @var{resh}. @end deffn @deffn {Guile Callback} output resh n Virtual Table: @code{(cons "output" output)}@* Output @var{n}th result from the result set @var{resh}. The argument @var{resh} is a result handle returned by @code{define-word} or @code{match-word} callback. The data must be output to the current output port, e.g. using @code{display} or @code{format} primitives. If @var{resh} represents a match result, the output must not be quoted or terminated by newlines. It is guaranteed that the @code{output} callback will be called as many times as there are elements in @var{resh} (as determined by the @code{result-count} callback) and that for each subsequent call the value of @var{n} equals its value from the previous call incremented by one. At the first call @var{n} equals 0. @end deffn @node Dico Scheme Primitives @subsection Dico Scheme Primitives @cindex strategy functions, Scheme @cindex strategy functions, Guile @cindex key (a Scheme object) functions @cindex Scheme strategy and key functions @cindex Guile strategy and key functions GNU Dico provides the following Scheme primitives for accessing various fields of the @code{strat} and @code{key} arguments to @code{match} callback: @defun dico-key? @var{obj} Return @samp{#t} if @var{obj} is a Dico key object. @end defun @anchor{dico-key->word} @defun dico-key->word @var{key} Extract the lookup word from the key object @var{key}. @end defun @defun dico-make-key @var{strat} @var{word} Create new key object from strategy @var{strat} and word @var{word}. @end defun @defun dico-strat-selector? @var{strat} Return true if @var{strat} has a selector (@pxref{Selector}). @end defun @defun dico-strat-select? @var{strat} @var{word} @var{key} Return true if @var{key} matches @var{word} as per strategy selector @var{strat}. The @var{key} is a @samp{Dico Key} object. @end defun @defun dico-strat-name @var{strat} Return the name of strategy @var{strat}. @end defun @defun dico-strat-description @var{strat} Return a textual description of the strategy @var{strat}. @end defun @defun dico-strat-default? @var{strat} Return @code{true} if @var{strat} is a default strategy. @xref{MATCH, default strategy}. @end defun @defun dico-register-strat @var{strat} @var{descr} [@var{fun}] Register a new strategy. If @var{fun} is given it will be used as a callback for that strategy. Notice, that you can use strategies implemented in Guile in your C code as well (@pxref{MATCH, strategy}). The selector function must be declared as follows: @smalllisp (define (@var{fun} key word) ...) @end smalllisp It must return @code{#t} if @var{key} matches @var{word}, and @code{#f} otherwise. @end defun @node Example Module @subsection Example Module In this subsection we will show how to build a simple @command{dicod} module written in Scheme. The source code of this module, called @file{listdict.scm} and a short database for it, @file{numerals-pl.db}, are shipped with the distribution in the directory @file{examples}. The database is stored in a disk file in form of a list. The first two elements of this list contain database description and full information strings. Rest of elements are conses, whose @code{car} contains the headword, and @code{cdr} contains the corresponding dictionary article. Following is an example of such a database: @example ("Short English-Norwegian numerals dictionary" "Short English-Norwegian dictionary of numerals (1 - 7)" ("one" . "en") ("two" . "to") ("three" . "tre") ("four" . "fire") ("five" . "fem") ("six" . "seks") ("seven" . "sju")) @end example We wish to declare such databases in @file{dicod.conf} the following way: @example database @{ name "numerals"; handler "guile example.db"; @} @end example @noindent Thus, the @code{rest} argument to @samp{open-db} callback will be @samp{("guile" "example.db")} (@pxref{open-db}). Given this, we may write the callback as follows: @smalllisp (define (open-db name . rest) (let ((db (with-input-from-file (cadr rest) (lambda () (read))))) (cond ((list? db) (cons name db)) (else (format (current-error-port) "open-module: ~A: invalid format\n" (car args)) #f)))) @end smalllisp The list returned by this callback will then be passed as a database handle to another callback functions. To facilitate access to particular elements of this list, it is convenient to define the following syntax: @smalllisp (define-syntax db:get (syntax-rules (info descr name corpus) ((db:get dbh name) ;; @r{Return the name of the database.} (list-ref dbh 0)) ((db:get dbh descr) ;; @r{Return the desctiption.} (list-ref dbh 1)) ((db:get dbh info) ;; @r{Return the info string.} (list-ref dbh 2)) ((db:get dbh corpus) ;; @r{Return the word list.} (list-tail dbh 3)))) @end smalllisp Now, we can write @samp{descr} and @samp{info} callbacks: @smalllisp (define (descr dbh) (db:get dbh descr)) (define (info dbh) (db:get dbh info)) @end smalllisp The two callbacks @samp{define-word} and @samp{match-word} provide the core module functionality. Their results will be passed to @samp{output} and @samp{result-count} callbacks as a ``result handler'' argument. In the spirit of Scheme, we make the result a list. Its @code{car} is a boolean value: @code{#t}, if the result comes from @samp{define-word} callback, and @code{#f} if it comes from @samp{match-word}. The @code{cdr} of this list contains a list of matches. For @samp{define-word}, it is a list of conses copied from the database word list, whereas for @samp{match-word}, it is a list of headwords. The @samp{define-word} callback returns all list entries whose @code{car}s contain the look up word. It uses @code{mapcan} function, which is supposed to be defined elsewhere: @smalllisp (define (define-word dbh word) (let ((res (mapcan (lambda (elt) (and (string-ci=? word (car elt)) elt)) (db:get dbh corpus)))) (and res (cons #t res)))) @end smalllisp The @samp{match-word} callback (@pxref{match-word}) takes three arguments: a database handler @var{dbh}, a strategy descriptor @var{strat}, and a word @var{word} to look for. The result handle it returns contains a list of headwords from the database that match @var{word} in the sense of @var{strat}. Thus, the behavior of @samp{match-word} depends on the @var{strat}. To implement this, let's define a list of directly supported strategies (see below for definitions of particular @samp{match-} functions): @smalllisp (define strategy-list (list (cons "exact" match-exact) (cons "prefix" match-prefix) (cons "suffix" match-suffix))) @end smalllisp The @samp{match-word} callback will then select an entry from that list and call its @code{cdr}, e.g.: @smalllisp (define (match-word dbh strat key) (let ((sp (assoc (dico-strat-name strat) strategy-list))) (let ((res (cond (sp ((cdr sp) dbh strat (dico-key->word key))) @end smalllisp If the requested strategy is not in that list, the function will use the selector function if it is available, and the default matching function otherwise: @smalllisp ((dico-strat-selector? strat) (match-selector dbh strat key)) (else (match-default dbh strat (dico-key->word key)))))) @end smalllisp Notice the use of @code{dico-key->word} function to extract the actual lookup word from the key object. To summarize, the @samp{match-word} callback is: @smalllisp (define (match-word dbh strat key) (let ((sp (assoc (dico-strat-name strat) strategy-list))) (let ((res (cond (sp ((cdr sp) dbh strat (dico-key->word key))) ((dico-strat-selector? strat) (match-selector dbh strat key)) (else (match-default dbh strat (dico-key->word key)))))) (if res (cons #f res) #f)))) @end smalllisp Now, let's create the @samp{match-} functions it uses. The @samp{exact} strategy is easy to implement: @smalllisp (define (match-exact dbh strat word) (mapcan (lambda (elt) (and (string-ci=? word (car elt)) (car elt))) (db:get dbh corpus))) @end smalllisp The @samp{prefix} and @samp{suffix} strategies are implemented using SRFI-13 (@pxref{SRFI-13,,SRFI-13,guile,The Guile Reference Manual}) functions @code{string-prefix-ci?} and @code{string-suffix-ci?}, e.g.: @smalllisp (define (match-prefix dbh strat word) (mapcan (lambda (elt) (and (string-prefix-ci? word (car elt)) (car elt))) (db:get dbh corpus))) @end smalllisp Notice that whereas the @samp{prefix} strategy is defined by the server itself, the @samp{suffix} strategy is an extension, and should therefore be registered: @smalllisp (dico-register-strat "suffix" "Match word suffixes") @end smalllisp The @code{match-selector} function is pretty similar to its siblings, except that it uses @code{dico-strat-select?} (@pxref{Dico Scheme Primitives, dico-strat-select?}) to select the matching elements. This also leads to this function expecting a @dfn{key} as its third argument, in contrast to the previous matchers, which expect the actual lookup word there: @smalllisp (define (match-selector dbh strat key) (mapcan (lambda (elt) (and (dico-strat-select? strat (car elt) key) (car elt))) (db:get dbh corpus))) @end smalllisp Finally, the @code{match-default} is a variable that refers to the default matching strategy for this module, e.g.: @smalllisp (define match-default match-prefix) @end smalllisp The two callbacks left to define are @samp{result-count} and @samp{output}. The first of them simply returns the number of elements in @code{cdr} of the result: @smalllisp (define (result-count rh) (length (cdr rh))) @end smalllisp The behavior of @samp{output} depends on whether the result is produced by @samp{define-word} or by @samp{match-word}. @smalllisp (define (output rh n) (if (car rh) ;; @r{Result comes from DEFINE command.} (let ((res (list-ref (cdr rh) n))) (display (car res)) (newline) (display (cdr res))) ;; @r{Result comes from MATCH command.} (display (list-ref (cdr rh) n)))) @end smalllisp Finally, at the end of the module the callbacks are made known to @command{dicod} by the module initialization function: @smalllisp (define-public (example-init arg) (list (cons "open" open-module) (cons "descr" descr) (cons "info" info) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count))) @end smalllisp Notice, that in this implementation @samp{close-db} callback was not needed. @node python @section @command{Python} @cindex Python @cindex python module The @command{python} module provides an interface which allows programmers to write loadable modules in Python. The syntax for loading the module is: @example load-module @var{name} @{ command "python" " init-script=@var{name}" " load-path=@var{path}" " root-class=@var{name}"; @} @end example All parameters are optional: @deffn {python module} load-path=@var{path} Augments the default search path for Python modules. The format of @var{path} is the usual UNIX path specification: a colon-separated list of directory names. @end deffn @deffn {python module} init-script=@var{name} Specifies the name of the initial Python source file. This file will be loaded and interpreted immediately after loading the module. @end deffn @deffn {python module} root-class=@var{name} Sets the name of the Python root class, which is responsible for the dictionary operations. @end deffn A particular instance of the @command{python} module is loaded using the @code{handler} statement within a @code{database} block. This statement takes the same parameters as described above, plus any number of command line arguments, which will be passed to the root class constructor. @menu * Dictionary Class:: * Dico Python Primitives:: * Python Example:: An Example of Python Module @end menu @node Dictionary Class @subsection Python Dictionary Class The dictionary class must define the following methods: @defop Method DictionaryClass __init__ self *argv Class constructor. The @var{argv} array supplies positional arguments from the @code{handler} statement in the configuration file. @end defop @defop Method DictionaryClass open self dbname Opens the database named @var{dbname}. Returns @samp{True} on success and @samp{False} on failure. @end defop @defop Method DictionaryClass close self Closes the database. @end defop @defop Method DictionaryClass descr self Returns a short description of the database. @end defop @defop Method DictionaryClass info self Returns a text describing the database. @end defop @defop Method DictionaryClass lang self Optional. Returns supported languages as @samp{(@var{src}, @var{dst})}. @end defop @defop Method DictionaryClass define_word self word Defines @var{word}. Returns a result (an opaque Python object) if the definition was found or @samp{False} otherwise. @end defop @defop Method DictionaryClass match_word self strat word Searches for @var{word} in the database using strategy @var{strat}. Returns a result (an opaque Python object) if some matches were found or @samp{False} otherwise. @end defop @defop Method DictionaryClass output self result n Outputs @var{n}th result from the result set @var{result}. @end defop @defop Method DictionaryClass result_count self result Returns number of elements in the result set. @end defop @defop Method DictionaryClass compare_count self result Optional. Returns the number of comparisons performed when constructing the result set. @end defop @defop Method DictionaryClass result_headers self result hdr Optional. Returns a dictionary of MIME headers. @end defop @defop Method DictionaryClass free_result self result Reclaims any resources used by the result set. @end defop @node Dico Python Primitives @subsection Dico Python Primitives @deffn {Python primitive} register_strat name descr [proc] Registers new match strategy. The arguments are: @table @var @item name Strategy name for use in the @code{MATCH} command. @item descr The dscription, which will appear in the output of @code{SHOW STRAT} command. @item proc Optional selector procedure. @end table @anchor{Python Selector} If the @var{proc} argument is present, it must be the name of a Python function declared as: @example def select(opcode key headword): @end example Its arguments are: @table @var @item opcode Integer operation code. @item key An @code{DicoSelectionKey} object identifying the search term (@pxref{DicoSelectionKey}). @item headword The headword being examined. @end table @kwindex DICO_SELECT_BEGIN, @r{Python} At the beginning of the search, the function is called with the @samp{DICO_SELECT_BEGIN} as its @var{opcode} argument. It must perform the necessary initialization and return. @kwindex DICO_SELECT_END, @r{Python} At the end of the search loop, the function is called with @var{opcode} @samp{DICO_SELECT_END}. It must perform the necessary deinitialization procedures and exit. In both cases, the @var{key} and @var{headword} arguments are not defined. @kwindex DICO_SELECT_RUN, @r{Python} Within the search loop, the function will be called for each headword from the database. The @var{opcode} parameter will be @samp{DICO_SELECT_RUN}. In this case the function must return @samp{True} if the @var{headword} matches the @var{key} and @samp{False} otherwise. @end deffn @deffn {Python primitive} register_markup name Registers a markup @var{name}. @end deffn @deffn {Python primitive} current_markup Returns the name of the current markup. @end deffn @menu * DicoSelectionKey:: * DicoStrategy:: @end menu @node DicoSelectionKey @subsubsection The @code{DicoSelectionKey} class The @code{DicoSelectionKey} class represents a search key and is used when looking for matches. Calling @code{str} on the object of that class returns the search term itself, as does the @code{word} method: @defop {Method} DicoSelectionKey word Returns the search term. It is equivalent to the @code{__str__} attribute. @end defop @node DicoStrategy @subsubsection The @code{DicoStrategy} class A match strategy is represented by an object of the @code{DicoStrategy} class. @defcv {Variable} DicoStrategy name The name of that strategy. @end defcv @defcv {Variable} DicoStrategy descr Textual description of the strategy. @end defcv @defcv {Variable} DicoStrategy has_selector @samp{True} if this strategy has a selector (@pxref{Python Selector}). @end defcv @defcv {Variable} DicoStrategy name is_default @samp{True} if this is the default strategy. @end defcv @defop Method DicoStrategy select headword key Returns @samp{True} if @var{key} matches @var{headword} as per this strategy. @end defop @node Python Example @subsection Python Example In this subsection we will show a simple database module written in Python. This module handles simple textual databases in the following format: @itemize @bullet @item Empty lines and lines beginning with double dash are ignored. @item A line beginning with @samp{descr:} introduces a short dictionary description for @code{SHOW DB}. The @samp{descr:} prefix and the white space immediately following it are removed. E.g.: @example descr: Short English-Norwegian numerals dictionary @end example @item Lines beginning with @samp{info:} provide a verbose description of the database. These lines are concatenated after removing the @samp{info:} prefix and white space immediately following it. E.g.: @example info: A short English-Norwegian (Bokm@ringaccent{a}l) dictionary info: of numerals. info: info: This dictionary is public domain. @end example @item A line beginning with @samp{lang:} defines source and destination languages for this dictionary. E.g.: @example lang: en : nb @end example @item Any line consisting of exactly two words defines a dictionary entry. E.g.: @example one en two to three tre four fire @end example @end itemize Now, let's create a module for handling this format. First, we need to import Dico primitives (@pxref{Dico Python Primitives}) and the @samp{sys} module. The latter is needed for output functions: @example import dico import sys @end example @noindent Then, a result class will be needed for @code{match_word} and @code{define_word} methods. It will contain the actual data in the variable @samp{result}: @example class DicoResult: # @r{actual data.} result = @{@} # @r{number of comparisons.} compcount = 0 def __init__ (self, *argv): self.result = argv[0] if len (argv) == 2: self.compcount = argv[1] def count (self): return len (self.result) def output (self, n): pass def append (self, elt): self.result.append (elt) @end example @noindent The following two classes extend @samp{DicoResult} for use with @samp{DEFINE} and @samp{MATCH} operations. The @code{define_word} method will return an instance of the @samp{DicoDefineResult} class: @example class DicoDefineResult (DicoResult): def output (self, n): print "%d. %s" % (n + 1, self.result[n]) print "---------", @end example @noindent The @code{match_word} method will return an instance of the @samp{MatchResult} class: @example class DicoMatchResult (DicoResult): def output (self, n): sys.stdout.softspace = 0 print self.result[n], @end example @noindent Now, let's define the dictionary class: @example class DicoModule: # @r{The dictionary converted to associative array.} adict = @{@} # @r{The database name.} dbname = '' # @r{The name of the corresponding disk file.} filename = '' # @r{A sort information about the database.} mod_descr = '' # @r{A verbose description of the database is kept.} # @r{as an array of strings.} mod_info = [] # @r{A list of source and destination languages:} langlist = () @end example @noindent The class constructor takes a single argument, defining the name of the database file: @example def __init__ (self, *argv): self.filename = argv[0] pass @end example @noindent The @samp{open} method opens the database and reads its data: @example def open (self, dbname): self.dbname = dbname file = open (self.filename, "r") for line in file: if line.startswith ('--'): continue if line.startswith ('descr: '): self.mod_descr = line[7:].strip (' \n') continue if line.startswith ('info: '): self.mod_info.append (line[6:].strip (' \n')) continue if line.startswith ('lang: '): s = line[6:].strip (' \n').split(':', 2) if (len(s) == 1): self.langlist = (s[0].split (), \ s[0].split ()) else: self.langlist = (s[0].split (), \ s[1].split ()) continue f = line.strip (' \n').split (' ', 1) if len (f) == 2: self.adict[f[0].lower()] = f[1].strip (' ') file.close() return True @end example @noindent The database is kept entirely in memory, so there is no need for @samp{close} method. However, it must be declared anyway: @example def close (self): return True @end example @noindent The methods returning database information are trivial: @example def descr (self): return self.mod_descr def info (self): return '\n'.join (self.mod_info) def lang (self): return self.langlist @end example @noindent The @samp{define_word} method checks if the search term is present in the dictionary, and, if so, converts it to the @code{DicoDefineResult}: @example def define_word (self, word): if self.adict.has_key (word): return DicoDefineResult ([self.adict[word]]) return False @end example The @samp{match_word} method supports the @samp{exact} strategy natively via the @code{has_key} attribute of @code{adict}: @example def match_word (self, strat, key): if strat.name == "exact": if self.adict.has_key (key.word.lower ()): return DicoMatchResult \ ([self.adict[key.word.lower()]]) @end example @noindent Other strategies are supported as long as they have selectors: @example elif strat.has_selector: res = DicoMatchResult ([], len (self.adict)) for k in self.adict: if strat.select (k, key): res.append (k) if res.count > 0: return res return False @end example @noindent The rest of methods rely on the result object to do the right thing: @example def output (self, rh, n): rh.output (n) return True def result_count (self, rh): return rh.count () def compare_count (self, rh): return rh.compcount @end example @node stratall @section @command{Stratall} @cindex stratall module The @command{stratall} module provides a new strategy, called @samp{all}. This strategy always returns a full list of headwords from the database, no matter what the actual search word is. To load this strategy, use the following configuration statement: @example load-module stratall; @end example Using this strategy on a full set of databases (@samp{MATCH * all ""}) produces enormous amount of output, which may induce a considerable strain on the server, therefore it is advised to block such usage as suggested in @ref{Strategies and Default Searches}: @example strategy all @{ deny-all yes; @} @end example @node substr @section @command{Substr} @cindex substr module The @command{substr} module provides a @samp{substr} search strategy. This strategy matches a substring anywhere in the keyword. For example: @example C: MATCH eng-deu substr orma S: 152 207 matches found: list follows S: eng-deu "abnormal" S: eng-deu "conformable" S: eng-deu "doorman" S: eng-deu "format" @dots{} @end example The loading procedure expects no arguments: @example load-module substr; @end example @node word @section @command{Word} @cindex word module The @command{word} module provides the following strategies: @table @asis @item word Match separate words within headwords. @item first Match the first word within headwords. @item last Match the last word within headwords. @end table The initialization procedure loads all three if given no arguments, as in @example load-module word; @end example If arguments are given, the initialization procedure loads only those strategies that are listed in its command line. For example, the statement below loads only @samp{first} and @samp{last} strategies: @example load-module word @{ command "word first last"; @} @end example The following is an example of using one of those strategies in a dico session: @example C: MATCH devdict word government S: 152 1 matches found: list follows S: devdict "MONARCHICAL GOVERNMENT" S: . S: 250 Command complete @end example @node nprefix @section @command{Nprefix} @cindex nprefix module The @command{nprefix} module provides a strategy similar to @samp{prefix}, but which returns the specified range of bytes. For example, the statement @example MATCH @var{dict} nprefix @var{skip}#@var{count}#@var{string} @end example @noindent where @var{skip} and @var{count} are positive integer numbers, returns at most @var{count} headwords whose prefix matches @var{string}, omitting first @var{skip} unique matches. The entire @samp{@var{skip}#@var{count}#} construct is optional. If not supplied, the @samp{nprefix} strategy behaves exactly as @samp{prefix}. The module is loaded using this simple statement: @example load-module nprefix; @end example @node pcre @section @command{Pcre} @cindex pcre module @cindex regexp, Perl-compatible @cindex Perl-compatible regular expressions The @command{pcre} module provides a matching strategy using Perl-compatible regular expressions. The module is loaded using a simple statement: @example load-module pcre; @end example The strategy has the same name as the module and is reflected in the server's HELP output as shown below: @example pcre "Match using Perl-compatible regular expressions" @end example The headword argument to the @code{pcre} MATCH statement should be a valid Perl regular expression. It can optionally be enclosed in a pair of slashes, in which case one or more of the following flags can appear after the closing slash: @table @code @item a The regexp is @dfn{anchored}, that is, it is constrained to match only at the first matching point in the string that is being searched. @item e Ignore whitespace and @samp{#} comments in the expression. @item i Ignore case when matching. @item G Inverts the @dfn{greediness} of the quantifiers so that they are not greedy by default, but become greedy if followed by @samp{?}. The same can also be achieved by setting the @samp{(?U)} option within the pattern. @end table Any of these flags can also be used in reverted case, which also reverts its meaning. For example, @samp{I} means case-sensitive matching. Here is an example of using this strategy in a dico session: @example MATCH ! pcre "/\\stext/i" @end example @node ldap @section @command{Ldap} @cindex ldap module The @command{ldap} module loads the support for @acronym{LDAP} user databases. It is available if Dico has been configured with @acronym{LDAP}. The module needs no additional configuration parameters: @example load-module ldap; @end example @xref{ldap userdb}, for a description of its use. @node pam @section @command{pam} @cindex PAM @cindex pam module The @command{pam} module implements user authentication via PAM. It can be used only with @samp{LOGIN} and @samp{PLAIN} GSASL authentication methods. The module is loaded as follows: @example @group load-module pam @{ command "pam [service=@var{sname}]"; @} @end group @end example @noindent where @var{sname} is the name of PAM service to use. If not supplied, @samp{dicod} service will be used. The user database is normally initialized as: @example user-db "pam://localhost"; @end example If @code{password-resource} statement is given, its value will be used as service name, instead of the one specified in the @code{load-module} statement, e.g.: @example @group user-db "pam://localhost" @{ password-resource "local"; @} @end group @end example The @code{group-resource} statement is not used, because there is no mechanism to return textual data from PAM. @node Interface @chapter Dico Module Interface This chapter describes the API for Dico loadable modules. @menu * dico_database_module:: * Strategies:: * Output:: @end menu @node dico_database_module @section dico_database_module @cindex dico_database_module, a structure @kwindex DICO_EXPORT Each module must export exactly one symbol of type @code{struct dico_database_module}. This symbol must be declared as @example DICO_EXPORT(@var{name}, module) @end example @noindent where @var{name} is the name of the module file (without suffix). For example, a module @file{word.so} would have in its sourse the following declaration: @example struct dico_database_module DICO_EXPORT(word, module) = @{ @dots{} @}; @end example The @code{dico_database_module} has the following members: @deftypevr {dico_database_module} unsigned dico_version @vrindex DICO_MODULE_VERSION Interface version being used. It is recommended to use the macro @code{DICO_MODULE_VERSION}, which keeps the version number of the current interface. @end deftypevr @deftypevr {dico_database_module} unsigned dico_capabilities @vrindex DICO_CAPA_DEFAULT Module capabilities. As of version @value{VERSION}, this member can be one of the following: @table @code @item DICO_CAPA_DEFAULT This module defines a handler for a specific database format. @item DICO_CAPA_NODB This module does not handle any databases. When this capability is specified, @command{dicod} will call only the @command{dico_init} member of the structure. This capability is used by modules defining new matching strategies or authentication methods. @end table @end deftypevr @anchor{dico_init} @deftypefn {Dico Callback} int dico_init (int @var{argc}, char **@var{argv}) This callback is called right after loading the module. It is responsible for module initialization. The arguments are: @table @var @item argc Number of elements in @var{argv}. @item argv The command line given by @code{command} configuration statement (@pxref{Handlers, command}), split into words. The element @code{@var{argv}[0]} is the name of the module. The element @code{@var{argv}[@var{argc}]} is @samp{NULL}. Word splitting follows the rules similar to those used in shell. In particular, a quoted string (using both single and double quotes) is handled as a single word. @end table If @code{dico_capabilities} is @code{DICO_CAPA_DEFAULT}, this method is optional. If @code{dico_capabilities} is set to @code{DICO_CAPA_NODB}, @code{dico_init} is mandatory and must be the only method defined. @end deftypefn @deftypefn {Dico Callback} dico_handle_t dico_init_db (const char *@var{db}, @ int @var{argc}, char **@var{argv}) Initialize the database. This method is called as a part of database initialization routine at startup of @command{dicod}, after processing @code{dictionary} configuration statement (@pxref{Databases}). Its arguments are: @table @var @item db The name of the database, as given by the @code{name} statement. @item argc Number of elements in @var{argv}. @item argv The command line given by @code{handler} configuration statement (@pxref{Databases, handler}). The array is @samp{NULL}-terminated. @end table This method returns a @dfn{database handle}, an opaque structure identifying the database. This handle will be passed as the first argument to other methods. On error, @code{dico_init_db} shall return @code{NULL}. Notice, that this function is not required to actually open the database, if the @samp{open} notion is supported by the underlying mechanism. Another method, @code{dico_open} is responsible for that. @end deftypefn @deftypefn {Dico Callback} int dico_free_db (dico_handle_t @var{dh}) Reclaim any resources associated with database handle @var{dh}. This method is called as part of exit cleanup routine, before the main @command{dicod} process terminates. It shall return @samp{0} on success, or any non-@samp{0} value on failure. @end deftypefn @deftypefn {Dico Callback} int dico_open (dico_handle_t @var{dh}) Open the database identified by the handle @var{dh}. This method is called as part of child process initialization routine. It shall return @samp{0} on success, or any non-@samp{0} value on failure. The @code{dico_open} method is optional. @end deftypefn @deftypefn {Dico Callback} int dico_close (dico_handle_t @var{dh}) Close the database identified by the handle @var{dh}. This method is called as part of child process termination routine. It shall return @samp{0} on success, or any non-@samp{0} value on failure. The @code{dico_close} method is optional, but if @code{dico_open} is defined, @code{dico_close} must be defined as well. @end deftypefn @anchor{dico_db_info} @deftypefn {Dico Callback} {char *} dico_db_info (dico_handle_t @var{dh}) Return a database information string for the database identified by @var{dh}. This function is called on each @code{SHOW INFO} command, unless an informational text for this database is supplied in the configuration file (@pxref{Databases, info}). This value must be allocated using malloc(3). The caller is responsible for freeing it when no longer needed. This method is optional. @end deftypefn @deftypefn {Dico Callback} {char *} dico_db_descr (dico_handle_t @var{dh}) Return a short database description string for the database identified by @var{dh}. This function is called on each @code{SHOW DB} command, unless a description for this database is supplied in the configuration file (@pxref{Databases, descr}). This value must be allocated using malloc(3). The caller is responsible for freeing it when no longer needed. This method is optional. @end deftypefn @deftypefn {Dico Callback} dico_result_t dico_match (dico_handle_t @var{dh}, @ const dico_strategy_t @var{strat}, const char *@var{word}) Use the strategy @var{strat} to search in the database @var{dh}, and return all headwords matching @var{word}. This method returns a @dfn{result handle}, an opaque pointer that can then be used to display the obtained results. It returns @code{NULL} if no matches were found. @end deftypefn @deftypefn {Dico Callback} dico_result_t dico_define (dico_handle_t @var{dh}, @ const char *@var{word}) Find definitions of headword @var{word} in the database identified by @var{dh}. This method returns a @dfn{result handle}, an opaque pointer that can then be used to display the obtained results. It returns @code{NULL} if no matches were found. @end deftypefn @deftypefn {Dico Callback} int dico_output_result (dico_result_t @var{rp}, @ size_t @var{n}, dico_stream_t @var{str}) The @code{dico_output_result} method outputs to stream @var{str} the @var{n}th result from result set @var{rp}. The latter is a result handle, obtained from a previous call to @code{dico_match} or @code{dico_define}. Returns @samp{0} on success, or any non-@samp{0} value on failure. It is guaranteed that the @code{dico_output_result} callback is called as many times as there are elements in @var{rp} (as determined by the @code{dico_result_count} callback, described below) and that for each subsequent call the value of @var{n} equals its value from the previous call incremented by one. At the first call @var{n} equals 0. @end deftypefn @anchor{dico_result_count} @deftypefn {Dico Callback} size_t dico_result_count (dico_result_t @var{rp}) Return the number of distinct elements in the result set identified by @var{rp}. The latter is a result handle, obtained from a previous call to @code{dico_match} or @code{dico_define}. @end deftypefn @deftypefn {Dico Callback} size_t dico_compare_count (dico_result_t @var{rp}) Return the number of comparisons performed when constructing the result set identified by @var{rp}. This method is optional. @end deftypefn @deftypefn {Dico Callback} void dico_free_result (dico_result_t @var{rp}) Free any resources used by the result set @var{rp}, which is a result handle, obtained from a previous call to @code{dico_match} or @code{dico_define}. @end deftypefn @deftypefn {Dico Callback} int dico_result_headers (dico_result_t @var{rp}, @ dico_assoc_list_t @var{hdr}) Populate associative list @var{hdr} with the headers describing result set @var{rp}. This callback is optional. If defined, it will be called before outputting the result set @var{rp} if @code{OPTION MIME} is in effect (@pxref{OPTION, OPTION MIME}). @end deftypefn @node Strategies @section Strategies A search strategy is described by the following structure: @example struct dico_strategy @{ char *name; /* @r{Strategy name} */ char *descr; /* @r{Strategy description} */ dico_select_t sel; /* @r{Selector function} */ void *closure; /* @r{Additional data for SEL} */ int is_default; /* @r{True, if this is a default strategy} */ dico_list_t stratcl; /* @r{Strategy access control list} */ @}; @end example The first two members are mandatory and must be defined for each strategy: @deftypecv {member} {struct dico_strategy} @code{char *} name Short name of the strategy. It is used as second argument to the @command{MATCH} command (@pxref{MATCH}) and is displayed in the first column of output by the @command{SHOW STRAT} command (@pxref{SHOW,SHOW STRAT}). @end deftypecv @deftypecv {member} {struct dico_strategy} @code{char *} descr Strategy description. It is the string shown in the second column of @command{SHOW STRAT} output (@pxref{SHOW,SHOW STRAT}). @end deftypecv @anchor{selector} @deftypecv {member} {struct dico_strategy} dico_select_t sel @kwindex dico_select_t A @dfn{selector function}, which is used in iterative matches to select matching headwords. The @code{sel} function is called for each headword in the database with the headword and search key as its arguments and returns 1 if the headword matches the key and 0 otherwise. The @code{dico_select_t} type is defined as: @example typedef int (*dico_select_t) (int, dico_key_t, const char *); @end example @xref{Selector}, for a detailed description. @end deftypecv @deftypecv {member} {struct dico_strategy} @code{void *} closure An opaque data pointer intended for use by the selector function. @end deftypecv @deftypecv {member} {struct dico_strategy} int is_default This member is set to 1 by the server if this strategy is selected as the default one (@pxref{default strategy}). @end deftypecv @deftypecv {member} {struct dico_strategy} dico_list_t stratcl A control list associated with this strategy. @xref{Strategies and Default Searches}. @end deftypecv @menu * Key:: * Selector:: @end menu @node Key @subsection Search Key Structure @anchor{dico_key} @kwindex dico_key_t @kwindex dico_key The @code{dico_key_t} is defined as a pointer to the structure @code{dico_key}: @example @group struct dico_key @{ char *word; void *call_data; dico_strategy_t strat; int flags; @}; @end group @end example The structure represents a search key for matching algorithms. Its members are: @deftypecv {member} {struct dico_key} @code{char *} word The search word or expression. @end deftypecv @deftypecv {member} {struct dico_key} @code{void *} call_data @kwindex DICO_SELECT_BEGIN @kwindex DICO_SELECT_END A pointer to selector-specific data. If necessary, it can be initialized by the selector when called with the @samp{DICO_SELECT_BEGIN} opcode and deallocated when called with the @samp{DICO_SELECT_END} opcode. @end deftypecv @deftypecv {member} {struct dico_key} dico_strategy_t strat A pointer to the strategy structure. @end deftypecv @deftypecv {member} {struct dico_key} int flags Key-specific flags. These are used by the server. @end deftypecv @noindent The following functions are defined to operate on search keys: @deftypefn {function} int dico_key_init (struct dico_key *@var{key}, @ dico_strategy_t @var{strat}, @ const char *@var{word}) @kwindex DICO_SELECT_BEGIN Initialize the key structure @var{key} with the given strategy @var{strat} and search word @var{word}. If @var{strat} has a selector function, it will be called with the @samp{DICO_SELECT_BEGIN} opcode (@pxref{Selector, DICO_SELECT_BEGIN}) to carry out the necessary initializations. The @var{key} itself may point to any kind of memory storage. @end deftypefn @deftypefn {function} void dico_key_deinit (struct dico_key *@var{key}) @kwindex DICO_SELECT_END Deinitialize the @code{dico_key} structure initialized by a prior call to @code{dico_key_init}. If the key strategy has a selector, it will be called with the @samp{DICO_SELECT_END} opcode. Note that this function makes no assumptions about the storage type of @var{key}. If it points to a dynamically allocated memory, it is the caller responsibility to free it. @end deftypefn @deftypefn {function} int dico_key_match (struct dico_key *@var{key}, @ const char *@var{word}) @kwindex DICO_SELECT_RUN Match headword and key. Return 1 if they match, 0 if they don't match and -1 in case of error. This function calls the strategy selector with the @samp{DICO_SELECT_RUN} opcode (@pxref{Selector, DICO_SELECT_RUN}). It is an error if the strategy selector is not defined. @end deftypefn @node Selector @subsection Strategy Selectors Wherever possible, modules should implement strategies using effective look up algorithms. For example, @samp{exact} and @samp{prefix} strategies must normally be implemented using binary search in the database index. The @samp{suffix} strategy can also be implemented using binary search if a special @dfn{reverse index} is built for the database (this is the approach taken by @command{outline} and @command{dictorg} modules). However, some strategies can only be implemented using a relatively expensive iteration over all keys in the database index. For example, @samp{soundex} and @samp{levenshtein} strategies cannot be implemented otherwise. A strategy that can be used in iterative look ups must define a @dfn{selector}. Strategy selector is a function which is called for each database headword to determine whether it matches the search key. It is defined as follows: @deftypefn {selector} int select (int @var{opcode}, dico_key_t @var{key}, @ const char *@var{headword}) A strategy selector. Its arguments are: @table @var @item opcode The operation code. Its possible values are @samp{DICO_SELECT_BEGIN}, @samp{DICO_SELECT_RUN} and @samp{DICO_SELECT_END}, as described below. @item key The search key. @item headword The database headword. @end table @end deftypefn @kwindex DICO_SELECT_BEGIN The selector function is called before entering the iteration loop with @samp{DICO_SELECT_BEGIN} as its argument. If necessary, it can perform any additional initialization of the strategy, such as allocation of auxiliary data structures, etc. The @code{call_data} member of @code{dico_key_t} structure (@pxref{dico_key,call_data}) should be used to keep the pointer to the auxiliary data. The function should return 0 if it successfully finished its initialization and non-zero otherwise. @kwindex DICO_SELECT_END Once the iteration loop is finished, the selector will be called with @samp{DICO_SELECT_END} as its first argument. This invocation is intended to deallocate any auxiliary memory and release any additional resources allocated at the initialization state. In these two additional invocations, the @var{headword} parameter will be @samp{NULL}. @kwindex DICO_SELECT_RUN Once the iteration loop is entered, the selector function will be called for each headword. Its @var{opcode} parameter will be @samp{DICO_SELECT_RUN} and the @var{headword} parameter will point to the headword. The function should return 1 if the headword matches the key, 0 if it does not and a negative value in case of failure. To illustrate the concept of strategy selector, let's consider the implementation of the @samp{soundex} strategy in @command{dicod}. This strategy computes a four-character soundex code for both search key and the headword and returns 1 (match) if both codes coincide. To speed up the process, the code for the search key is computed only once, at the initialization stage, and stored in a temporary memory assigned to the @code{key->call_data}. This memory is reclaimed at the terminating call: @example int soundex_sel(int cmd, dico_key_t key, const char *dict_word) @{ char dcode[DICO_SOUNDEX_SIZE]; switch (cmd) @{ case DICO_SELECT_BEGIN: key->call_data = malloc(DICO_SOUNDEX_SIZE); if (!key->call_data) return 1; dico_soundex(key->word, key->call_data); break; case DICO_SELECT_RUN: dico_soundex(dict_word, dcode); return strcmp(dcode, key->call_data) == 0; case DICO_SELECT_END: free(key->call_data); break; @} return 0; @} @end example @node Output @section Output @cindex output @kwindex dico_output_result The @code{dico_output_result} method is called when the server needs to output the result of a @samp{define} or @samp{match} command. It must be defined as follows: @example int output_result (dico_result_t @var{rp}, size_t @var{n}, dico_stream_t @var{str}); @end example The @var{rp} argument points to the result in question. From the server's point of view it is an opaque pointer. The application shall define its own result structure, so normally the first operation the @code{dico_output_result} method does is typecasting @var{rp} to a pointer to that structure in order to be able to access its members. A result can conceptually contain several @dfn{parts}. For example, the result of a @samp{DEFINE} command can contain several definitions of the term. Similarly, the result of @samp{MATCH} contains one or more matches. The server obtains the exact number of parts in a result by calling the @code{dico_result_count} method (@pxref{dico_result_count}). When outputting a result, the server calls the @code{dico_output_result} in a loop, once for each result part. It passes the ordinal (zero-based) number of the part that needs to be output in the @var{n} parameter. It is guaranteed that @var{n} increases by one for each subsequent call of @code{dico_output_result} with the same @var{rp} parameter. The @var{str} parameter identifies the @dfn{output stream}. The @code{dico_output_result} function must format the requested part from the result and output it to that stream. To do so it should use one of the following functions: @deftypefn Function int dico_stream_write (dico_stream_t @var{str}, @ const void *@var{buf}, size_t @var{count}) Writes @var{count} bytes from the buffer pointed to by @var{buf} to the output stream @var{str}. Returns 0 on success, and non-zero on error. @end deftypefn @deftypefn Function int dico_stream_writeln (dico_stream_t @var{str}, @ const char *@var{buf}, size_t @var{size}) Same as @code{dico_stream_write}, but ends the output with a @kbd{newline} character (ASCII 10). @end deftypefn @node dico client @chapter Dico --- a client program. @cindex dico, a program The @command{dico} program is a console-based utility for querying dictionary servers. It has two operation modes. In @dfn{single query mode}, the utility performs a query, displays its result and exits immediately. This mode is entered if a word or a @acronym{URL} was given in the command line. In @dfn{interactive mode}, the utility enters a read-and-eval loop, in which it reads requests from the keyboard, performs the necessary searches, and displays obtained results on the screen. @menu * Single Query Mode:: * Interactive Mode:: * Initialization File:: * Autologin:: * Dico invocation:: @end menu @node Single Query Mode @section Single Query Mode @cindex single query mode The simplest way to use @command{dico} utility is to invoke it with a word as an argument, e.g.: @example $ dico entdeckung @end example In the example above, the utility will search definitions of the word @samp{entdeckung} using its default server name and database. The default server name is read from the initialization file (@pxref{Initialization File}). If it is not present, a predefined value specified at configuration time (@pxref{Default Server}) is used. The default database is @samp{!}, which means ``search in all available databases until a match is found, and then display all matches in that database''. There are two ways to change these defaults. First, you can use command line options. Secondly, you can use a @acronym{DICT URL}. Which method to use depends on your preferences. Both methods provide the same functionality for querying word definitions. However, command line options allow the user to query additional data from the server, which is impossible using @acronym{URL}s. @menu * dico options:: * urls:: @end menu @node dico options @subsection Dico Command Line Options To connect to a particular dictionary server, use the @option{--host} option, for example: @example $ dico --host dico.org entdeckung @end example To search in a particular database, use the @option{--database} (@option{-d}) option. For example, to display definitions from all databases: @example $ dico --database '*' entdeckung @end example @noindent Note single quotes around the asterisk. To get a list of databases offered by the server, use the @option{--dbs} (@option{-D}) option. In this case you may not give any non-option arguments. For example: @example $ dico --dbs @end example If you wish to get a list of matches, instead of definitions, use the @option{--match} (@option{-m}) option. For example, the following invocation will display all matches from all the databases: @example $ dico --database '*' --match entdeckung @end example The match mode uses @samp{.} strategy by default (@pxref{MATCH, strategy}), which means a server-dependent default strategy, which suits best for interactive spell checking. To select another strategy, use the @option{--strategy} (@option{-s}) option. If the remote server supports @samp{xlev} experimental capability (@pxref{Extended Commands, XLEV}, you may use the @option{--levdist} (@option{--levenshtein-distance}) option to set maximum Levenshtein distance, for example: @example $ dico --levdist 2 --match entdeckung @end example Note that setting the distance too high is impractical and may imply unnecessary strain on the server. To get a list of available matching strategies, with descriptions, use the @option{--strategies} (@option{-S}) option. @node urls @subsection DICT URL @cindex URL, using to query DICT server Another way to specify data for a query is by using @acronym{URL}, instead of a word to search, as in the example below: @example $ dico dict://gnu.org.ua/d:entdeckung @end example A @acronym{DICT} @acronym{URL} consists of the following parts: @example dict://@var{user};@var{pass}@@@var{host}:@var{port}/d:@var{word}:@var{database}:@var{n} dict://@var{user};@var{pass}@@@var{host}:@var{port}/m:@var{word}:@var{database}:@var{strat}:@var{n} @end example The @samp{/d} syntax requests the definition of @var{word}, whereas the @samp{/m} syntax queries for matches, and is similar to the @option{--match} option. Some or all of @samp{@var{user};@var{pass}@@}, @samp{:@var{port}}, @var{database}, @var{strat}, and and @var{n} may be omitted. The meaning of all @acronym{URL} parts and their default values (if appropriate) are explained in the table below: @table @var @item user The user name to use in authentication. Similar to the @option{--user} option. If @var{user} is omitted and cannot be retrieved by other means, no authentication is attempted. @xref{Autologin}, for a detailed description of authentication procedure and sources which are used to obtain authentication credentials. @item pass A shared key (password) for that user. This part is similar to the @option{--key} command line option. For compatibility with other @acronym{URL}s, @command{dico} tolerates a colon (instead of semicolon) as a delimiter between @var{user} and @var{pass}. If @var{user} is given, but @var{pass} is not, @command{dico} will ask you to supply a password interactively (@pxref{Autologin}). @item host Host name or @acronym{IP} address of the server to query. Same as the @option{--host} command line option. @item port Port number or service name (from @file{/etc/services}). If it is not present, the default of 2628 is used. Same as the @option{--port} command line option. @item word The word to look for. @item database The database to search in. If not given, @samp{!} is assumed. Same as the @option{--database} command line option. @item strat The matching strategy to use. If omitted, @samp{.} is assumed. Same as the @option{--strategy} command line option. @item n Extract and display the @var{n}th definition of the word. If omitted, all definitions are displayed. There is no command line option equivalent for this parameter, because it is used rarely. @end table Trailing colons may be omitted. For example, the following @acronym{URL}s might specify definitions or matches: @example dict://dict.org/d:shortcake: dict://dict.org/d:shortcake:* dict://dict.org/d:shortcake:wordnet: dict://dict.org/d:shortcake:wordnet:1 dict://dict.org/d:abcdefgh dict://dict.org/d:sun dict://dict.org/d:sun::1 dict://dict.org/m:sun dict://dict.org/m:sun::soundex dict://dict.org/m:sun:wordnet::1 dict://dict.org/m:sun::soundex:1 dict://dict.org/m:sun::: @end example @node Interactive Mode @section Interactive Mode If neither word nor @acronym{URL} nor any operation mode option were given on the command line, @command{dico} enters interactive mode. In this mode it reads commands from the standard input, executes them and displays results on the standard output. If the standard input is connected to a terminal, the readline and history facilities are enabled (@pxref{Command Line Editing, , Command Line Editing, readline, GNU Readline Library}). When in interactive mode, @command{dico} displays its prompt and waits for you to enter a command. The default prompt is the name of the program, followed by a @samp{greater than} sign and a single space: @example dico> _ @end example The input syntax is designed so as to save you the maximum amount of typing. If you type any word, the default action is to look up its definition using the default server and database settings, for example: @example @group dico> @kbd{man} From eng-swa, English-Swahili xFried/FreeDict Dictionary: man mwanamume @end group @end example To match the word, instead of defining it, prefix it with a slash, much as you do in @command{vi}: @example @group dico> /man From eng-swa, English-Swahili xFried/FreeDict Dictionary: 0) ``can'' 1) ``man'' 2) ``many'' 3) ``map'' 4) ``may'' 5) ``men'' @end group @end example Displayed is a list of matches retrieved using the default strategy. To see a definition for a particular match, type the number shown at its left. For example, to define ``men'': @example @group dico> 5 From eng-swa, English-Swahili xFried/FreeDict Dictionary: men wanaume @end group @end example Define and match are two basic actions. To discern from them, the rest of @command{dico} commands begin with a @dfn{command prefix}, a single punctuation character selected for this purpose. The default command prefix is a dot, but it can be changed using the @code{prefix} command (@pxref{Other Commands, prefix}). We will discuss the @command{dico} commands in the following subsections. @menu * Server Commands:: * Database and Strategy:: * Informational Commands:: * History Commands:: * Pager:: * Program Settings:: * Session Transcript:: * Other Commands:: * Command Summary:: @end menu @node Server Commands @subsection Server Commands @cindex open The @code{open} command establishes connection to a remote server. It takes up to two arguments, first of them specifying the IP or host name of the server, and the optional second one specifying the port number to connect to. For example: @example dico> .open gnu.org.ua @end example If any or both of its arguments are absent, the @code{open} command reuses the value supplied with its previous invocation, or, if it is issued for the first time, the default values. The default for server name is @samp{gnu.org.ua} and the default port number is 2628. Both values can be changed at configuration time, see @ref{Default Server} for a detailed instruction. Note that you are not required to issue this command. If it is not given, @command{dico} will attempt to establish a connection using its default settings before executing any command that requires a connection to the server. @cindex close The @code{close} command closes the connection. It does not take any arguments. @node Database and Strategy @subsection Database and Strategy @cindex database The @code{database} command changes or displays the database name which is used by define and match commands. To display the database name, type the command without arguments: @example @group dico> .database ! @end group @end example To change the database, give its name as an argument to the command: @example dico> .database * @end example Once the connection with the server is established, you may use command line completion facility to select the database from among those offered by the server. Typing @kbd{TAB} will show you a list of databases that begin with the characters you typed: @example dico> .database en@kbd{TAB} en-pl-naut eng-afr eng-deu eng-swa @end example If you supply enough characters to identify a single choice, @kbd{TAB} will automatically select it. In the example above, typing a @kbd{TAB} after @example dico> .database en- @end example @noindent completes the database name to: @example dico> .database en-pl-naut @end example @cindex strategy The @code{strategy} command displays or changes the default strategy name. As with @code{database}, the strategy completion is available for this command. @example @group dico> .strategy . dico> .strategy dlev @end group @end example @cindex distance If the remote server supports @samp{xlev} experimental capability (@pxref{Extended Commands, XLEV}), you can use the @code{distance} command to set the maximum Levenshtein distance for strategies that use Levenshtein algorithm. If used without arguments, this command displays the distance reported by the server and the configured distance, e.g.: @example @group dico> .distance Reported Levenshtein distance: 1 No distance configured @end group @end example If used with a single numeric argument, it attempts to set the distance to the supplied value. @node Informational Commands @subsection Informational Commands @cindex ls The @code{ls} command lists available strategies (@pxref{SHOW, SHOW STRAT}): @example dico> .ls exact "Match words exactly" prefix "Match word prefixes" soundex "Match using SOUNDEX algorithm" all "Match everything (experimental)" lev "Match headwords within given Levenshtein distance" dlev "Match headwords within given Damerau-Levenshtein distance" re "POSIX 1003.2 (modern) regular expressions" regexp "Old (basic) regular expressions" suffix "Match word suffixes" rev-qu "Reverse search in Quechua databases" @end example @kwindex ld The @code{ld} command lists available databases (@pxref{SHOW, SHOW DB}): @example dico> .ld eng-swa "English-Swahili xFried/FreeDict Dictionary" swa-eng "Swahili-English xFried/FreeDict Dictionary" afr-eng "Afrikaans-English FreeDict Dictionary" eng-afr "English-Afrikaans FreeDict Dictionary" @end example @cindex info The @code{info} command displays information about a database, whose name is given as its argument. If used without arguments, it displays information about the current database. @example dico> .info pl-en-naut pl-en-naut - A Polish-English dictionary of nautical terms. Copyright (C) 2008 Sergey Poznyakoff Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover and Back-Cover Texts. @end example @node History Commands @subsection History Commands @flindex .dico_history Each issued command is stored in a history list and assigned a unique @dfn{event number}. When @command{dico} exits, it saves the command history to a file named @file{.dico_history} in your home directory. Upon startup, it retrieves the history from this file, so the history is preserved between sessions. @cindex history You can view the command history using the @code{history} command: @example dico> .history 1) .open dict.org 2) entdeckung 3) /geschwindigkeit @end example A number of editing commands is provided, that allow you to refer to previous events from the history list and to edit them. For example, to re-issue the 3rd event from the above list, type @samp{!3}. The command with this index will be inserted at the @command{dico} prompt and you will be given a possibility to edit it. For a detailed description of all history-editing commands, please refer to @ref{Using History Interactively, , Using History Interactively, history, GNU History User Manual}. @node Pager @subsection Pager @cindex pager @vindex PAGER When a command produces output that contains more lines than there are rows on the terminal, @command{dico} attempts to use a @dfn{pager program} to display it. The name (and arguments) of the pager program are taken from the @command{dico} internal variable, or, if it is not set, from the @env{PAGER} environment variable. The @command{dico} pager setting can be examined or changed using the @code{pager} command. When used without arguments, it displays the current setting: @example dico> .pager less (Pager set from environment) @end example When used with a single argument, it sets the pager: @example dico> .pager "less -R" @end example The argument @samp{-} (a dash) disables pager. @node Program Settings @subsection Program Settings The commands described in this subsection are designed mostly for use in @command{dico} initialization file (@pxref{Initialization File}). @cindex autologin @cindex tilde expansion The @command{autologin} command sets the name of autologin file to be used for authentication. When used without arguments, it displays the current setting. The argument to @command{autologin} command is subject to @dfn{tilde expansion}, i.e. if it begins with @samp{~/}, this prefix is replaced with the name of the current user home directory, followed by @samp{/}. Similarly, a prefix @samp{~@var{login}/} is replaced by the home directory for user @var{login}, followed by a slash. @xref{Autologin}, for a detailed discussion of the autologin feature. @cindex quiet The @command{quiet} command toggles the display of @command{dico} startup banner. When started, @command{dico} prints a short list of information useful for beginning users: the program version and warranty conditions and a command to get help, e.g.: @example @group dico @value{VERSION} Copyright (C) 2005-2012 Sergey Poznyakoff License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type ? for help summary dico> @end group @end example If you find this output superfluous and useless, you can suppress it by setting @example quiet yes @end example @noindent in your initialization file. @node Session Transcript @subsection Session Transcript @cindex transcript @dfn{Session transcript} is a special mode, which displays raw @acronym{DICT} commands and answers as they are executed. It is useful for debugging purposes. You enable session transcript by issuing the following command: @example dico> .transcript yes # @r{or} dico> .transcript on @end example Starting from then, each @acronym{DICT} transaction will be displayed on standard error output, for example: @example dico> .open dico: Debug: S:220 Pirx.gnu.org.ua dicod (dico @value{VERSION}) <32004.1216639476@@gnu.org.ua> dico: Debug: C:CLIENT "dico 1.99.91" dico: Debug: S:250 ok dico: Debug: C:SHOW DATABASES dico: Debug: S:110 26 databases present @dots{} dico: Debug: S:. dico: Debug: S:250 ok dico: Debug: C:SHOW STRATEGIES dico: Debug: S:111 10 strategies present: list follows dico: Debug: S:exact "Match words exactly" dico: Debug: S:prefix "Match word prefixes" dico: Debug: S:soundex "Match using SOUNDEX algorithm" @dots{} dico: Debug: S:. dico: Debug: S:250 ok @end example In the example above, ellipses are used to replace long lists of data. As you see, session transcripts may produce large amount of output. To turn the session transcript off, use the following command: @example dico> .transcript no # @r{or} dico> .transcript off @end example Finally, to query the current state of session transcript, issue this command without arguments: @example @group dico> .transcript transcript is on @end group @end example @node Other Commands @subsection Other Commands @cindex prefix The @code{prefix} command queries or changes the current command prefix: @example @group dico> .prefix Command prefix is . dico> .prefix @@ dico> @@prefix Command prefix is @@ @end group @end example @cindex prompt The @code{prompt} command changes the @command{dico} command line prompt. For example, to change it to @samp{dico$}, followed by a single space, type: @example @group dico> .prompt "dico$ " dico$ _ @end group @end example Note the use of quotes to include the space character in the argument. @cindex help The @code{help} command displays a short command usage summary. For convenience, a single question mark can be used instead of it: @example dico> ? /WORD Match WORD. / Redisplay previous matches. NUMBER Define NUMBERth match. !NUMBER Edit NUMBERth previous command. .open [HOST [PORT]] Connect to a DICT server. .close Close the connection. @dots{} @end example @cindex version @cindex warranty The @code{version} command displays the package name and version number, and the @code{warranty} command displays the copyright statement. @cindex quit Finally, the @code{quit} command leaves the dico shell. Typing end-of-file character (@kbd{C-d}) has the same effect. @node Command Summary @subsection Dico Command Summary For convenience, this subsection lists all available @command{dico} commands along with their short description and a reference to the part of this manual where they are described in detail. The command names are given without prefix. @table @code @item open @var{host} @var{port} Connect to a @acronym{DICT} server. Both arguments are optional. If any of them is absent, the value supplied with the previous @code{open} command is used. If there was no previous value, the default is used, i.e., @samp{gnu.org.ua} for @var{host}, and 2628 for @var{port}. @xref{Server Commands, open}. @item close Close the connection. @xref{Server Commands, close}. @item autologin [@var{file}] Set or display the autologin file name. @xref{Autologin}. @item sasl [@var{bool}] Without argument, show whether the @acronym{SASL} authentication is enabled. With argument, enable or disable it, depending on the value of @var{bool}. @xref{Autologin}. @item database [@var{name}] Set or display the current database name. @xref{Database and Strategy, database}. @item strategy [@var{name}] Set or display the current strategy name. @xref{Database and Strategy, strategy}. @item distance [@var{num}] Set or query Levenshtein distance. This command takes effect only if the remote server supports @samp{xlev} experimental capability (@pxref{Extended Commands, XLEV}). @xref{Database and Strategy, distance}. @item ls List available matching strategies. @xref{Informational Commands, ls}. @item ld List all accessible databases. @xref{Informational Commands, ld}. @item info [@var{db}] Display information about the database @var{db}, or the current database, if used without argument. @item prefix [@var{c}] Set or display the command prefix. @xref{Other Commands, prefix}. @item transcript [@var{bool}] Set or display session transcript mode. @xref{Session Transcript}. @item verbose [@var{number}] Set or display debugging verbosity level. Currently (as of version @value{VERSION}) it is a no-op. @item prompt @var{string} Change command line prompt. @xref{Other Commands, prompt}. @item pager @var{string} Change or display pager settings. @xref{Pager}. @item history Display command history. @xref{History Commands}. @item help Display short command usage summary. @xref{Other Commands, help}. @item version Print program version. @xref{Other Commands, version}. @item warranty Print copyright statement. @xref{Other Commands, warranty}. @item quiet @var{bool} Toggle display of @command{dico} welcome banner. This command can be used only in initialization file. @xref{Program Settings, quiet}. @item quit Quit the shell. @xref{Other Commands, quit}. @end table @node Initialization File @section Initialization File @cindex init file @cindex initialization file @findex .dico When you start @command{dico}, it automatically executes commands from its @dfn{initialization files} (or @dfn{init files}, for short), normally called @file{.dico}. Two init files are read: the one located in your home directory, and the one from the current working directory. It is not an error if any or both of these files are absent. These files contain a series of @command{dico} commands, as described in @ref{Interactive Mode}, with the only difference that no command prefix is used by default. The @samp{#} character introduces a comment: any characters from (and including) @samp{#} up to the newline character are ignored@footnote{The same holds true for interactive mode as well, but you will hardly need comments on a terminal.}. Init files are useful to change the defaults for your @command{dico} invocation. Consider, for example, this init file: @example @group # An example init file for @command{dico} # Turn the welcome banner off quiet yes # Set the location of autologin file autologin ~/.dicologin # Use this server by default open dict.org # Search in all databases database * # Finally, set the custom command prefix prefix : @end group @end example Notice, that if you wish to change your command prefix, it is preferable to do it as a last command in your init file, as shown in this example. @node Autologin @section Autologin @cindex autologin feature @cindex authentication @cindex credentials After connecting to a remote server, @command{dico} checks if the server supports authentication and attempts to authenticate itself if so. To do this @command{dico} needs a set of parameters called @dfn{user credentials}. The exact set of credentials depends on the authentication mechanism being used, with user name and password being the two most important ones. The user credentials can be supplied from the following sources: @enumerate 1 @item Command line options @option{--user} and @option{--password}. @item An @acronym{URL} given as a command line argument (@pxref{urls, user}). @item Autologin files. @end enumerate These three sources are consulted in that order, i.e., a user name supplied with the @option{--user} command line option takes precedence over the one found in an @acronym{URL} and over any names supplied by autologin files. If, after consulting all these sources, the user name is established, while the password is not, the resulting action depends on whether the standard input is connected to a terminal. If it is, @command{dico} will ask the user to supply a password. If it is not, authentication is aborted and connection to the server is closed. Some authentication mechanisms require additional credentials. For example, GSSAPI authentication requires a @dfn{service name}. These credentials can be supplied only in autologin file. @findex .dicologin @cindex autologin file @dfn{Autologin file} is a plaintext file that contains authentication information for various @acronym{DICT} servers. At most two autologin files are consulted: first the session-specific file, if it is supplied by @command{autologin} command (@pxref{Program Settings, autologin}) or by the @option{--autologin} command line option, next the default file @file{.dicologin} in the user's home directory. The default autologin file is examined only if no matching record was found in the session-specific one. The autologin file format is similar to that of @file{.netrc} file used by @command{ftp} utility. Comments are introduced by a pound sign. Anything starting from @samp{#} up to the end of physical line is ignored. Empty lines and comments are ignored. Non-empty lines constitute @dfn{statements}. Tokens in a statement are separated with spaces, tabs, or newlines. A valid statement must begin with one of the following: @table @code @kwindex machine@r{, autologin keyword} @item machine @var{name} This statement contains parameters for authenticating on machine @var{name}. @kwindex default, autologin keyword @item default This statement contains parameters for authenticating on any machine, except those explicitly listed in @code{machine} statements. There can be at most one @code{default} statement in autologin file. Its exact location does not matter, it will always be matched after all explicit @code{machine} statements. @end table During the lookup, @command{dico} searches the autologin file for a @code{machine} statement whose @var{name} matches the remote server name as given by @option{--host} command line option, host part of an @acronym{URL} (@pxref{urls}), or the argument to the @code{open} command (@pxref{Server Commands, open}). If it reaches end of the file without having found such an entry, it uses the @code{default} value, if available. Once a matching entry is found, its subsequent tokens are analyzed. The following tokens are recognized: @table @code @kwindex login, autologin keyword @item login @var{name} Supply user name for this server. @kwindex password, autologin keyword @item password @var{string} Supply a password. @kwindex noauth, autologin keyword @item noauth Do not perform authentication on this machine. @kwindex sasl, autologin keyword @item sasl Enable @acronym{SASL} authentication. @kwindex nosasl, autologin keyword @item nosasl Disable @acronym{SASL} authentication. @kwindex mechanisms, autologin keyword @item mechanisms @var{list} Declare acceptable @acronym{SASL} mechanisms. The @var{list} argument is a comma-separated list of mechanism names, without intervening whitespace. Multiple @code{mechanisms} may be given, in which case the corresponding lists are concatenated. @kwindex service, autologin keyword @item service @var{name} Declare service name, for authentication methods that need it. If this token is omitted, the default service name @samp{dico} is used. @kwindex realm, autologin keyword @item realm @var{name} Declare realm for authentication. @kwindex host, autologin keyword @item host @var{name} Set host name for this machine. By default, it is determined automatically. @end table Consider the following autologin entry, for example: @example @group machine a.net user smith password guessme machine b.net sasl mechanisms gssapi,digest-md5 realm example.net service dico user smith password guessme default noauth @end group @end example When connecting to the server @samp{a.net}, @command{dico} will attempt the usual @acronym{APOP} authentication as user @samp{smith} with password @samp{guessme}. When connecting to the machine @samp{b.net}, it will use @acronym{SASL} authentication, via either @acronym{GSSAPI} or @acronym{DIGEST-MD5} mechanisms, with realm name @samp{example.net}, service name @samp{dico} and the same user name and password, as for @samp{a.net}. The authentication mechanism is suppressed if the @command{--noauth} option has been given in the command line, or a matching entry was found in one of the autologin files, which contained the @code{noauth} keyword. @node Dico invocation @section Dico invocation This section contains a short summary of @command{dico} command line options. @subheading Command Line The following table summarizes the four existing ways of @command{dico} invocation: @table @command @item dico [@var{options}] @var{word} Connect to the dictionary and define or match a @var{word}. @xref{dico options}. @item dico [@var{options}] @var{url} Connect to the dictionary and define or match a word, supplied in the @var{url}. @xref{urls}. @item dico [@var{options}] @var{opmode} Connect to the dictionary and query the information required by @var{opmode} option, which is one of @option{--dbs}, @option{--strategies}, @option{--serverhelp}, @option{--info}, or @option{--serverinfo}. See below (@pxref{dico-opmode, Operation modes}) for a description. @item dico [@var{options}] Start interactive shell. @xref{Interactive Mode}. @end table @subheading Server selection options: @table @option @item --host=@var{server} Connect to this server. @xref{dico options, --host}. @item --port=@var{port} @itemx -p @var{port} Specify the port to connect to. The argument @var{port} can be either a port number or its symbolic service name, as listed in @file{/etc/services}. @item --database=@var{name} @itemx -d @var{name} Select a database to search. The @var{name} can be either a name of one of the databases offered by the server (as returned by @option{--dbs} option), or one of the predefined database names: @samp{!} or @samp{*}. @xref{dico options, --database}. @item --source=@var{addr} Set source address for @acronym{TCP} connections. @end table @subheading Operation modifiers @table @option @item --match @itemx -m Match instead of define. @xref{dico options,--match}. @item --strategy=@var{name} @itemx -s @var{name} Select a strategy for matching. The argument is either a name of one of the matching strategies supported by server (as displayed by @option{--strategies} option) or a dot (@samp{.}) meaning a server-dependent default strategy. This option implies @option{--match}. @xref{dico options,--strategy}. @item --levdist=@var{n} @itemx --levenshtein-distance=@var{n} Sets maximum Levenshtein distance. Allowed values of @var{n} are between 1 and 9 inclusively. This option has effect only if the remote server supports @samp{xlev} extension (@pxref{Extended Commands, XLEV}). @xref{dico options,--levdist}. @item --quiet @itemx -q Do not print the normal @command{dico} welcome banner when entering interactive shell. @xref{Program Settings, quiet}. @end table @anchor{dico-opmode} @subheading Operation modes @table @option @item --dbs @itemx -D Show available databases. @xref{dico options, --dbs}. @itemx --strategies @itemx -S Show available search strategies. @xref{dico options, --strategies}. @item --serverhelp @itemx -H Show server help. @item --info=@var{dbname} @itemx -i @var{dbname} Show information about database @var{dbname}. @item --serverinfo @itemx -I Show information about the server. @end table @subheading Authentication @table @option @item --noauth @itemx -a Disable authentication. @xref{Autologin}. @item --sasl Enable @acronym{SASL} authentication, if the server supports it. @xref{Autologin}. @item --nosasl Disable @acronym{SASL} authentication. @xref{Autologin}. @item --user=@var{name} @item -u @var{name} Set user name for authentication. @xref{Autologin}. @item --key=@var{string} @itemx -k @var{string} @itemx --password=@var{string} Set shared secret for authentication. @xref{Autologin}. @item --autologin=@var{name} Set the name of autologin file to use. @xref{Autologin}. @item --client=@var{string} @itemx -c @var{string} Additional text for client command, instead of the default @samp{GNU dico @value{VERSION}}. @end table @subheading Debugging options @table @option @item --transcript @itemx -t Enable session transcript. @xref{Session Transcript}, for a description. @item --verbose @itemx -v Increase debugging verbosity level. @item --time-stamp Include time stamp in the debugging output. @item --source-info Include source line information in the debugging output. @end table @subheading Other options @table @option @item --help @itemx -h Display a short description of command line options. @item --usage Display a short usage message @item --version Print program version. @end table @node gcider @chapter GCIDER @cindex GCIDE @cindex gcider @cindex GNU Collaborative International Dictionary of English @command{Gcider} is a window-based application for browsing the @dfn{GNU Collaborative International Dictionary of English} (@acronym{GCIDE}). When started, it launches a copy of @command{dicod} with a specially crafted configuration file and interfaces with it via stdin/stdout. For operation it needs to know the location of the @command{dicod} binary and of the directory where the @acronym{GCIDE} files reside. When started for the first time it will present you with a dialog box to help it locate the needed components. The location of the @command{dicod} binary is normally guessed by scanning the @env{PATH} environment variable. The only parameter you need to supply is the directory where the dictionary files reside. Once these data are entered, the program will save them in its configuration file (located in @file{~/.gcider}) and will reuse them in subsequent invocations. The @command{gcider} user documentation is available online at @uref{http://dico.gnu.org.ua/gcider.html}. The program display is organized in three areas, ordered vertically. The topmost area is the @dfn{menu bar}, which contains pull-down menus. It is followed by a @dfn{search control} area. It provides an input line for you to enter the term to look-up in the dictionary, a set of widgets for bringing back prior inputs from the history and for controlling the search types and matching strategies. The area that follows presents two windows, side by side. The leftmost one is the @dfn{article window}, where definitions of the search terms are shown. The rightmost one is the @dfn{match list}, which will present the results of the recent @dfn{match} command. Finally, at the very bottom of the @command{gcider} window is located the @dfn{status bar}. Its purpose is twofold. First, it displays a status of the last search. Secondly, it provides a terse contextual help describing what you can do using the widget your mouse pointer points to. To look up a word, type it in the input line in the search area and hit @kbd{CR} or click on the @samp{Define} button. The definition, if found, is then displayed in the article window. This text may contain @dfn{cross-references} to other words in the dictionary, which are shown underlined, to draw your attention. To define a cross-reference, click on it with your mouse. You can also define any other word from the text. To do so, select it and click on the right button. Then, in the menu that will appear, select @samp{Define}. If you are not sure about the exact spelling of your search term, try searching for closest matches first. To do so, click on @samp{Match} instead of @samp{Define}. To find closest matches for a word in a definition, select the word (or part of it) and select @samp{Match} in the contextual menu. In both cases, the program will try to match the word using the @dfn{strategy} selected currently in the strategy widget at the right of the search control area. Matching headwords will then be displayed in a listbox to the right of the article window. Clicking on a headword will bring its definition to the article window. To select a match strategy, click on the strategy widget and select the desired strategy in the pop-down list that will appear. The list contains short strategy names. To help you select the right one, the status line will show a full description of the currently highlighted strategy. Those search terms for which a definition was found are saved in a @dfn{history list}. Several ways are provided to retrieve definitions from that list. First, clicking on the input widget brings a popdown list with all headwords from the history list shown in a reverse chronological order. Selecting a word from that list brings back its definition. Secondly, two special buttons to the right of the input widget can be used to navigate through the history. The button marked with a left arrow brings back previous definition, whereas the one marked with a right arrow brings back next definition. By default the history list can accommodate up to 500 search terms. Once this limit reached, adding a new term to the list discards the oldest item, so that the total list length remains the same. Actual length of the history list can be configured using the @file{Edit/Appearance} menu. @node Reporting Bugs @chapter How to Report a Bug Email bug reports to @email{bug-dico@@gnu.org} or @email{bug-dico@@gnu.org.ua}. Please include a detailed description of the bug and information about the conditions under which it occurs, so we can reproduce it. To facilitate the task, the following list shows the basic set of information needed in order to find the bug: @itemize @item Package version you use. The output of @command{dicod --version} will do. @item A detailed description of the bug. @item Conditions under which the bug appears. @item It is often helpful to send the contents of @file{config.log} file along with your bug report. This file is created after running @command{./configure} in the source root directory of GNU Dico. @end itemize @node Available Strategies @appendix Available Strategies @include strat.texi @node Dictionary Server Protocol @appendix Dictionary Server Protocol @include proto.texi @node Time and Date Formats @appendix Time and Date Formats @include strftime.texi @node Libdico @appendix The Libdico Library @include libdico.texi @node Copying This Manual @appendix GNU Free Documentation License @include fdl.texi @node Concept Index @comment node-name, next, previous, up @unnumbered Concept Index This is a general index of all issues discussed in this manual. @printindex cp @bye dico-2.2/doc/fdl.texi000066400000000000000000000560151172612674100145160ustar00rootroot00000000000000@c The GNU Free Documentation License. @center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. @uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The ``publisher'' means any person or entity that distributes copies of the Document to the public. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation 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. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. @item RELICENSING ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site. ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. @end enumerate @page @heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with@dots{}Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: dico-2.2/doc/gendocs_template000066400000000000000000000063521172612674100163150ustar00rootroot00000000000000 Dico - GNU Dictionary Server

The manual for %%PACKAGE%% is available in the following formats:

A separate user manual for gcider is available online.

(This page is generated by the %%SCRIPTNAME%% script.)

dico-2.2/doc/libdico.texi000066400000000000000000000470251172612674100153570ustar00rootroot00000000000000@c @appendix The Libdico Library @menu * strat:: * argcv:: * lists:: * assoc:: * diag:: * filter:: * parseopt:: * stream:: * url:: * utf8:: * util:: * xlat:: @end menu @node strat @section Strategies @UNREVISED @smallexample struct dico_strategy @{ char *name; char *descr; dico_select_t sel; void *closure; int is_default; @}; @end smallexample @deftypefn Function dico_strategy_t dico_strategy_dup (const dico_strategy_t @ @var{strat}) @end deftypefn @deftypefn Function dico_strategy_t dico_strategy_find (const char *@var{name}) @end deftypefn @deftypefn Function int dico_strategy_add (const dico_strategy_t @var{strat}) @end deftypefn @deftypefn Function dico_iterator_t dico_strategy_iterator (void) @end deftypefn @deftypefn Function void dico_strategy_iterate (dico_list_iterator_t @ @var{itr}, void *@var{data}) @end deftypefn @deftypefn Function size_t dico_strategy_count (void) @end deftypefn @deftypefn Function int dico_set_default_strategy (const char *@var{name}) @end deftypefn @deftypefn Function {const dico_strategy_t} dico_get_default_strategy (void) @end deftypefn @deftypefn Function int dico_strategy_is_default_p (dico_strategy_t @var{strat}) @end deftypefn @node argcv @section argcv @UNREVISED @deftp enum dico_argcv_quoting_style @end deftp @deftypevr Variable {enum dico_argcv_quoting_style} dico_argcv_quoting_style @end deftypevr @deftypefn Function int dico_argcv_get (const char *@var{command}, @ const char *@var{delim}, const char *@var{cmnt}, @ int *@var{argc}, char ***@var{argv}) @deftypefnx Function int dico_argcv_get_n (const char *@var{command}, @ int @var{len}, @ const char *@var{delim}, const char *@var{cmnt}, @ int *@var{argc}, char ***@var{argv}) @deftypefnx Function int dico_argcv_get_np (const char *@var{command}, @ int @var{len}, @ const char *@var{delim}, const char *@var{cmnt}, @ int @var{flags}, @ int *@var{argc}, char ***@var{argv}, char **@var{endp}) @end deftypefn @deftypefn Function int dico_argcv_string (int @var{argc}, @ const char **@var{argv}, char **@var{string}) @end deftypefn @deftypefn Function void dico_argcv_free (int @var{argc}, char **@var{argv}) @end deftypefn @deftypefn Function void dico_argv_free (char **@var{argv}) @end deftypefn @deftypefn Function int dico_argcv_unquote_char (int @var{c}) @end deftypefn @deftypefn Function int dico_argcv_quote_char (int @var{c}) @end deftypefn @deftypefn Function size_t dico_argcv_quoted_length (const char *@var{str}, @ int *@var{quote}) @end deftypefn @deftypefn Function void dico_argcv_unquote_copy (char *@var{dst}, @ const char *@var{src}, size_t @var{n}) @end deftypefn @deftypefn Function void dico_argcv_quote_copy (char *@var{dst}, @ const char *@var{src}) @end deftypefn @deftypefn Function void dico_argcv_remove (int *@var{argc}, @ char ***@var{argv}, @ int (*@var{sel}) (const char *, void *), void *@var{data}) @end deftypefn @node lists @section Lists @UNREVISED @deftp Type dico_list_t @end deftp @deftp Type dico_iterator_t @end deftp @deftp {Function Type} dico_list_iterator_t @smallexample typedef int (*dico_list_iterator_t)(void *item, void *data); @end smallexample @end deftp @deftp {Function Type} dico_list_comp_t @smallexample typedef int (*dico_list_comp_t)(const void *, const void *); @end smallexample @end deftp @deftypefn Function dico_list_t dico_list_create (void) @end deftypefn @deftypefn Function void dico_list_destroy (dico_list_t *@var{list}, @ dico_list_iterator_t @var{free}, void *@var{data}) @end deftypefn @deftypefn Function void dico_list_iterate (dico_list_t @var{list}, @ dico_list_iterator_t @var{itr}, void *@var{data}) @end deftypefn @deftypefn Function {void *} dico_list_item (dico_list_t @var{list}, @ size_t @var{n}) @end deftypefn @deftypefn Function size_t dico_list_count (dico_list_t @var{list}) @end deftypefn @deftypefn Function int dico_list_append (dico_list_t @var{list}, void *@var{data}) @end deftypefn @deftypefn Function int dico_list_prepend (dico_list_t @var{list}, void *@var{data}) @deftypefnx Function int dico_list_push (dico_list_t @var{list}, void *@var{data}) @end deftypefn @deftypefn Function int dico_list_insert_sorted (dico_list_t @var{list}, @ void *@var{data}, dico_list_comp_t @var{cmp}) @end deftypefn @deftypefn Function dico_list_t dico_list_intersect (dico_list_t @var{a}, @ dico_list_t @var{b}, dico_list_comp_t @var{cmp}) @end deftypefn @deftypefn Function int dico_list_intersect_p (dico_list_t @var{a}, @ dico_list_t @var{b}, dico_list_comp_t @var{cmp}) @end deftypefn @deftypefn Function {void *} dico_list_pop (dico_list_t @var{list}) @end deftypefn @deftypefn Function {void *} dico_list_locate (dico_list_t @var{list}, @ void *@var{data}, dico_list_comp_t @var{cmp}) @end deftypefn @deftypefn Function {void *} dico_list_remove (dico_list_t @var{list}, @ void *@var{data}, dico_list_comp_t @var{cmp}) @end deftypefn @deftypefn Function {void *} dico_iterator_current (dico_iterator_t @var{itr}) @end deftypefn @deftypefn Function dico_iterator_t dico_iterator_create (dico_list_t @var{list}) @end deftypefn @deftypefn Function void dico_iterator_destroy (dico_iterator_t *@var{pitr}) @end deftypefn @deftypefn Function {void *} dico_iterator_first (dico_iterator_t @var{itr}) @end deftypefn @deftypefn Function {void *} dico_iterator_next (dico_iterator_t @var{itr}) @end deftypefn @deftypefn Function {void *} dico_iterator_remove_current (dico_iterator_t @var{itr}) @end deftypefn @deftypefn Function void dico_iterator_set_data (dico_iterator_t @var{itr}, @ void *@var{data}) @end deftypefn @node assoc @section Associative lists @UNREVISED @smallexample struct dico_assoc @{ char *key; char *value; @}; @end smallexample @deftp Type dico_assoc_list_t @end deftp @deftypefn Function dico_assoc_list_t dico_assoc_create (void) @end deftypefn @deftypefn Function void dico_assoc_destroy (dico_assoc_list_t *@var{passoc}) @end deftypefn @deftypefn Function int dico_assoc_add (dico_assoc_list_t @var{assoc}, @ const char *@var{key}, const char *@var{value}) @end deftypefn @deftypefn Function {const char *} dico_assoc_find (@ dico_assoc_list_t @var{assoc}, const char *@var{key}) @end deftypefn @deftypefn Function void dico_assoc_remove (@ dico_assoc_list_t @var{assoc}, const char *@var{key}) @end deftypefn @node diag @section Diagnostics Functions @UNREVISED @table @var @item L_DEBUG @item L_INFO @item L_NOTICE @item L_WARN @item L_ERR @item L_CRIT @item L_ALERT @item L_EMERG @end table @deftypevr Variable {const char *} dico_program_name @end deftypevr @deftypevr Variable {const char *} dico_invocation_name @end deftypevr @deftypefn Function void dico_set_program_name (char *@var{name}) @end deftypefn @deftypefn {Function Type} void dico_log_printer_t (@ int @var{lvl}, int @var{exitcode}, int @var{errcode}, @ const char *@var{fmt}, @ va_list @var{ap}) @end deftypefn @deftypefn Function void dico_set_log_printer (dico_log_printer_t @var{prt}) @end deftypefn @deftypefn Function void dico_vlog (@ int @var{lvl}, int @var{errcode}, const char *@var{fmt}, va_list @var{ap}) @end deftypefn @deftypefn Function void dico_log (int @var{lvl}, int @var{errcode}, @ const char *@var{fmt}, ...) @end deftypefn @deftypefn Function void dico_die (int @var{exitcode}, int @var{lvl}, @ int @var{errcode}, char *@var{fmt}, ...) @end deftypefn @deftypefn Function int dico_str_to_diag_level (const char *@var{str}) @end deftypefn @deftypefn Function dico_stream_t dico_log_stream_create (int @var{level}) @end deftypefn @node filter @section Filter @defvr Define FILTER_ENCODE @end defvr @defvr Define FILTER_DECODE @end defvr @deftp {Function Type} filter_xcode_t @smallexample typedef int (*filter_xcode_t) (const char *, size_t, char *, size_t, size_t *, size_t, size_t *); @end smallexample @end deftp @deftypefn Function dico_stream_t filter_stream_create ( @ dico_stream_t @var{str}, @ size_t @var{min_level}, @ size_t @var{max_line_length}, @ filter_xcode_t @var{xcode}, @ int @var{mode}) @end deftypefn @deftypefn Function dico_stream_t dico_codec_stream_create (@ const char *@var{encoding}, int @var{mode}, dico_stream_t @ @var{transport}) @end deftypefn @deftypefn Function dico_stream_t dico_base64_stream_create (@ dico_stream_t @var{str}, int @var{mode}) @end deftypefn @deftypefn Function dico_stream_t dico_qp_stream_create (@ dico_stream_t @var{str}, int @var{mode}) @end deftypefn @deftypefn Function int dico_base64_input (char @var{c}) @end deftypefn @deftypefn Function int dico_base64_decode (@ const char *@var{iptr}, size_t @var{isize}, @ char *@var{optr}, size_t @var{osize}, @ size_t *@var{pnbytes}, @ size_t @var{line_max}, size_t *@var{pline_len}) @end deftypefn @deftypefn Function int dico_base64_encode (@ const char *@var{iptr}, size_t @var{isize}, @ char *@var{optr}, size_t @var{osize}, @ size_t *@var{pnbytes}, size_t @var{line_max}, @ size_t *@var{pline_len}) @end deftypefn @deftypefn Function int dico_qp_decode (@ const char *@var{iptr}, size_t @var{isize}, @ char *@var{optr}, size_t @var{osize}, @ size_t *@var{pnbytes}, @ size_t @var{line_max}, size_t *@var{pline_len}) @end deftypefn @deftypefn Function int dico_qp_encode (@ const char *@var{iptr}, size_t @var{isize}, @ char *@var{optr}, size_t @var{osize}, @ size_t *@var{pnbytes}, @ size_t @var{line_max}, size_t *@var{pline_len}) @end deftypefn @node parseopt @section parseopt @UNREVISED @table @code @item DICO_PARSEOPT_PARSE_ARGV0 @item DICO_PARSEOPT_PERMUTE @end table @deftp Enumeration dico_opt_type @table @code @item dico_opt_null @item dico_opt_bool @item dico_opt_bitmask @item dico_opt_bitmask_rev @item dico_opt_long @item dico_opt_string @item dico_opt_enum @item dico_opt_const @item dico_opt_const_string @end table @end deftp @deftp struct dico_option @smallexample struct dico_option @{ const char *name; size_t len; enum dico_opt_type type; void *data; union @{ long value; const char **enumstr; @} v; int (*func) (struct dico_option *, const char *); @}; @end smallexample @end deftp @deffn Macro DICO_OPTSTR name @end deffn @deftypefn Function int dico_parseopt (struct dico_option *@var{opt}, @ int @var{argc}, char **@var{argv}, int @var{flags}, int *@var{index}) @end deftypefn @node stream @section stream @UNREVISED @deftypefn Function int dico_stream_create (dico_stream_t *@var{pstream}, @ int @var{flags}, void *@var{data}) @table @code @item DICO_STREAM_READ @item DICO_STREAM_WRITE @item DICO_STREAM_SEEK @end table @end deftypefn @deftypefn Function int dico_stream_open (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function void dico_stream_set_open (@ dico_stream_t @var{stream}, int (*@var{openfn}) (void *, int)) @end deftypefn @deftypefn Function void dico_stream_set_seek (@ dico_stream_t @var{stream}, @ int (*@var{fun_seek}) (void *, off_t, int, off_t *)) @end deftypefn @deftypefn Function void dico_stream_set_size (@ dico_stream_t @var{stream}, int (*@var{sizefn}) (void *, off_t *)) @end deftypefn @deftypefn Function void dico_stream_set_read (@ dico_stream_t @var{stream}, @ int (*@var{readfn}) (void *, char *, size_t, size_t *)) @end deftypefn @deftypefn Function void dico_stream_set_write (@ dico_stream_t @var{stream}, @ int (*@var{writefn}) (void *, const char *, size_t, size_t *)) @end deftypefn @deftypefn Function void dico_stream_set_flush (@ dico_stream_t @var{stream}, int (*@var{flushfn}) (void *)) @end deftypefn @deftypefn Function void dico_stream_set_close (@ dico_stream_t @var{stream}, int (*@var{closefn}) (void *)) @end deftypefn @deftypefn Function void dico_stream_set_destroy (@ dico_stream_t @var{stream}, int (*@var{destroyfn}) (void *)) @end deftypefn @deftypefn Function void dico_stream_set_ioctl (@ dico_stream_t @var{stream}, int (*@var{ctl}) (void *, int, void *)) @end deftypefn @deftypefn Function void dico_stream_set_error_string (@ dico_stream_t @var{stream}, @ const char *(*@var{error_string}) (void *, int)) @end deftypefn @deftypefn Function int dico_stream_set_buffer (@ dico_stream_t @var{stream}, @ enum dico_buffer_type @var{type}, @ size_t size) @deftp Enumeration dico_buffer_type @table @code @item dico_buffer_none @item dico_buffer_line @item dico_buffer_full @end table @end deftp @end deftypefn @deftypefn Function off_t dico_stream_seek (@ dico_stream_t @var{stream}, off_t @var{offset}, int @var{whence}) @table @code @item DICO_SEEK_SET @item DICO_SEEK_CUR @item DICO_SEEK_END @end table @end deftypefn @deftypefn Function int dico_stream_size (dico_stream_t @var{stream}, @ off_t *@var{psize}) @end deftypefn @deftypefn Function int dico_stream_read_unbuffered (@ dico_stream_t @var{stream}, @ void *@var{buf}, size_t @var{size}, @ size_t *@var{pread}) @end deftypefn @deftypefn Function int dico_stream_write_unbuffered (@ dico_stream_t @var{stream}, @ const void *@var{buf}, size_t @var{size}, @ size_t *@var{pwrite}) @end deftypefn @deftypefn Function int dico_stream_read (@ dico_stream_t @var{stream},@ void *@var{buf}, size_t @var{size},@ size_t *@var{pread}) @end deftypefn @deftypefn Function int dico_stream_readln (@ dico_stream_t @var{stream},@ char *@var{buf}, size_t @var{size},@ size_t *@var{pread}) @end deftypefn @deftypefn Function int dico_stream_getdelim (@ dico_stream_t @var{stream},@ char **@var{pbuf}, size_t *@var{psize},@ int @var{delim}, size_t *@var{pread}) @end deftypefn @deftypefn Function int dico_stream_getline (@ dico_stream_t @var{stream},@ char **@var{pbuf}, size_t *@var{psize},@ size_t *@var{pread}) @end deftypefn @deftypefn Function int dico_stream_write (@ dico_stream_t @var{stream}, const void *@var{buf}, size_t @var{size}) @end deftypefn @deftypefn Function int dico_stream_writeln (@ dico_stream_t @var{stream}, const char *@var{buf}, size_t @var{size}) @end deftypefn @deftypefn Function int dico_stream_ioctl (@ dico_stream_t @var{stream}, int @var{code}, void *@var{ptr}) @end deftypefn @deftypefn Function {const char *} dico_stream_strerror (@ dico_stream_t @var{stream}, int @var{rc}) @end deftypefn @deftypefn Function int dico_stream_last_error (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function void dico_stream_clearerr (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function int dico_stream_eof (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function int dico_stream_flush (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function int dico_stream_close (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function void dico_stream_destroy (dico_stream_t *@var{stream}) @end deftypefn @deftypefn Function off_t dico_stream_bytes_in (dico_stream_t @var{stream}) @end deftypefn @deftypefn Function off_t dico_stream_bytes_out (dico_stream_t @var{stream}) @end deftypefn @node url @section url @UNREVISED @deftp struct dico_url @smallexample #define DICO_REQUEST_DEFINE 0 #define DICO_REQUEST_MATCH 1 struct dico_request @{ int type; char *word; char *database; char *strategy; unsigned long n; @}; struct dico_url @{ char *string; char *proto; char *host; int port; char *path; char *user; char *passwd; dico_assoc_list_t args; struct dico_request req; @}; @end smallexample @end deftp @deftp Pointer dico_url_t @end deftp @deftypefn Function int dico_url_parse (dico_url_t *@var{purl}, @ const char *@var{str}) @end deftypefn @deftypefn Function void dico_url_destroy (dico_url_t *@var{purl}) @end deftypefn @deftypefn Function {const char *} dico_url_get_arg (@ dico_url_t @var{url}, const char *@var{argname}) @end deftypefn @deftypefn Function {char *} dico_url_full_path (dico_url_t @var{url}) @end deftypefn @node utf8 @section UTF-8 @UNREVISED @deftypefn Function size_t utf8_char_width (const unsigned char *@var{cp}) @end deftypefn @deftypefn Function size_t utf8_strlen (const char *@var{str}) @end deftypefn @deftp struct utf8_iterator @smallexample struct utf8_iterator @{ char *string; char *curptr; unsigned curwidth; @}; @end smallexample @end deftp @deftypefn Function int utf8_iter_isascii (struct utf8_iterator @var{itr}) @end deftypefn @deftypefn Function int utf8_iter_end_p (struct utf8_iterator *@var{itr}) @end deftypefn @deftypefn Function int utf8_iter_first (struct utf8_iterator *@var{itr}, @ unsigned char *@var{ptr}) @end deftypefn @deftypefn Function int utf8_iter_next (struct utf8_iterator *@var{itr}) @end deftypefn @deftypefn Function int utf8_mbtowc_internal (void *@var{data}, @ int (*@var{read}) (void*), unsigned int *@var{pwc}) @end deftypefn @deftypefn Function int utf8_wctomb (unsigned char *@var{r}, @ unsigned int @var{wc}) @end deftypefn @deftypefn Function int utf8_symcmp (unsigned char *@var{a}, @ unsigned char *@var{b}) @end deftypefn @deftypefn Function int utf8_symcasecmp (unsigned char *@var{a}, @ unsigned char *@var{b}) @end deftypefn @deftypefn Function int utf8_strcasecmp (unsigned char *@var{a}, @ unsigned char *@var{b}) @end deftypefn @deftypefn Function int utf8_strncasecmp (unsigned char *@var{a}, @ unsigned char *@var{b}, size_t @var{maxlen}) @end deftypefn @deftypefn Function unsigned utf8_wc_toupper (unsigned @var{wc}) @end deftypefn @deftypefn Function int utf8_toupper (char *@var{s}, size_t @var{len}) @end deftypefn @deftypefn Function unsigned utf8_wc_tolower (unsigned @var{wc}) @end deftypefn @deftypefn Function int utf8_tolower (char *@var{s}, size_t @var{len}) @end deftypefn @deftypefn Function size_t utf8_wc_strlen (const unsigned *@var{s}) @end deftypefn @deftypefn Function {unsigned *} utf8_wc_strdup (const unsigned *@var{s}) @end deftypefn @deftypefn Function size_t utf8_wc_hash_string (const unsigned *@var{ws}, @ size_t @var{n_buckets}) @end deftypefn @deftypefn Function int utf8_wc_strcmp (const unsigned *@var{a}, @ const unsigned *@var{b}) @end deftypefn @deftypefn Function int utf8_wc_to_mbstr (const unsigned *@var{wordbuf}, @ size_t @var{wordlen}, char *@var{s}, size_t @var{size}) @end deftypefn @deftypefn Function int utf8_mbstr_to_wc (const char *@var{str}, @ unsigned **@var{wptr}) @end deftypefn @deftypefn Function int utf8_mbstr_to_norm_wc (const char *@var{str}, @ unsigned **@var{wptr}) @end deftypefn @deftypefn Function int dico_levenshtein_distance (const char *@var{a}, @ const char *@var{b}, int @var{flags}) @table @code @item DICO_LEV_NORM @item DICO_LEV_DAMERAU @end table @end deftypefn @deftypefn Function int dico_soundex (const char *@var{s}, @ char @var{codestr}[DICO_SOUNDEX_SIZE]) @defvr Define DICO_SOUNDEX_SIZE 5 @end defvr @end deftypefn @node util @section util @UNREVISED @deftypefn Function {char *} dico_full_file_name (const char *@var{dir}, @ const char *@var{file}) @end deftypefn @deftypefn Function size_t dico_trim_nl (char *@var{buf}) @end deftypefn @deftypefn Function size_t dico_trim_ws (char *@var{buf}) @end deftypefn @node xlat @section xlat @UNREVISED @deftp struct xlat_tab @smallexample struct xlat_tab @{ char *string; int num; @}; @end smallexample @end deftp @deftypefn Function int xlat_string (struct xlat_tab *@var{tab}, @ const char *@var{string}, size_t @var{len}, @ int @var{flags}, int *@var{result}) @deftypefnx Function int xlat_c_string (struct xlat_tab *@var{tab}, @ const char *@var{string}, @ int @var{flags}, int *@var{result}); @table @code @item XLAT_ICASE @end table @end deftypefn dico-2.2/doc/macros.texi000066400000000000000000000006041172612674100152260ustar00rootroot00000000000000@macro xopindex{option,text} @opindex \option\, --\option\ @r{option, \text\} @end macro @macro opsummary{option} @c option --\option\ @ifclear ANCHOR--\option\ @set ANCHOR--\option\ 1 @anchor{--\option\} @end ifclear @xopindex{\option\, summary} @end macro @macro xprindex{option} @ifclear ANCHOR-PR-\option\ @set ANCHOR-PR-\option\ 1 @anchor{pragma \option\} @end ifclear @end macro dico-2.2/doc/proto.texi000066400000000000000000000330411172612674100151060ustar00rootroot00000000000000@c This file is part of the GNU Dico manual. @c Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff @c This file is distributed under GFDL 1.1 or any later version @c published by the Free Software Foundation. This appendix describes commands understood by Dico dictionary server. The examples provided follow the convention used in @acronym{RFC} documents: a text sent by the server is prefixed with @samp{S}, whereas a text sent by the client is prefixed with @samp{C}. @menu * Initial Reply:: * Standard Commands:: * Extended Commands:: @end menu @node Initial Reply @section Initial Reply When a connection is established, the server sends an @dfn{initial reply} to the client. This reply has the following format: @smallexample 220 @var{hostname} @var{text} <@var{capabilities}> @var{msg-id} @end smallexample @noindent Its parts and their meaning are described in the following table: @table @var @item hostname The name of the host. It is determined automatically, unless set using @code{hostname} configuration file statement (@pxref{hostname directive}). @item text Arbitrary text, as set via @code{initial-banner-text} configuration statement (@pxref{General Settings, initial-banner-text}). @item capabilities A comma-separated list of server capabilities. It is configured using @code{capability} statement (@pxref{Capabilities}). @item msg-id A unique identifier similar to the format specified in @uref{ftp://ftp.rfc-editor.org/in-notes/rfc822, RFC822}, except that spaces and quoted pairs are not allowed within it. This identifier will be used by the client when formulating the authentication string used in the @code{AUTH} command (@pxref{AUTH}). @end table An example of initial reply follows: @smallexample 220 Trurl.gnu.org.ua <520.1212912026@@Trurl.gnu.org.ua> @end smallexample @node Standard Commands @section Standard Commands The following are standard commands, defined in RFC2229. @menu * DEFINE:: * MATCH:: * SHOW:: * OPTION:: * AUTH:: * CLIENT:: * STATUS:: * HELP:: * QUIT:: @end menu @node DEFINE @subsection The DEFINE Command The @code{DEFINE} command searches for definitions of a word. @deffn Command DEFINE db word Look up the word @var{word} in database @var{db}. If @var{db} is @samp{!}, then all the databases will be searched until the word is found, and all matches in that database will be returned. Similarly, if @var{db} is @samp{*}, then all the databases will be searched and all matches in all databases will be returned. In these two cases, the databases are searched in the same order as that returned by @code{SHOW DB} command (@pxref{SHOW, SHOW DB}). If the word was not found, response code 552 is returned. If the word is found, a response code 150 is sent, followed by the number of definitions found. Then, for each definition a response code 151 is returned, followed by the textual body of the definition. In a 151 response, the first three space-delimited parameters give the word looked for, the name and a short description of the database. The latter two are the same as shown in the output from @code{SHOW DB} command. The textual body of each definition is terminated with a dot (@samp{.}) on a line alone. If any line in the definition begins with a dot, it is duplicated to avoid confusion with body terminator. After all of the definitions have been sent, a status code 250 is sent. If @code{timing} is set to @samp{true} in the configuration file, this latter response also carries timing information. @xref{Tuning}, for more information about timing output. Possible responses from @code{DEFINE} command are: @table @asis @item 550 Invalid database, use SHOW DB for a list @item 552 No match @item 150 @var{n} definitions found: list follows @item 151 @var{word} @var{database} @var{name} @item 250 ok (optional timing information here) @end table Example transaction: @smallexample C: DEFINE eng-swa man S: 150 1 definitions found: list follows S: 151 "man" eng-swa "English-Swahili xFried/FreeDict Dictionary" S: man S: S: mwanamume S: S: . S: 250 Command complete [d/m/c = 1/0/12 0.000r 0.000u 0.000s] @end smallexample @end deffn @node MATCH @subsection The MATCH Command The @code{MATCH} command searches for word in the database index. The searching algorithm is determined by @dfn{strategy}. @xref{Strategies}, for a list of strategies offered by GNU Dico. @deffn Command MATCH database strategy word Match @var{word} in @var{database} using @var{strategy}. As with @code{DEFINE}, the @var{database} can be @samp{!} or @samp{*} (@xref{DEFINE}, for a detailed description of these wildcards). The @var{strategy} is either the name of a strategy to use, or a dot (@samp{.}), meaning to use default strategy. The default strategy is set using @code{default-strategy} configuration file statement (@pxref{General Settings, default-strategy}. Its default value is @samp{lev}, which means @samp{use Levenshtein algorithm} (@pxref{Strategies}). If no matches are found in any of the searched databases, then response code 552 will be returned. Otherwise, response code 152 will be returned followed by a list of matched words, one per line, in the form: @smallexample @var{database} @var{word} @end smallexample Thus, prepending a @samp{DEFINE } to each such response, one obtains a valid @code{DEFINE} command. The textual body of the match list is terminated with a line containing only a dot character. Following the list, response code 250 is sent, which includes timing information, if @code{timing} directive is set in the configuration file (@pxref{Tuning}). Possible responses: @table @asis @item 550 Invalid database, use SHOW DB for a list @item 551 Invalid strategy, use SHOW STRAT for a list @item 552 No match @item 152 @var{n} matches found: list follows @item 250 ok (optional timing information here) @end table Examples: @smallexample C: MATCH * . "weather" S: 152 12 matches found: list follows C: eng-afr "feather" C: eng-afr "leather" C: eng-afr "weather" C: eng-deu "feather" C: eng-deu "heather" C: eng-deu "leather" C: eng-deu "weather" C: eng-deu "wether" C: eng-deu "wheather" C: devils "WEATHER" S: . S: 250 Command complete [d/m/c = 0/12/100677 0.489r 0.479u 0.007s] @end smallexample @end deffn @node SHOW @subsection The SHOW Command The @code{SHOW} command outputs various information about the server and databases. @deffn Command {SHOW DB} @deffnx Command {SHOW DATABASES} Display the list of currently accessible databases, one per line, in the form: @smallexample @var{database} @var{description} @end smallexample The list is terminated with is a dot (@samp{.}) on a line alone. Possible responses: @table @asis @item 110 @var{n} databases present @item 554 No databases present @end table @end deffn @deffn Command {SHOW STRAT} @deffnx Command {SHOW STRATEGIES} Display the list of currently supported search strategies, one per line, in the form: @smallexample @var{strategy} @var{description} @end smallexample The list is terminated with is a dot (@samp{.}) on a line alone. Possible responses: @table @asis @item 111 @var{n} strategies available @item 555 No strategies available @end table @end deffn @deffn Command {SHOW INFO} database Displays the information about the specified database. The information is a free-form text and is suitable for display to the user in the same manner as a definition. The textual body of the response is terminated with is a dot (@samp{.}) on a line alone. Possible responses: @table @asis @item 550 Invalid database, use SHOW DB for a list @item 112 database information follows @end table The textual body is retrieved from the @code{info} statement in the configuration file (@pxref{Databases, info}), or, if it is not specified, from the database itself, using @code{dico_db_info} callback function (@pxref{dico_db_info}). If neither source returns anything, the string @samp{No information available.} is returned. @end deffn @deffn Command {SHOW SERVER} Return a server-specific information. Response: @table @asis @item 114 server information follows @end table The information follows, terminated with a dot on a line alone. The textual body returned by the @code{SHOW SERVER} command consists of two parts. It begins with a line containing host name of the server and, optionally an additional information about the daemon and the system it runs on. The exact look and amount of information in this line is controlled by @code{show-sys-info} configuration statement (@pxref{Security Settings, show-sys-info}). This line is followed by the text supplied with @code{server-info} configuration statement (@pxref{General Settings, server-info}). @end deffn @node OPTION @subsection The OPTION Command The @code{OPTION} command allows to request optional features on the remote server. Currently the only implemented subcommand is: @deffn Command {OPTION MIME} Requests that all text responses be prefaced by a @acronym{MIME} header (@uref{ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt, RFC2045}) followed by a single blank line. After this command is issued, the server begins each textual response with a @acronym{MIME} header. This header consists of @samp{Content-type} and @samp{Content-transfer-encoding} headers, as supplied by the corresponding configuration file statements for this database (@xref{Databases, content-type}, @pxref{Databases, content-transfer-encoding}). Any or both of these headers may be missing. @end deffn @node AUTH @subsection The AUTH Command The @code{AUTH} command allows client to authenticate itself to the server. Depending on the server configuration, authenticated users may get access to more databases (@pxref{Database Visibility}) or more detailed server information (@pxref{Security Settings, show-sys-info}). @deffn Command AUTH username auth-string Authenticate client to the server using a username and password. The @var{auth-string} is computed as in the @acronym{APOP} protocol (@uref{ftp://ftp.rfc-editor.org/in-notes/rfc1929.txt, RFC1939}. Briefly, it is the MD5 checksum of the concatenation of the @var{msg-id} (@pxref{Initial Reply}) and the @dfn{shared secret} that is stored both on the server and client machines. @xref{Authentication}, for information on how to configure server for authenticating clients. This command is supported only if @samp{auth} capability is requested in the configuration (@pxref{Capabilities, auth}). @end deffn @node CLIENT @subsection The CLIENT Command @deffn Command CLIENT info Identify client to server. The @var{info} argument contains a string identifying the client program (e.g. its name and version number). This information can then be used in logging (@pxref{Access Log, %C}). @end deffn @node STATUS @subsection The STATUS Command @deffn Command STATUS Display cumulative timing information. This command returns a @samp{210} status code, followed by the timing information as described in @ref{Tuning}, e.g. @smallexample C: STATUS S: 210 [d/m/c = 28/1045/119856 21.180r 10.360u 1.040s] @end smallexample @end deffn @node HELP @subsection The HELP Command @deffn Command HELP The @code{HELP} command provides a short summary of commands that are understood by the server. The response begins with a @samp{113} code, followed by textual body defined in @code{help-text} configuration file statement (@pxref{General Settings, help-text}), which is terminated by a dot on a line by itself. A @samp{250} response code finishes the output. For example: @smallexample 113 help text follows DEFINE database word -- look up word in database MATCH database strategy word -- match word in database SHOW DB -- list all accessible databases SHOW DATABASES -- list all accessible databases SHOW STRAT -- list available matching strategies SHOW STRATEGIES -- list available matching strategies SHOW INFO database -- provide database information SHOW SERVER -- provide site-specific information CLIENT info -- identify client to server STATUS -- display timing information HELP -- display this help information QUIT -- terminate connection . 250 Ok @end smallexample @end deffn @node QUIT @subsection The QUIT Command @deffn Command QUIT Terminate connection. This command returns a response code 221, optionally followed by timing information (@pxref{Tuning}). @end deffn @node Extended Commands @section Extended Commands In addition to the standard commands, the Dico server also offers a set of experimental or extended commands. @deffn Command XIDLE This command displays the current inactivity timeout setting (@pxref{inactivity-timeout}), and resets idle timer to 0. The timeout value is printed as the first word after a @samp{110} reply code, e.g.: @smallexample C: XIDLE S: 110 180 second(s) @end smallexample The value of @samp{0} means there are no timeout. @end deffn @deffn Command XVERSION This command displays the daemon implementation and version number. It becomes available only if @samp{xversion} capability was requested in the configuration file (@pxref{Capabilities, xversion}). @smallexample C: XVERSION S: 110 dicod (dico @value{VERSION}) @end smallexample @end deffn @deffn Command XLEV param If @var{param} is the word @samp{tell}, displays the current value of Levenshtein threshold. If @var{param} is a positive integer value, sets the Levenshtein threshold to this value. This command becomes available only if @samp{xlev} capability was requested in the configuration file (@pxref{Capabilities, xlev}). @smallexample C: xlev tell S: 280 1 C: xlev 3 S: 250 ok - Levenshtein threshold set to 3 C: xlev tell S: 280 3 @end smallexample @end deffn dico-2.2/doc/stamp-vti000066400000000000000000000001321172612674100147120ustar00rootroot00000000000000@set UPDATED 4 March 2012 @set UPDATED-MONTH March 2012 @set EDITION 2.2 @set VERSION 2.2 dico-2.2/doc/strat.texi000066400000000000000000000111331172612674100150760ustar00rootroot00000000000000@c This file is part of the GNU Dico manual. @c Copyright (C) 2012 Sergey Poznyakoff @c This file is distributed under GFDL 1.1 or any later version @c published by the Free Software Foundation. This appendix summarizes search strategies available for use in Dico @value{VERSION}. @table @asis @item exact @cindex exact, a strategy Match words exactly. This is a built-in strategy. @item prefix @cindex prefix, a strategy Match word prefixes. This is a built-in strategy. @item nprefix @cindex nprefix, a strategy This strategy is similar to @samp{prefix}, except that it allows the user to limit the number of returned matches. If the search term has the structure @samp{@var{skip}#@var{count}#@var{string}}, where @var{skip} and @var{count} are integer numbers, then the @samp{nprefix} strategy will return at most @var{count} headwords that begin with @var{string}, omitting first @var{skip} unique matches. This strategy is implemented in the @file{nprefix} loadable module. @xref{nprefix}. @item suffix @cindex suffix, a strategy Match word suffixes. This is a built-in strategy. @item soundex @cindex soundex, a strategy Match words using SOUNDEX algorithm@footnote{See @uref{http://en.wikipedia.org/wiki/Soundex}}. This strategy matches headwords that sound approximately the same as the search term. Note, that it is suitable only for English words. This is a built-in strategy. @item lev @cindex lev, a strategy Match headwords within given Levenshtein distance (1 by default). This strategy accounts for the most usual spelling errors. @cindex distance, Levenshtein @cindex Levenshtein distance The Levenshtein distance between two strings is the minimum number of @dfn{edits} needed to transform one string into the other. The edits are: insertion, deletion, or substitution of a single character. Thus, Levenshtein distance 1 means that only one such operation suffices to convert one string to another. This is the default for that strategy. This built-in strategy is used as a default one (@pxref{default strategy}), unless the @code{default-strategy} configuration statement mandates otherwise. The dictionary server may optionally allow users to alter the Levenshtein distance using the extension command @code{XLEV}. This command is enabled by setting the @samp{xlev} capability. @xref{Capabilities, xlev}, for a detailed description. @item nlev @cindex nlev, a strategy Match normalized headwords within given Levenshtein distance. This strategy is similar to @samp{lev}, except that it treats any runlength of whitespace characters appearing in a headword as a single space (ASCII 32) character. @item dlev @cindex dlev, a strategy Match headwords within given Damerau-Levenshtein distance (1 by default). The Damerau-Levenshtein distance extends the Levenshtein distance by an additional edit operation: transposition of two adjacent characters. This strategy is similar to @samp{lev}, but covers a much wider range of spelling and typographical errors. The distance threshold optionally be configured using the @code{XLEV} command (@pxref{Capabilities, xlev}). @item ndlev @cindex ndlev, a strategy This is the same as @samp{dlev}, except that it treats any runlength of whitespace characters appearing in a headword as a single space (ASCII 32) character. @item re @cindex re, a strategy Match using POSIX 1003.2 regular expressions. This strategy treats the search term as a regular expression (@pxref{Extended regexps, Extended regular expressions, Extended regular expressions, sed, GNU sed}). @item regexp @cindex regexp, a strategy Match using basic regular expressions. @item pcre @cindex pcre, a strategy Match using Perl-compatible regular expressions. This strategy is implemented in the loadable module @file{pcre}. @xref{pcre}. @item all @cindex all, a strategy Match everything. This experimental strategy ignores its argument and matches all headwords. It is implemented in the @file{stratall} module, which you must load if you wish to make that strategy available. @xref{stratall}. @item substr @cindex substr, a strategy Match a substring anywhere in the headword. This strategy is implemented as a loadable module. @xref{substr}. @item word @cindex word, a strategy Match a word anywhere in the headword. This is one of the strategies provided by the @file{word} loadable module. @xref{word}. @item first @cindex first, a strategy Match the first word within headwords. This strategy is implemented in @file{word} loadable module. @xref{word}. @item last @cindex last, a strategy Match the last word within headwords. This strategy is implemented in @file{word} loadable module. @xref{word}. @end table dico-2.2/doc/strftime.texi000066400000000000000000000140431172612674100156010ustar00rootroot00000000000000@c This file is part of the GNU Dico manual. @c Copyright (C) 2006, 2012 Free Software Foundation, Inc. @c This file is distributed under GFDL 1.1 or any later version @c published by the Free Software Foundation. @c @appendix Time and Date Formats @cindex time formats, for @option{--time-format} option This appendix documents the time format specifications understood by the @samp{%t} log format specifier (@pxref{Access Log}). Essentially, it is a reproduction of the man page for GNU @code{strftime} function. Ordinary characters placed in the format string are reproduced without conversion. Conversion specifiers are introduced by a @samp{%} character, and are replaced as follows: @multitable @columnfractions 0.2 0.7 @item @code{%a} @tab The abbreviated weekday name according to the current locale. @item @code{%A} @tab The full weekday name according to the current locale. @item @code{%b} @tab The abbreviated month name according to the current locale. @item @code{%B} @tab The full month name according to the current locale. @anchor{%c time format} @item @code{%c} @tab The preferred date and time representation for the current locale. @item @code{%C} @tab The century number (year/100) as a 2-digit integer. @item @code{%d} @tab The day of the month as a decimal number (range 01 to 31). @item @code{%D} @tab Equivalent to @samp{%m/%d/%y}. @item @code{%e} @tab Like @samp{%d}, the day of the month as a decimal number, but a leading zero is replaced by a space. @item @code{%E} @tab Modifier: use alternative format, see below (@pxref{conversion specs}). @item @code{%F} @tab Equivalent to @samp{%Y-%m-%d} (the ISO 8601 date format). @item @code{%G} @tab The ISO 8601 year with century as a decimal number. The 4-digit year corresponding to the ISO week number (see @samp{%V}). This has the same format and value as @samp{%y}, except that if the ISO week number belongs to the previous or next year, that year is used instead. @item @code{%g} @tab Like @samp{%G}, but without century, i.e., with a 2-digit year (00-99). @item @code{%h} @tab Equivalent to @samp{%b}. @item @code{%H} @tab The hour as a decimal number using a 24-hour clock (range 00 to 23). @item @code{%I} @tab The hour as a decimal number using a 12-hour clock (range 01 to 12). @item @code{%j} @tab The day of the year as a decimal number (range 001 to 366). @item @code{%k} @tab The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank. (See also @samp{%H}.) @item @code{%l} @tab The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank. (See also @samp{%I}.) @item @code{%m} @tab The month as a decimal number (range 01 to 12). @item @code{%M} @tab The minute as a decimal number (range 00 to 59). @item @code{%n} @tab A newline character. @item @code{%O} @tab Modifier: use alternative format, see below (@pxref{conversion specs}). @item @code{%p} @tab Either @samp{AM} or @samp{PM} according to the given time value, or the corresponding strings for the current locale. Noon is treated as @samp{pm} and midnight as @samp{am}. @item @code{%P} @tab Like @samp{%p} but in lowercase: @samp{am} or @samp{pm} or a corresponding string for the current locale. @item @code{%r} @tab The time in @samp{a.m.} or @samp{p.m.} notation. In the POSIX locale this is equivalent to @samp{%I:%M:%S %p}. @item @code{%R} @tab The time in 24-hour notation (@samp{%H:%M}). For a version including the seconds, see @samp{%T} below. @anchor{%s time format} @item @code{%s} @tab The number of seconds since the Epoch, i.e., since 1970-01-01 00:00:00 UTC. @item @code{%S} @tab The second as a decimal number (range 00 to 61). @item @code{%t} @tab A tab character. @item @code{%T} @tab The time in 24-hour notation (@samp{%H:%M:%S}). @item @code{%u} @tab The day of the week as a decimal, range 1 to 7, Monday being 1. See also @samp{%w}. @item @code{%U} @tab The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also @samp{%V} and @samp{%W}. @item @code{%V} @tab The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. See also @samp{%U} and @samp{%W}. @item @code{%w} @tab The day of the week as a decimal, range 0 to 6, Sunday being 0. See also @samp{%u}. @item @code{%W} @tab The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01. @item @code{%x} @tab The preferred date representation for the current locale without the time. @item @code{%X} @tab The preferred time representation for the current locale without the date. @item @code{%y} @tab The year as a decimal number without a century (range 00 to 99). @item @code{%Y} @tab The year as a decimal number including the century. @item @code{%z} @tab The time-zone as hour offset from @acronym{GMT}. Required to emit RFC822-conformant dates (using @samp{%a, %d %b %Y %H:%M:%S %z}) @item @code{%Z} @tab The time zone or name or abbreviation. @item @code{%+} @tab The date and time in @cite{date(1)} format. @item @code{%%} @tab A literal @samp{%} character. @end multitable @anchor{conversion specs} Some conversion specifiers can be modified by preceding them by the @samp{E} or @samp{O} modifier to indicate that an alternative format should be used. If the alternative format or specification does not exist for the current locale, the behaviour will be as if the unmodified conversion specification were used. The Single Unix Specification mentions @samp{%Ec}, @samp{%EC}, @samp{%Ex}, @samp{%EX}, @samp{%Ry}, @samp{%EY}, @samp{%Od}, @samp{%Oe}, @samp{%OH}, @samp{%OI}, @samp{%Om}, @samp{%OM}, @samp{%OS}, @samp{%Ou}, @samp{%OU}, @samp{%OV}, @samp{%Ow}, @samp{%OW}, @samp{%Oy}, where the effect of the @samp{O} modifier is to use alternative numeric symbols (say, roman numerals), and that of the @samp{E} modifier is to use a locale-dependent alternative representation. dico-2.2/doc/version.texi000066400000000000000000000001321172612674100154230ustar00rootroot00000000000000@set UPDATED 4 March 2012 @set UPDATED-MONTH March 2012 @set EDITION 2.2 @set VERSION 2.2 dico-2.2/examples/000077500000000000000000000000001172612674100141205ustar00rootroot00000000000000dico-2.2/examples/Makefile.am000066400000000000000000000014421172612674100161550ustar00rootroot00000000000000# This file is part of GNU Dico # Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . EXTRA_DIST = \ devdict.out\ glossary.scm\ listdict.scm\ numerals-pl.ldb\ textdict.py\ numerals-cz.txt dico-2.2/examples/Makefile.in000066400000000000000000001126651172612674100162000ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of GNU Dico # Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ devdict.out\ glossary.scm\ listdict.scm\ numerals-pl.ldb\ textdict.py\ numerals-cz.txt all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # 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: dico-2.2/examples/devdict.out000066400000000000000000014124451172612674100163060ustar00rootroot00000000000000* Introduction This file contains the text of "The Devil's Dictionary" by Ambrose Bierce, converted to outline format, for testing various aspects of Dico functionality. * url http://wiretap.area.com/Gopher/Library/Classic/devils.txt * Languages en * Description THE DEVIL'S DICTIONARY ((C)1911 Released April 15 1993) * Info This file was converted from the original database on: Sun May 18 12:45:30 EEST 2008 The original data is available from: http://wiretap.area.com/Gopher/Library/Classic/devils.txt The original data was distributed with the notice shown below. No additional restrictions are claimed. Please redistribute this changed version under the same conditions and restriction that apply to the original version. The Internet Wiretap 1st Online Edition of THE DEVIL'S DICTIONARY by AMBROSE BIERCE Copyright 1911 by Albert and Charles Boni, Inc. A Public Domain Text, Copyright Expired Released April 15 1993 Entered by Aloysius of &tSftDotIotE aloysius@west.darkside.com PREFACE _The Devil's Dictionary_ was begun in a weekly paper in 1881, and was continued in a desultory way at long intervals until 1906. In that year a large part of it was published in covers with the title _The Cynic's Word Book_, a name which the author had not the power to reject or happiness to approve. To quote the publishers of the present work: "This more reverent title had previously been forced upon him by the religious scruples of the last newspaper in which a part of the work had appeared, with the natural consequence that when it came out in covers the country already had been flooded by its imitators with a score of 'cynic' books -- _The Cynic's This_, _The Cynic's That_, and _The Cynic's t'Other_. Most of these books were merely stupid, though some of them added the distinction of silliness. Among them, they brought the word 'cynic' into disfavor so deep that any book bearing it was discredited in advance of publication." Meantime, too, some of the enterprising humorists of the country had helped themselves to such parts of the work as served their needs, and many of its definitions, anecdotes, phrases and so forth, had become more or less current in popular speech. This explanation is made, not with any pride of priority in trifles, but in simple denial of possible charges of plagiarism, which is no trifle. In merely resuming his own the author hopes to be held guiltless by those to whom the work is addressed -- enlightened souls who prefer dry wines to sweet, sense to sentiment, wit to humor and clean English to slang. A conspicuous, and it is hope not unpleasant, feature of the book is its abundant illustrative quotations from eminent poets, chief of whom is that learned and ingenius cleric, Father Gassalasca Jape, S.J., whose lines bear his initials. To Father Jape's kindly encouragement and assistance the author of the prose text is greatly indebted. A.B. * Dictionary A ** ABASEMENT ABASEMENT, n. A decent and customary mental attitude in the presence of wealth of power. Peculiarly appropriate in an employee when addressing an employer. ** ABATIS ABATIS, n. Rubbish in front of a fort, to prevent the rubbish outside from molesting the rubbish inside. ** ABDICATION ABDICATION, n. An act whereby a sovereign attests his sense of the high temperature of the throne. Poor Isabella's Dead, whose abdication Set all tongues wagging in the Spanish nation. For that performance 'twere unfair to scold her: She wisely left a throne too hot to hold her. To History she'll be no royal riddle -- Merely a plain parched pea that jumped the griddle. G.J. ** ABDOMEN ABDOMEN, n. The temple of the god Stomach, in whose worship, with sacrificial rights, all true men engage. From women this ancient faith commands but a stammering assent. They sometimes minister at the altar in a half-hearted and ineffective way, but true reverence for the one deity that men really adore they know not. If woman had a free hand in the world's marketing the race would become graminivorous. ** ABILITY ABILITY, n. The natural equipment to accomplish some small part of the meaner ambitions distinguishing able men from dead ones. In the last analysis ability is commonly found to consist mainly in a high degree of solemnity. Perhaps, however, this impressive quality is rightly appraised; it is no easy task to be solemn. ** ABNORMAL ABNORMAL, adj. Not conforming to standard. In matters of thought and conduct, to be independent is to be abnormal, to be abnormal is to be detested. Wherefore the lexicographer adviseth a striving toward the straiter [sic] resemblance of the Average Man than he hath to himself. Whoso attaineth thereto shall have peace, the prospect of death and the hope of Hell. ** ABORIGINIES ABORIGINIES, n. Persons of little worth found cumbering the soil of a newly discovered country. They soon cease to cumber; they fertilize. ABRACADABRA. By _Abracadabra_ we signify An infinite number of things. 'Tis the answer to What? and How? and Why? And Whence? and Whither? -- a word whereby The Truth (with the comfort it brings) Is open to all who grope in night, Crying for Wisdom's holy light. Whether the word is a verb or a noun Is knowledge beyond my reach. I only know that 'tis handed down. From sage to sage, From age to age -- An immortal part of speech! Of an ancient man the tale is told That he lived to be ten centuries old, In a cave on a mountain side. (True, he finally died.) The fame of his wisdom filled the land, For his head was bald, and you'll understand His beard was long and white And his eyes uncommonly bright. Philosophers gathered from far and near To sit at his feat and hear and hear, Though he never was heard To utter a word But "_Abracadabra, abracadab_, _Abracada, abracad_, _Abraca, abrac, abra, ab!_" 'Twas all he had, 'Twas all they wanted to hear, and each Made copious notes of the mystical speech, Which they published next -- A trickle of text In the meadow of commentary. Mighty big books were these, In a number, as leaves of trees; In learning, remarkably -- very! He's dead, As I said, And the books of the sages have perished, But his wisdom is sacredly cherished. In _Abracadabra_ it solemnly rings, Like an ancient bell that forever swings. O, I love to hear That word make clear Humanity's General Sense of Things. Jamrach Holobom ** ABRIDGE ABRIDGE, v.t. To shorten. When in the course of human events it becomes necessary for people to abridge their king, a decent respect for the opinions of mankind requires that they should declare the causes which impel them to the separation. Oliver Cromwell ** ABRUPT ABRUPT, adj. Sudden, without ceremony, like the arrival of a cannon- shot and the departure of the soldier whose interests are most affected by it. Dr. Samuel Johnson beautifully said of another author's ideas that they were "concatenated without abruption." ** ABSCOND ABSCOND, v.i. To "move in a mysterious way," commonly with the property of another. Spring beckons! All things to the call respond; The trees are leaving and cashiers abscond. Phela Orm ** ABSENT ABSENT, adj. Peculiarly exposed to the tooth of detraction; vilifed; hopelessly in the wrong; superseded in the consideration and affection of another. To men a man is but a mind. Who cares What face he carries or what form he wears? But woman's body is the woman. O, Stay thou, my sweetheart, and do never go, But heed the warning words the sage hath said: A woman absent is a woman dead. Jogo Tyree ** ABSENTEE ABSENTEE, n. A person with an income who has had the forethought to remove himself from the sphere of exaction. ** ABSOLUTE ABSOLUTE, adj. Independent, irresponsible. An absolute monarchy is one in which the sovereign does as he pleases so long as he pleases the assassins. Not many absolute monarchies are left, most of them having been replaced by limited monarchies, where the sovereign's power for evil (and for good) is greatly curtailed, and by republics, which are governed by chance. ** ABSTAINER ABSTAINER, n. A weak person who yields to the temptation of denying himself a pleasure. A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others. Said a man to a crapulent youth: "I thought You a total abstainer, my son." "So I am, so I am," said the scrapgrace caught -- "But not, sir, a bigoted one." G.J. ** ABSURDITY ABSURDITY, n. A statement or belief manifestly inconsistent with one's own opinion. ** ACADEME ACADEME, n. An ancient school where morality and philosophy were taught. ** ACADEMY ACADEMY, n. [from :ACADEME:] A modern school where football is taught. ** ACCIDENT ACCIDENT, n. An inevitable occurrence due to the action of immutable natural laws. ** ACCOMPLICE ACCOMPLICE, n. One associated with another in a crime, having guilty knowledge and complicity, as an attorney who defends a criminal, knowing him guilty. This view of the attorney's position in the matter has not hitherto commanded the assent of attorneys, no one having offered them a fee for assenting. ** ACCORD ACCORD, n. Harmony. ** ACCORDION ACCORDION, n. An instrument in harmony with the sentiments of an assassin. ** ACCOUNTABILITY ACCOUNTABILITY, n. The mother of caution. "My accountability, bear in mind," Said the Grand Vizier: "Yes, yes," Said the Shah: "I do -- 'tis the only kind Of ability you possess." Joram Tate ** ACCUSE ACCUSE, v.t. To affirm another's guilt or unworth; most commonly as a justification of ourselves for having wronged him. ** ACEPHALOUS ACEPHALOUS, adj. In the surprising condition of the Crusader who absently pulled at his forelock some hours after a Saracen scimitar had, unconsciously to him, passed through his neck, as related by de Joinville. ** ACHIEVEMENT ACHIEVEMENT, n. The death of endeavor and the birth of disgust. ** ACKNOWLEDGE ACKNOWLEDGE, v.t. To confess. Acknowledgement of one another's faults is the highest duty imposed by our love of truth. ** ACQUAINTANCE ACQUAINTANCE, n. A person whom we know well enough to borrow from, but not well enough to lend to. A degree of friendship called slight when its object is poor or obscure, and intimate when he is rich or famous. ** ACTUALLY ACTUALLY, adv. Perhaps; possibly. ** ADAGE ADAGE, n. Boned wisdom for weak teeth. ** ADAMANT ADAMANT, n. A mineral frequently found beneath a corset. Soluble in solicitate of gold. ** ADDER ADDER, n. A species of snake. So called from its habit of adding funeral outlays to the other expenses of living. ** ADHERENT ADHERENT, n. A follower who has not yet obtained all that he expects to get. ** ADMINISTRATION ADMINISTRATION, n. An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. A man of straw, proof against bad-egging and dead-catting. ** ADMIRAL ADMIRAL, n. That part of a war-ship which does the talking while the figure-head does the thinking. ** ADMIRATION ADMIRATION, n. Our polite recognition of another's resemblance to ourselves. ** ADMONITION ADMONITION, n. Gentle reproof, as with a meat-axe. Friendly warning. Consigned by way of admonition, His soul forever to perdition. Judibras ** ADORE ADORE, v.t. To venerate expectantly. ** ADVICE ADVICE, n. The smallest current coin. "The man was in such deep distress," Said Tom, "that I could do no less Than give him good advice." Said Jim: "If less could have been done for him I know you well enough, my son, To know that's what you would have done." Jebel Jocordy ** AFFIANCED AFFIANCED, pp. Fitted with an ankle-ring for the ball-and-chain. ** AFFLICTION AFFLICTION, n. An acclimatizing process preparing the soul for another and bitter world. ** AFRICAN AFRICAN, n. A nigger that votes our way. ** AGE AGE, n. That period of life in which we compound for the vices that we still cherish by reviling those that we have no longer the enterprise to commit. ** AGITATOR AGITATOR, n. A statesman who shakes the fruit trees of his neighbors -- to dislodge the worms. ** AIM AIM, n. The task we set our wishes to. "Cheer up! Have you no aim in life?" She tenderly inquired. "An aim? Well, no, I haven't, wife; The fact is -- I have fired." G.J. ** AIR AIR, n. A nutritious substance supplied by a bountiful Providence for the fattening of the poor. ** ALDERMAN ALDERMAN, n. An ingenious criminal who covers his secret thieving with a pretence of open marauding. ** ALIEN ALIEN, n. An American sovereign in his probationary state. ** ALLAH ALLAH, n. The Mahometan Supreme Being, as distinguished from the Christian, Jewish, and so forth. Allah's good laws I faithfully have kept, And ever for the sins of man have wept; And sometimes kneeling in the temple I Have reverently crossed my hands and slept. Junker Barlow ** ALLEGIANCE ALLEGIANCE, n. This thing Allegiance, as I suppose, Is a ring fitted in the subject's nose, Whereby that organ is kept rightly pointed To smell the sweetness of the Lord's anointed. G.J. ** ALLIANCE ALLIANCE, n. In international politics, the union of two thieves who have their hands so deeply inserted in each other's pockets that they cannot separately plunder a third. ** ALLIGATOR ALLIGATOR, n. The crocodile of America, superior in every detail to the crocodile of the effete monarchies of the Old World. Herodotus says the Indus is, with one exception, the only river that produces crocodiles, but they appear to have gone West and grown up with the other rivers. From the notches on his back the alligator is called a sawrian. ** ALONE ALONE, adj. In bad company. In contact, lo! the flint and steel, By spark and flame, the thought reveal That he the metal, she the stone, Had cherished secretly alone. Booley Fito ** ALTAR ALTAR, n. The place whereupon the priest formerly raveled out the small intestine of the sacrificial victim for purposes of divination and cooked its flesh for the gods. The word is now seldom used, except with reference to the sacrifice of their liberty and peace by a male and a female tool. They stood before the altar and supplied The fire themselves in which their fat was fried. In vain the sacrifice! -- no god will claim An offering burnt with an unholy flame. M.P. Nopput ** AMBIDEXTROUS AMBIDEXTROUS, adj. Able to pick with equal skill a right-hand pocket or a left. ** AMBITION AMBITION, n. An overmastering desire to be vilified by enemies while living and made ridiculous by friends when dead. ** AMNESTY AMNESTY, n. The state's magnanimity to those offenders whom it would be too expensive to punish. ** ANOINT ANOINT, v.t. To grease a king or other great functionary already sufficiently slippery. As sovereigns are anointed by the priesthood, So pigs to lead the populace are greased good. Judibras ** ANTIPATHY ANTIPATHY, n. The sentiment inspired by one's friend's friend. ** APHORISM APHORISM, n. Predigested wisdom. The flabby wine-skin of his brain Yields to some pathologic strain, And voids from its unstored abysm The driblet of an aphorism. "The Mad Philosopher," 1697 ** APOLOGIZE APOLOGIZE, v.i. To lay the foundation for a future offence. ** APOSTATE APOSTATE, n. A leech who, having penetrated the shell of a turtle only to find that the creature has long been dead, deems it expedient to form a new attachment to a fresh turtle. ** APOTHECARY APOTHECARY, n. The physician's accomplice, undertaker's benefactor and grave worm's provider. When Jove sent blessings to all men that are, And Mercury conveyed them in a jar, That friend of tricksters introduced by stealth Disease for the apothecary's health, Whose gratitude impelled him to proclaim: "My deadliest drug shall bear my patron's name!" G.J. ** APPEAL APPEAL, v.t. In law, to put the dice into the box for another throw. ** APPETITE APPETITE, n. An instinct thoughtfully implanted by Providence as a solution to the labor question. ** APPLAUSE APPLAUSE, n. The echo of a platitude. ** APRIL FOOL APRIL FOOL, n. The March fool with another month added to his folly. ** ARCHBISHOP ARCHBISHOP, n. An ecclesiastical dignitary one point holier than a bishop. If I were a jolly archbishop, On Fridays I'd eat all the fish up -- Salmon and flounders and smelts; On other days everything else. Jodo Rem ** ARCHITECT ARCHITECT, n. One who drafts a plan of your house, and plans a draft of your money. ** ARDOR ARDOR, n. The quality that distinguishes love without knowledge. ** ARENA ARENA, n. In politics, an imaginary rat-pit in which the statesman wrestles with his record. ** ARISTOCRACY ARISTOCRACY, n. Government by the best men. (In this sense the word is obsolete; so is that kind of government.) Fellows that wear downy hats and clean shirts -- guilty of education and suspected of bank accounts. ** ARMOR ARMOR, n. The kind of clothing worn by a man whose tailor is a blacksmith. ** ARRAYED ARRAYED, pp. Drawn up and given an orderly disposition, as a rioter hanged to a lamppost. ** ARREST ARREST, v.t. Formally to detain one accused of unusualness. God made the world in six days and was arrested on the seventh. _The Unauthorized Version_ ** ARSENIC ARSENIC, n. A kind of cosmetic greatly affected by the ladies, whom it greatly affects in turn. "Eat arsenic? Yes, all you get," Consenting, he did speak up; "'Tis better you should eat it, pet, Than put it in my teacup." Joel Huck ** ART ART, n. This word has no definition. Its origin is related as follows by the ingenious Father Gassalasca Jape, S.J. One day a wag -- what would the wretch be at? -- Shifted a letter of the cipher RAT, And said it was a god's name! Straight arose Fantastic priests and postulants (with shows, And mysteries, and mummeries, and hymns, And disputations dire that lamed their limbs) To serve his temple and maintain the fires, Expound the law, manipulate the wires. Amazed, the populace that rites attend, Believe whate'er they cannot comprehend, And, inly edified to learn that two Half-hairs joined so and so (as Art can do) Have sweeter values and a grace more fit Than Nature's hairs that never have been split, Bring cates and wines for sacrificial feasts, And sell their garments to support the priests. ** ARTLESSNESS ARTLESSNESS, n. A certain engaging quality to which women attain by long study and severe practice upon the admiring male, who is pleased to fancy it resembles the candid simplicity of his young. ** ASPERSE ASPERSE, v.t. Maliciously to ascribe to another vicious actions which one has not had the temptation and opportunity to commit. ** ASS ASS, n. A public singer with a good voice but no ear. In Virginia City, Nevada, he is called the Washoe Canary, in Dakota, the Senator, and everywhere the Donkey. The animal is widely and variously celebrated in the literature, art and religion of every age and country; no other so engages and fires the human imagination as this noble vertebrate. Indeed, it is doubted by some (Ramasilus, _lib. II., De Clem._, and C. Stantatus, _De Temperamente_) if it is not a god; and as such we know it was worshiped by the Etruscans, and, if we may believe Macrobious, by the Cupasians also. Of the only two animals admitted into the Mahometan Paradise along with the souls of men, the ass that carried Balaam is one, the dog of the Seven Sleepers the other. This is no small distinction. From what has been written about this beast might be compiled a library of great splendor and magnitude, rivalling that of the Shakespearean cult, and that which clusters about the Bible. It may be said, generally, that all literature is more or less Asinine. "Hail, holy Ass!" the quiring angels sing; "Priest of Unreason, and of Discords King!" Great co-Creator, let Thy glory shine: God made all else, the Mule, the Mule is thine!" G.J. ** AUCTIONEER AUCTIONEER, n. The man who proclaims with a hammer that he has picked a pocket with his tongue. ** AUSTRALIA AUSTRALIA, n. A country lying in the South Sea, whose industrial and commercial development has been unspeakably retarded by an unfortunate dispute among geographers as to whether it is a continent or an island. ** AVERNUS AVERNUS, n. The lake by which the ancients entered the infernal regions. The fact that access to the infernal regions was obtained by a lake is believed by the learned Marcus Ansello Scrutator to have suggested the Christian rite of baptism by immersion. This, however, has been shown by Lactantius to be an error. _Facilis descensus Averni,_ The poet remarks; and the sense Of it is that when down-hill I turn I Will get more of punches than pence. Jehal Dai Lupe B ** BAAL BAAL, n. An old deity formerly much worshiped under various names. As Baal he was popular with the Phoenicians; as Belus or Bel he had the honor to be served by the priest Berosus, who wrote the famous account of the Deluge; as Babel he had a tower partly erected to his glory on the Plain of Shinar. From Babel comes our English word "babble." Under whatever name worshiped, Baal is the Sun-god. As Beelzebub he is the god of flies, which are begotten of the sun's rays on the stagnant water. In Physicia Baal is still worshiped as Bolus, and as Belly he is adored and served with abundant sacrifice by the priests of Guttledom. ** BABE BABE or BABY, n. A misshapen creature of no particular age, sex, or condition, chiefly remarkable for the violence of the sympathies and antipathies it excites in others, itself without sentiment or emotion. There have been famous babes; for example, little Moses, from whose adventure in the bulrushes the Egyptian hierophants of seven centuries before doubtless derived their idle tale of the child Osiris being preserved on a floating lotus leaf. Ere babes were invented The girls were contended. Now man is tormented Until to buy babes he has squandered His money. And so I have pondered This thing, and thought may be 'T were better that Baby The First had been eagled or condored. Ro Amil ** BACCHUS BACCHUS, n. A convenient deity invented by the ancients as an excuse for getting drunk. Is public worship, then, a sin, That for devotions paid to Bacchus The lictors dare to run us in, And resolutely thump and whack us? Jorace ** BACK BACK, n. That part of your friend which it is your privilege to contemplate in your adversity. ** BACKBITE BACKBITE, v.t. To speak of a man as you find him when he can't find you. ** BAIT BAIT, n. A preparation that renders the hook more palatable. The best kind is beauty. ** BAPTISM BAPTISM, n. A sacred rite of such efficacy that he who finds himself in heaven without having undergone it will be unhappy forever. It is performed with water in two ways -- by immersion, or plunging, and by aspersion, or sprinkling. But whether the plan of immersion Is better than simple aspersion Let those immersed And those aspersed Decide by the Authorized Version, And by matching their agues tertian. G.J. ** BAROMETER BAROMETER, n. An ingenious instrument which indicates what kind of weather we are having. ** BARRACK BARRACK, n. A house in which soldiers enjoy a portion of that of which it is their business to deprive others. ** BASILISK BASILISK, n. The cockatrice. A sort of serpent hatched form the egg of a cock. The basilisk had a bad eye, and its glance was fatal. Many infidels deny this creature's existence, but Semprello Aurator saw and handled one that had been blinded by lightning as a punishment for having fatally gazed on a lady of rank whom Jupiter loved. Juno afterward restored the reptile's sight and hid it in a cave. Nothing is so well attested by the ancients as the existence of the basilisk, but the cocks have stopped laying. ** BASTINADO BASTINADO, n. The act of walking on wood without exertion. ** BATH BATH, n. A kind of mystic ceremony substituted for religious worship, with what spiritual efficacy has not been determined. The man who taketh a steam bath He loseth all the skin he hath, And, for he's boiled a brilliant red, Thinketh to cleanliness he's wed, Forgetting that his lungs he's soiling With dirty vapors of the boiling. Richard Gwow ** BATTLE BATTLE, n. A method of untying with the teeth of a political knot that would not yield to the tongue. ** BEARD BEARD, n. The hair that is commonly cut off by those who justly execrate the absurd Chinese custom of shaving the head. ** BEAUTY BEAUTY, n. The power by which a woman charms a lover and terrifies a husband. ** BEFRIEND BEFRIEND, v.t. To make an ingrate. ** BEG BEG, v. To ask for something with an earnestness proportioned to the belief that it will not be given. Who is that, father? A mendicant, child, Haggard, morose, and unaffable -- wild! See how he glares through the bars of his cell! With Citizen Mendicant all is not well. Why did they put him there, father? Because Obeying his belly he struck at the laws. His belly? Oh, well, he was starving, my boy -- A state in which, doubtless, there's little of joy. No bite had he eaten for days, and his cry Was "Bread!" ever "Bread!" What's the matter with pie? With little to wear, he had nothing to sell; To beg was unlawful -- improper as well. Why didn't he work? He would even have done that, But men said: "Get out!" and the State remarked: "Scat!" I mention these incidents merely to show That the vengeance he took was uncommonly low. Revenge, at the best, is the act of a Siou, But for trifles -- Pray what did bad Mendicant do? Stole two loaves of bread to replenish his lack And tuck out the belly that clung to his back. Is that _all_ father dear? There's little to tell: They sent him to jail, and they'll send him to -- well, The company's better than here we can boast, And there's -- Bread for the needy, dear father? Um -- toast. Atka Mip ** BEGGAR BEGGAR, n. One who has relied on the assistance of his friends. ** BEHAVIOR BEHAVIOR, n. Conduct, as determined, not by principle, but by breeding. The word seems to be somewhat loosely used in Dr. Jamrach Holobom's translation of the following lines from the _Dies Irae_: Recordare, Jesu pie, Quod sum causa tuae viae. Ne me perdas illa die. Pray remember, sacred Savior, Whose the thoughtless hand that gave your Death-blow. Pardon such behavior. ** BELLADONNA BELLADONNA, n. In Italian a beautiful lady; in English a deadly poison. A striking example of the essential identity of the two tongues. ** BENEDICTINES BENEDICTINES, n. An order of monks otherwise known as black friars. She thought it a crow, but it turn out to be A monk of St. Benedict croaking a text. "Here's one of an order of cooks," said she -- "Black friars in this world, fried black in the next." "The Devil on Earth" (London, 1712) ** BENEFACTOR BENEFACTOR, n. One who makes heavy purchases of ingratitude, without, however, materially affecting the price, which is still within the means of all. ** BERENICE'S HAIR BERENICE'S HAIR, n. A constellation (_Coma Berenices_) named in honor of one who sacrificed her hair to save her husband. Her locks an ancient lady gave Her loving husband's life to save; And men -- they honored so the dame -- Upon some stars bestowed her name. But to our modern married fair, Who'd give their lords to save their hair, No stellar recognition's given. There are not stars enough in heaven. G.J. ** BIGAMY BIGAMY, n. A mistake in taste for which the wisdom of the future will adjudge a punishment called trigamy. ** BIGOT BIGOT, n. One who is obstinately and zealously attached to an opinion that you do not entertain. ** BILLINGSGATE BILLINGSGATE, n. The invective of an opponent. ** BIRTH BIRTH, n. The first and direst of all disasters. As to the nature of it there appears to be no uniformity. Castor and Pollux were born from the egg. Pallas came out of a skull. Galatea was once a block of stone. Peresilis, who wrote in the tenth century, avers that he grew up out of the ground where a priest had spilled holy water. It is known that Arimaxus was derived from a hole in the earth, made by a stroke of lightning. Leucomedon was the son of a cavern in Mount Aetna, and I have myself seen a man come out of a wine cellar. ** BLACKGUARD BLACKGUARD, n. A man whose qualities, prepared for display like a box of berries in a market -- the fine ones on top -- have been opened on the wrong side. An inverted gentleman. ** BLANK-VERSE BLANK-VERSE, n. Unrhymed iambic pentameters -- the most difficult kind of English verse to write acceptably; a kind, therefore, much affected by those who cannot acceptably write any kind. ** BODY-SNATCHER BODY-SNATCHER, n. A robber of grave-worms. One who supplies the young physicians with that with which the old physicians have supplied the undertaker. The hyena. "One night," a doctor said, "last fall, I and my comrades, four in all, When visiting a graveyard stood Within the shadow of a wall. "While waiting for the moon to sink We saw a wild hyena slink About a new-made grave, and then Begin to excavate its brink! "Shocked by the horrid act, we made A sally from our ambuscade, And, falling on the unholy beast, Dispatched him with a pick and spade." Bettel K. Jhones ** BONDSMAN BONDSMAN, n. A fool who, having property of his own, undertakes to become responsible for that entrusted to another to a third. Philippe of Orleans wishing to appoint one of his favorites, a dissolute nobleman, to a high office, asked him what security he would be able to give. "I need no bondsmen," he replied, "for I can give you my word of honor." "And pray what may be the value of that?" inquired the amused Regent. "Monsieur, it is worth its weight in gold." ** BORE BORE, n. A person who talks when you wish him to listen. ** BOTANY BOTANY, n. The science of vegetables -- those that are not good to eat, as well as those that are. It deals largely with their flowers, which are commonly badly designed, inartistic in color, and ill- smelling. ** BOTTLE-NOSED BOTTLE-NOSED, adj. Having a nose created in the image of its maker. ** BOUNDARY BOUNDARY, n. In political geography, an imaginary line between two nations, separating the imaginary rights of one from the imaginary rights of the other. ** BOUNTY BOUNTY, n. The liberality of one who has much, in permitting one who has nothing to get all that he can. A single swallow, it is said, devours ten millions of insects every year. The supplying of these insects I take to be a signal instance of the Creator's bounty in providing for the lives of His creatures. Henry Ward Beecher ** BRAHMA BRAHMA, n. He who created the Hindoos, who are preserved by Vishnu and destroyed by Siva -- a rather neater division of labor than is found among the deities of some other nations. The Abracadabranese, for example, are created by Sin, maintained by Theft and destroyed by Folly. The priests of Brahma, like those of Abracadabranese, are holy and learned men who are never naughty. O Brahma, thou rare old Divinity, First Person of the Hindoo Trinity, You sit there so calm and securely, With feet folded up so demurely -- You're the First Person Singular, surely. Polydore Smith ** BRAIN BRAIN, n. An apparatus with which we think what we think. That which distinguishes the man who is content to _be_ something from the man who wishes to _do_ something. A man of great wealth, or one who has been pitchforked into high station, has commonly such a headful of brain that his neighbors cannot keep their hats on. In our civilization, and under our republican form of government, brain is so highly honored that it is rewarded by exemption from the cares of office. ** BRANDY BRANDY, n. A cordial composed of one part thunder-and-lightning, one part remorse, two parts bloody murder, one part death-hell-and-the- grave and four parts clarified Satan. Dose, a headful all the time. Brandy is said by Dr. Johnson to be the drink of heroes. Only a hero will venture to drink it. ** BRIDE BRIDE, n. A woman with a fine prospect of happiness behind her. ** BRUTE BRUTE, n. See :HUSBAND:. C ** CAABA CAABA, n. A large stone presented by the archangel Gabriel to the patriarch Abraham, and preserved at Mecca. The patriarch had perhaps asked the archangel for bread. ** CABBAGE CABBAGE, n. A familiar kitchen-garden vegetable about as large and wise as a man's head. The cabbage is so called from Cabagius, a prince who on ascending the throne issued a decree appointing a High Council of Empire consisting of the members of his predecessor's Ministry and the cabbages in the royal garden. When any of his Majesty's measures of state policy miscarried conspicuously it was gravely announced that several members of the High Council had been beheaded, and his murmuring subjects were appeased. ** CALAMITY CALAMITY, n. A more than commonly plain and unmistakable reminder that the affairs of this life are not of our own ordering. Calamities are of two kinds: misfortune to ourselves, and good fortune to others. ** CALLOUS CALLOUS, adj. Gifted with great fortitude to bear the evils afflicting another. When Zeno was told that one of his enemies was no more he was observed to be deeply moved. "What!" said one of his disciples, "you weep at the death of an enemy?" "Ah, 'tis true," replied the great Stoic; "but you should see me smile at the death of a friend." ** CALUMNUS CALUMNUS, n. A graduate of the School for Scandal. ** CAMEL CAMEL, n. A quadruped (the _Splaypes humpidorsus_) of great value to the show business. There are two kinds of camels -- the camel proper and the camel improper. It is the latter that is always exhibited. ** CANNIBAL CANNIBAL, n. A gastronome of the old school who preserves the simple tastes and adheres to the natural diet of the pre-pork period. ** CANNON CANNON, n. An instrument employed in the rectification of national boundaries. ** CANONICALS CANONICALS, n. The motley worm by Jesters of the Court of Heaven. ** CAPITAL CAPITAL, n. The seat of misgovernment. That which provides the fire, the pot, the dinner, the table and the knife and fork for the anarchist; the part of the repast that himself supplies is the disgrace before meat. _Capital Punishment_, a penalty regarding the justice and expediency of which many worthy persons -- including all the assassins -- entertain grave misgivings. ** CARMELITE CARMELITE, n. A mendicant friar of the order of Mount Carmel. As Death was a-rising out one day, Across Mount Camel he took his way, Where he met a mendicant monk, Some three or four quarters drunk, With a holy leer and a pious grin, Ragged and fat and as saucy as sin, Who held out his hands and cried: "Give, give in Charity's name, I pray. Give in the name of the Church. O give, Give that her holy sons may live!" And Death replied, Smiling long and wide: "I'll give, holy father, I'll give thee -- a ride." With a rattle and bang Of his bones, he sprang From his famous Pale Horse, with his spear; By the neck and the foot Seized the fellow, and put Him astride with his face to the rear. The Monarch laughed loud with a sound that fell Like clods on the coffin's sounding shell: "Ho, ho! A beggar on horseback, they say, Will ride to the devil!" -- and _thump_ Fell the flat of his dart on the rump Of the charger, which galloped away. Faster and faster and faster it flew, Till the rocks and the flocks and the trees that grew By the road were dim and blended and blue To the wild, wild eyes Of the rider -- in size Resembling a couple of blackberry pies. Death laughed again, as a tomb might laugh At a burial service spoiled, And the mourners' intentions foiled By the body erecting Its head and objecting To further proceedings in its behalf. Many a year and many a day Have passed since these events away. The monk has long been a dusty corse, And Death has never recovered his horse. For the friar got hold of its tail, And steered it within the pale Of the monastery gray, Where the beast was stabled and fed With barley and oil and bread Till fatter it grew than the fattest friar, And so in due course was appointed Prior. G.J. ** CARNIVOROUS CARNIVOROUS, adj. Addicted to the cruelty of devouring the timorous vegetarian, his heirs and assigns. ** CARTESIAN CARTESIAN, adj. Relating to Descartes, a famous philosopher, author of the celebrated dictum, _Cogito ergo sum_ -- whereby he was pleased to suppose he demonstrated the reality of human existence. The dictum might be improved, however, thus: _Cogito cogito ergo cogito sum_ -- "I think that I think, therefore I think that I am;" as close an approach to certainty as any philosopher has yet made. ** CAT CAT, n. A soft, indestructible automaton provided by nature to be kicked when things go wrong in the domestic circle. This is a dog, This is a cat. This is a frog, This is a rat. Run, dog, mew, cat. Jump, frog, gnaw, rat. Elevenson ** CAVILER CAVILER, n. A critic of our own work. ** CEMETERY CEMETERY, n. An isolated suburban spot where mourners match lies, poets write at a target and stone-cutters spell for a wager. The inscriptions following will serve to illustrate the success attained in these Olympian games: His virtues were so conspicuous that his enemies, unable to overlook them, denied them, and his friends, to whose loose lives they were a rebuke, represented them as vices. They are here commemorated by his family, who shared them. In the earth we here prepare a Place to lay our little Clara. Thomas M. and Mary Frazer P.S. -- Gabriel will raise her. ** CENTAUR CENTAUR, n. One of a race of persons who lived before the division of labor had been carried to such a pitch of differentiation, and who followed the primitive economic maxim, "Every man his own horse." The best of the lot was Chiron, who to the wisdom and virtues of the horse added the fleetness of man. The scripture story of the head of John the Baptist on a charger shows that pagan myths have somewhat sophisticated sacred history. ** CERBERUS CERBERUS, n. The watch-dog of Hades, whose duty it was to guard the entrance -- against whom or what does not clearly appear; everybody, sooner or later, had to go there, and nobody wanted to carry off the entrance. Cerberus is known to have had three heads, and some of the poets have credited him with as many as a hundred. Professor Graybill, whose clerky erudition and profound knowledge of Greek give his opinion great weight, has averaged all the estimates, and makes the number twenty-seven -- a judgment that would be entirely conclusive is Professor Graybill had known (a) something about dogs, and (b) something about arithmetic. ** CHILDHOOD CHILDHOOD, n. The period of human life intermediate between the idiocy of infancy and the folly of youth -- two removes from the sin of manhood and three from the remorse of age. ** CHRISTIAN CHRISTIAN, n. One who believes that the New Testament is a divinely inspired book admirably suited to the spiritual needs of his neighbor. One who follows the teachings of Christ in so far as they are not inconsistent with a life of sin. I dreamed I stood upon a hill, and, lo! The godly multitudes walked to and fro Beneath, in Sabbath garments fitly clad, With pious mien, appropriately sad, While all the church bells made a solemn din -- A fire-alarm to those who lived in sin. Then saw I gazing thoughtfully below, With tranquil face, upon that holy show A tall, spare figure in a robe of white, Whose eyes diffused a melancholy light. "God keep you, strange," I exclaimed. "You are No doubt (your habit shows it) from afar; And yet I entertain the hope that you, Like these good people, are a Christian too." He raised his eyes and with a look so stern It made me with a thousand blushes burn Replied -- his manner with disdain was spiced: "What! I a Christian? No, indeed! I'm Christ." G.J. ** CIRCUS CIRCUS, n. A place where horses, ponies and elephants are permitted to see men, women and children acting the fool. ** CLAIRVOYANT CLAIRVOYANT, n. A person, commonly a woman, who has the power of seeing that which is invisible to her patron, namely, that he is a blockhead. ** CLARIONET CLARIONET, n. An instrument of torture operated by a person with cotton in his ears. There are two instruments that are worse than a clarionet -- two clarionets. ** CLERGYMAN CLERGYMAN, n. A man who undertakes the management of our spiritual affairs as a method of better his temporal ones. ** CLIO CLIO, n. One of the nine Muses. Clio's function was to preside over history -- which she did with great dignity, many of the prominent citizens of Athens occupying seats on the platform, the meetings being addressed by Messrs. Xenophon, Herodotus and other popular speakers. ** CLOCK CLOCK, n. A machine of great moral value to man, allaying his concern for the future by reminding him what a lot of time remains to him. A busy man complained one day: "I get no time!" "What's that you say?" Cried out his friend, a lazy quiz; "You have, sir, all the time there is. There's plenty, too, and don't you doubt it -- We're never for an hour without it." Purzil Crofe ** CLOSE-FISTED CLOSE-FISTED, adj. Unduly desirous of keeping that which many meritorious persons wish to obtain. "Close-fisted Scotchman!" Johnson cried To thrifty J. Macpherson; "See me -- I'm ready to divide With any worthy person." Sad Jamie: "That is very true -- The boast requires no backing; And all are worthy, sir, to you, Who have what you are lacking." Anita M. Bobe ** COENOBITE COENOBITE, n. A man who piously shuts himself up to meditate upon the sin of wickedness; and to keep it fresh in his mind joins a brotherhood of awful examples. O Coenobite, O coenobite, Monastical gregarian, You differ from the anchorite, That solitudinarian: With vollied prayers you wound Old Nick; With dropping shots he makes him sick. Quincy Giles ** COMFORT COMFORT, n. A state of mind produced by contemplation of a neighbor's uneasiness. ** COMMENDATION COMMENDATION, n. The tribute that we pay to achievements that resembles, but do not equal, our own. ** COMMERCE COMMERCE, n. A kind of transaction in which A plunders from B the goods of C, and for compensation B picks the pocket of D of money belonging to E. ** COMMONWEALTH COMMONWEALTH, n. An administrative entity operated by an incalculable multitude of political parasites, logically active but fortuitously efficient. This commonwealth's capitol's corridors view, So thronged with a hungry and indolent crew Of clerks, pages, porters and all attaches Whom rascals appoint and the populace pays That a cat cannot slip through the thicket of shins Nor hear its own shriek for the noise of their chins. On clerks and on pages, and porters, and all, Misfortune attend and disaster befall! May life be to them a succession of hurts; May fleas by the bushel inhabit their shirts; May aches and diseases encamp in their bones, Their lungs full of tubercles, bladders of stones; May microbes, bacilli, their tissues infest, And tapeworms securely their bowels digest; May corn-cobs be snared without hope in their hair, And frequent impalement their pleasure impair. Disturbed be their dreams by the awful discourse Of audible sofas sepulchrally hoarse, By chairs acrobatic and wavering floors -- The mattress that kicks and the pillow that snores! Sons of cupidity, cradled in sin! Your criminal ranks may the death angel thin, Avenging the friend whom I couldn't work in. K.Q. ** COMPROMISE COMPROMISE, n. Such an adjustment of conflicting interests as gives each adversary the satisfaction of thinking he has got what he ought not to have, and is deprived of nothing except what was justly his due. ** COMPULSION COMPULSION, n. The eloquence of power. ** CONDOLE CONDOLE, v.i. To show that bereavement is a smaller evil than sympathy. ** CONFIDANT CONFIDANT, CONFIDANTE, n. One entrusted by A with the secrets of B, confided by _him_ to C. ** CONGRATULATION CONGRATULATION, n. The civility of envy. ** CONGRESS CONGRESS, n. A body of men who meet to repeal laws. ** CONNOISSEUR CONNOISSEUR, n. A specialist who knows everything about something and nothing about anything else. An old wine-bibber having been smashed in a railway collision, some wine was pouted on his lips to revive him. "Pauillac, 1873," he murmured and died. ** CONSERVATIVE CONSERVATIVE, n. A statesman who is enamored of existing evils, as distinguished from the Liberal, who wishes to replace them with others. ** CONSOLATION CONSOLATION, n. The knowledge that a better man is more unfortunate than yourself. ** CONSUL CONSUL, n. In American politics, a person who having failed to secure and office from the people is given one by the Administration on condition that he leave the country. ** CONSULT CONSULT, v.i. To seek another's disapproval of a course already decided on. ** CONTEMPT CONTEMPT, n. The feeling of a prudent man for an enemy who is too formidable safely to be opposed. ** CONTROVERSY CONTROVERSY, n. A battle in which spittle or ink replaces the injurious cannon-ball and the inconsiderate bayonet. In controversy with the facile tongue -- That bloodless warfare of the old and young -- So seek your adversary to engage That on himself he shall exhaust his rage, And, like a snake that's fastened to the ground, With his own fangs inflict the fatal wound. You ask me how this miracle is done? Adopt his own opinions, one by one, And taunt him to refute them; in his wrath He'll sweep them pitilessly from his path. Advance then gently all you wish to prove, Each proposition prefaced with, "As you've So well remarked," or, "As you wisely say, And I cannot dispute," or, "By the way, This view of it which, better far expressed, Runs through your argument." Then leave the rest To him, secure that he'll perform his trust And prove your views intelligent and just. Conmore Apel Brune ** CONVENT CONVENT, n. A place of retirement for woman who wish for leisure to meditate upon the vice of idleness. ** CONVERSATION CONVERSATION, n. A fair to the display of the minor mental commodities, each exhibitor being too intent upon the arrangement of his own wares to observe those of his neighbor. ** CORONATION CORONATION, n. The ceremony of investing a sovereign with the outward and visible signs of his divine right to be blown skyhigh with a dynamite bomb. ** CORPORAL CORPORAL, n. A man who occupies the lowest rung of the military ladder. Fiercely the battle raged and, sad to tell, Our corporal heroically fell! Fame from her height looked down upon the brawl And said: "He hadn't very far to fall." Giacomo Smith ** CORPORATION CORPORATION, n. An ingenious device for obtaining individual profit without individual responsibility. ** CORSAIR CORSAIR, n. A politician of the seas. ** COURT FOOL COURT FOOL, n. The plaintiff. ** COWARD COWARD, n. One who in a perilous emergency thinks with his legs. ** CRAYFISH CRAYFISH, n. A small crustacean very much resembling the lobster, but less indigestible. In this small fish I take it that human wisdom is admirably figured and symbolized; for whereas the crayfish doth move only backward, and can have only retrospection, seeing naught but the perils already passed, so the wisdom of man doth not enable him to avoid the follies that beset his course, but only to apprehend their nature afterward. Sir James Merivale ** CREDITOR CREDITOR, n. One of a tribe of savages dwelling beyond the Financial Straits and dreaded for their desolating incursions. ** CREMONA CREMONA, n. A high-priced violin made in Connecticut. ** CRITIC CRITIC, n. A person who boasts himself hard to please because nobody tries to please him. There is a land of pure delight, Beyond the Jordan's flood, Where saints, apparelled all in white, Fling back the critic's mud. And as he legs it through the skies, His pelt a sable hue, He sorrows sore to recognize The missiles that he threw. Orrin Goof ** CROSS CROSS, n. An ancient religious symbol erroneously supposed to owe its significance to the most solemn event in the history of Christianity, but really antedating it by thousands of years. By many it has been believed to be identical with the _crux ansata_ of the ancient phallic worship, but it has been traced even beyond all that we know of that, to the rites of primitive peoples. We have to-day the White Cross as a symbol of chastity, and the Red Cross as a badge of benevolent neutrality in war. Having in mind the former, the reverend Father Gassalasca Jape smites the lyre to the effect following: "Be good, be good!" the sisterhood Cry out in holy chorus, And, to dissuade from sin, parade Their various charms before us. But why, O why, has ne'er an eye Seen her of winsome manner And youthful grace and pretty face Flaunting the White Cross banner? Now where's the need of speech and screed To better our behaving? A simpler plan for saving man (But, first, is he worth saving?) Is, dears, when he declines to flee From bad thoughts that beset him, Ignores the Law as 't were a straw, And wants to sin -- don't let him. ** CUI CUI :BONO:? [Latin] What good would that do _me_? ** CUNNING CUNNING, n. The faculty that distinguishes a weak animal or person from a strong one. It brings its possessor much mental satisfaction and great material adversity. An Italian proverb says: "The furrier gets the skins of more foxes than asses." ** CUPID CUPID, n. The so-called god of love. This bastard creation of a barbarous fancy was no doubt inflicted upon mythology for the sins of its deities. Of all unbeautiful and inappropriate conceptions this is the most reasonless and offensive. The notion of symbolizing sexual love by a semisexless babe, and comparing the pains of passion to the wounds of an arrow -- of introducing this pudgy homunculus into art grossly to materialize the subtle spirit and suggestion of the work -- this is eminently worthy of the age that, giving it birth, laid it on the doorstep of prosperity. ** CURIOSITY CURIOSITY, n. An objectionable quality of the female mind. The desire to know whether or not a woman is cursed with curiosity is one of the most active and insatiable passions of the masculine soul. ** CURSE CURSE, v.t. Energetically to belabor with a verbal slap-stick. This is an operation which in literature, particularly in the drama, is commonly fatal to the victim. Nevertheless, the liability to a cursing is a risk that cuts but a small figure in fixing the rates of life insurance. ** CYNIC CYNIC, n. A blackguard whose faulty vision sees things as they are, not as they ought to be. Hence the custom among the Scythians of plucking out a cynic's eyes to improve his vision. D ** DAMN DAMN, v. A word formerly much used by the Paphlagonians, the meaning of which is lost. By the learned Dr. Dolabelly Gak it is believed to have been a term of satisfaction, implying the highest possible degree of mental tranquillity. Professor Groke, on the contrary, thinks it expressed an emotion of tumultuous delight, because it so frequently occurs in combination with the word _jod_ or _god_, meaning "joy." It would be with great diffidence that I should advance an opinion conflicting with that of either of these formidable authorities. ** DANCE DANCE, v.i. To leap about to the sound of tittering music, preferably with arms about your neighbor's wife or daughter. There are many kinds of dances, but all those requiring the participation of the two sexes have two characteristics in common: they are conspicuously innocent, and warmly loved by the vicious. ** DANGER DANGER, n. A savage beast which, when it sleeps, Man girds at and despises, But takes himself away by leaps And bounds when it arises. Ambat Delaso ** DARING DARING, n. One of the most conspicuous qualities of a man in security. ** DATARY DATARY, n. A high ecclesiastic official of the Roman Catholic Church, whose important function is to brand the Pope's bulls with the words _Datum Romae_. He enjoys a princely revenue and the friendship of God. ** DAWN DAWN, n. The time when men of reason go to bed. Certain old men prefer to rise at about that time, taking a cold bath and a long walk with an empty stomach, and otherwise mortifying the flesh. They then point with pride to these practices as the cause of their sturdy health and ripe years; the truth being that they are hearty and old, not because of their habits, but in spite of them. The reason we find only robust persons doing this thing is that it has killed all the others who have tried it. ** DAY DAY, n. A period of twenty-four hours, mostly misspent. This period is divided into two parts, the day proper and the night, or day improper -- the former devoted to sins of business, the latter consecrated to the other sort. These two kinds of social activity overlap. ** DEAD DEAD, adj. Done with the work of breathing; done With all the world; the mad race run Though to the end; the golden goal Attained and found to be a hole! Squatol Johnes ** DEBAUCHEE DEBAUCHEE, n. One who has so earnestly pursued pleasure that he has had the misfortune to overtake it. ** DEBT DEBT, n. An ingenious substitute for the chain and whip of the slave- driver. As, pent in an aquarium, the troutlet Swims round and round his tank to find an outlet, Pressing his nose against the glass that holds him, Nor ever sees the prison that enfolds him; So the poor debtor, seeing naught around him, Yet feels the narrow limits that impound him, Grieves at his debt and studies to evade it, And finds at last he might as well have paid it. Barlow S. Vode ** DECALOGUE DECALOGUE, n. A series of commandments, ten in number -- just enough to permit an intelligent selection for observance, but not enough to embarrass the choice. Following is the revised edition of the Decalogue, calculated for this meridian. Thou shalt no God but me adore: 'Twere too expensive to have more. No images nor idols make For Robert Ingersoll to break. Take not God's name in vain; select A time when it will have effect. Work not on Sabbath days at all, But go to see the teams play ball. Honor thy parents. That creates For life insurance lower rates. Kill not, abet not those who kill; Thou shalt not pay thy butcher's bill. Kiss not thy neighbor's wife, unless Thine own thy neighbor doth caress Don't steal; thou'lt never thus compete Successfully in business. Cheat. Bear not false witness -- that is low -- But "hear 'tis rumored so and so." Cover thou naught that thou hast not By hook or crook, or somehow, got. G.J. ** DECIDE DECIDE, v.i. To succumb to the preponderance of one set of influences over another set. A leaf was riven from a tree, "I mean to fall to earth," said he. The west wind, rising, made him veer. "Eastward," said he, "I now shall steer." The east wind rose with greater force. Said he: "'Twere wise to change my course." With equal power they contend. He said: "My judgment I suspend." Down died the winds; the leaf, elate, Cried: "I've decided to fall straight." "First thoughts are best?" That's not the moral; Just choose your own and we'll not quarrel. Howe'er your choice may chance to fall, You'll have no hand in it at all. G.J. ** DEFAME DEFAME, v.t. To lie about another. To tell the truth about another. ** DEFENCELESS DEFENCELESS, adj. Unable to attack. ** DEGENERATE DEGENERATE, adj. Less conspicuously admirable than one's ancestors. The contemporaries of Homer were striking examples of degeneracy; it required ten of them to raise a rock or a riot that one of the heroes of the Trojan war could have raised with ease. Homer never tires of sneering at "men who live in these degenerate days," which is perhaps why they suffered him to beg his bread -- a marked instance of returning good for evil, by the way, for if they had forbidden him he would certainly have starved. ** DEGRADATION DEGRADATION, n. One of the stages of moral and social progress from private station to political preferment. ** DEINOTHERIUM DEINOTHERIUM, n. An extinct pachyderm that flourished when the Pterodactyl was in fashion. The latter was a native of Ireland, its name being pronounced Terry Dactyl or Peter O'Dactyl, as the man pronouncing it may chance to have heard it spoken or seen it printed. ** DEJEUNER DEJEUNER, n. The breakfast of an American who has been in Paris. Variously pronounced. ** DELEGATION DELEGATION, n. In American politics, an article of merchandise that comes in sets. ** DELIBERATION DELIBERATION, n. The act of examining one's bread to determine which side it is buttered on. ** DELUGE DELUGE, n. A notable first experiment in baptism which washed away the sins (and sinners) of the world. ** DELUSION DELUSION, n. The father of a most respectable family, comprising Enthusiasm, Affection, Self-denial, Faith, Hope, Charity and many other goodly sons and daughters. All hail, Delusion! Were it not for thee The world turned topsy-turvy we should see; For Vice, respectable with cleanly fancies, Would fly abandoned Virtue's gross advances. Mumfrey Mappel ** DENTIST DENTIST, n. A prestidigitator who, putting metal into your mouth, pulls coins out of your pocket. ** DEPENDENT DEPENDENT, adj. Reliant upon another's generosity for the support which you are not in a position to exact from his fears. ** DEPUTY DEPUTY, n. A male relative of an office-holder, or of his bondsman. The deputy is commonly a beautiful young man, with a red necktie and an intricate system of cobwebs extending from his nose to his desk. When accidentally struck by the janitor's broom, he gives off a cloud of dust. "Chief Deputy," the Master cried, "To-day the books are to be tried By experts and accountants who Have been commissioned to go through Our office here, to see if we Have stolen injudiciously. Please have the proper entries made, The proper balances displayed, Conforming to the whole amount Of cash on hand -- which they will count. I've long admired your punctual way -- Here at the break and close of day, Confronting in your chair the crowd Of business men, whose voices loud And gestures violent you quell By some mysterious, calm spell -- Some magic lurking in your look That brings the noisiest to book And spreads a holy and profound Tranquillity o'er all around. So orderly all's done that they Who came to draw remain to pay. But now the time demands, at last, That you employ your genius vast In energies more active. Rise And shake the lightnings from your eyes; Inspire your underlings, and fling Your spirit into everything!" The Master's hand here dealt a whack Upon the Deputy's bent back, When straightway to the floor there fell A shrunken globe, a rattling shell A blackened, withered, eyeless head! The man had been a twelvemonth dead. Jamrach Holobom ** DESTINY DESTINY, n. A tyrant's authority for crime and fool's excuse for failure. ** DIAGNOSIS DIAGNOSIS, n. A physician's forecast of the disease by the patient's pulse and purse. ** DIAPHRAGM DIAPHRAGM, n. A muscular partition separating disorders of the chest from disorders of the bowels. ** DIARY DIARY, n. A daily record of that part of one's life, which he can relate to himself without blushing. Hearst kept a diary wherein were writ All that he had of wisdom and of wit. So the Recording Angel, when Hearst died, Erased all entries of his own and cried: "I'll judge you by your diary." Said Hearst: "Thank you; 'twill show you I am Saint the First" -- Straightway producing, jubilant and proud, That record from a pocket in his shroud. The Angel slowly turned the pages o'er, Each stupid line of which he knew before, Glooming and gleaming as by turns he hit On Shallow sentiment and stolen wit; Then gravely closed the book and gave it back. "My friend, you've wandered from your proper track: You'd never be content this side the tomb -- For big ideas Heaven has little room, And Hell's no latitude for making mirth," He said, and kicked the fellow back to earth. "The Mad Philosopher" ** DICTATOR DICTATOR, n. The chief of a nation that prefers the pestilence of despotism to the plague of anarchy. ** DICTIONARY DICTIONARY, n. A malevolent literary device for cramping the growth of a language and making it hard and inelastic. This dictionary, however, is a most useful work. ** DIE DIE, n. The singular of "dice." We seldom hear the word, because there is a prohibitory proverb, "Never say die." At long intervals, however, some one says: "The die is cast," which is not true, for it is cut. The word is found in an immortal couplet by that eminent poet and domestic economist, Senator Depew: A cube of cheese no larger than a die May bait the trap to catch a nibbling mie. ** DIGESTION DIGESTION, n. The conversion of victuals into virtues. When the process is imperfect, vices are evolved instead -- a circumstance from which that wicked writer, Dr. Jeremiah Blenn, infers that the ladies are the greater sufferers from dyspepsia. ** DIPLOMACY DIPLOMACY, n. The patriotic art of lying for one's country. ** DISABUSE DISABUSE, v.t. The present your neighbor with another and better error than the one which he has deemed it advantageous to embrace. ** DISCRIMINATE DISCRIMINATE, v.i. To note the particulars in which one person or thing is, if possible, more objectionable than another. ** DISCUSSION DISCUSSION, n. A method of confirming others in their errors. ** DISOBEDIENCE DISOBEDIENCE, n. The silver lining to the cloud of servitude. ** DISOBEY DISOBEY, v.t. To celebrate with an appropriate ceremony the maturity of a command. His right to govern me is clear as day, My duty manifest to disobey; And if that fit observance e'er I shut May I and duty be alike undone. Israfel Brown ** DISSEMBLE DISSEMBLE, v.i. To put a clean shirt upon the character. Let us dissemble. Adam ** DISTANCE DISTANCE, n. The only thing that the rich are willing for the poor to call theirs, and keep. ** DISTRESS DISTRESS, n. A disease incurred by exposure to the prosperity of a friend. ** DIVINATION DIVINATION, n. The art of nosing out the occult. Divination is of as many kinds as there are fruit-bearing varieties of the flowering dunce and the early fool. ** DOG DOG, n. A kind of additional or subsidiary Deity designed to catch the overflow and surplus of the world's worship. This Divine Being in some of his smaller and silkier incarnations takes, in the affection of Woman, the place to which there is no human male aspirant. The Dog is a survival -- an anachronism. He toils not, neither does he spin, yet Solomon in all his glory never lay upon a door-mat all day long, sun-soaked and fly-fed and fat, while his master worked for the means wherewith to purchase the idle wag of the Solomonic tail, seasoned with a look of tolerant recognition. ** DRAGOON DRAGOON, n. A soldier who combines dash and steadiness in so equal measure that he makes his advances on foot and his retreats on horseback. ** DRAMATIST DRAMATIST, n. One who adapts plays from the French. ** DRUIDS DRUIDS, n. Priests and ministers of an ancient Celtic religion which did not disdain to employ the humble allurement of human sacrifice. Very little is now known about the Druids and their faith. Pliny says their religion, originating in Britain, spread eastward as far as Persia. Caesar says those who desired to study its mysteries went to Britain. Caesar himself went to Britain, but does not appear to have obtained any high preferment in the Druidical Church, although his talent for human sacrifice was considerable. Druids performed their religious rites in groves, and knew nothing of church mortgages and the season-ticket system of pew rents. They were, in short, heathens and -- as they were once complacently catalogued by a distinguished prelate of the Church of England -- Dissenters. ** DUCK-BILL DUCK-BILL, n. Your account at your restaurant during the canvas-back season. ** DUEL DUEL, n. A formal ceremony preliminary to the reconciliation of two enemies. Great skill is necessary to its satisfactory observance; if awkwardly performed the most unexpected and deplorable consequences sometimes ensue. A long time ago a man lost his life in a duel. That dueling's a gentlemanly vice I hold; and wish that it had been my lot To live my life out in some favored spot -- Some country where it is considered nice To split a rival like a fish, or slice A husband like a spud, or with a shot Bring down a debtor doubled in a knot And ready to be put upon the ice. Some miscreants there are, whom I do long To shoot, to stab, or some such way reclaim The scurvy rogues to better lives and manners, I seem to see them now -- a mighty throng. It looks as if to challenge _me_ they came, Jauntily marching with brass bands and banners! Xamba Q. Dar ** DULLARD DULLARD, n. A member of the reigning dynasty in letters and life. The Dullards came in with Adam, and being both numerous and sturdy have overrun the habitable world. The secret of their power is their insensibility to blows; tickle them with a bludgeon and they laugh with a platitude. The Dullards came originally from Boeotia, whence they were driven by stress of starvation, their dullness having blighted the crops. For some centuries they infested Philistia, and many of them are called Philistines to this day. In the turbulent times of the Crusades they withdrew thence and gradually overspread all Europe, occupying most of the high places in politics, art, literature, science and theology. Since a detachment of Dullards came over with the Pilgrims in the _Mayflower_ and made a favorable report of the country, their increase by birth, immigration, and conversion has been rapid and steady. According to the most trustworthy statistics the number of adult Dullards in the United States is but little short of thirty millions, including the statisticians. The intellectual centre of the race is somewhere about Peoria, Illinois, but the New England Dullard is the most shockingly moral. ** DUTY DUTY, n. That which sternly impels us in the direction of profit, along the line of desire. Sir Lavender Portwine, in favor at court, Was wroth at his master, who'd kissed Lady Port. His anger provoked him to take the king's head, But duty prevailed, and he took the king's bread, Instead. G.J. E ** EAT EAT, v.i. To perform successively (and successfully) the functions of mastication, humectation, and deglutition. "I was in the drawing-room, enjoying my dinner," said Brillat- Savarin, beginning an anecdote. "What!" interrupted Rochebriant; "eating dinner in a drawing-room?" "I must beg you to observe, monsieur," explained the great gastronome, "that I did not say I was eating my dinner, but enjoying it. I had dined an hour before." ** EAVESDROP EAVESDROP, v.i. Secretly to overhear a catalogue of the crimes and vices of another or yourself. A lady with one of her ears applied To an open keyhole heard, inside, Two female gossips in converse free -- The subject engaging them was she. "I think," said one, "and my husband thinks That she's a prying, inquisitive minx!" As soon as no more of it she could hear The lady, indignant, removed her ear. "I will not stay," she said, with a pout, "To hear my character lied about!" Gopete Sherany ** ECCENTRICITY ECCENTRICITY, n. A method of distinction so cheap that fools employ it to accentuate their incapacity. ** ECONOMY ECONOMY, n. Purchasing the barrel of whiskey that you do not need for the price of the cow that you cannot afford. ** EDIBLE EDIBLE, adj. Good to eat, and wholesome to digest, as a worm to a toad, a toad to a snake, a snake to a pig, a pig to a man, and a man to a worm. ** EDITOR EDITOR, n. A person who combines the judicial functions of Minos, Rhadamanthus and Aeacus, but is placable with an obolus; a severely virtuous censor, but so charitable withal that he tolerates the virtues of others and the vices of himself; who flings about him the splintering lightning and sturdy thunders of admonition till he resembles a bunch of firecrackers petulantly uttering his mind at the tail of a dog; then straightway murmurs a mild, melodious lay, soft as the cooing of a donkey intoning its prayer to the evening star. Master of mysteries and lord of law, high-pinnacled upon the throne of thought, his face suffused with the dim splendors of the Transfiguration, his legs intertwisted and his tongue a-cheek, the editor spills his will along the paper and cuts it off in lengths to suit. And at intervals from behind the veil of the temple is heard the voice of the foreman demanding three inches of wit and six lines of religious meditation, or bidding him turn off the wisdom and whack up some pathos. O, the Lord of Law on the Throne of Thought, A gilded impostor is he. Of shreds and patches his robes are wrought, His crown is brass, Himself an ass, And his power is fiddle-dee-dee. Prankily, crankily prating of naught, Silly old quilly old Monarch of Thought. Public opinion's camp-follower he, Thundering, blundering, plundering free. Affected, Ungracious, Suspected, Mendacious, Respected contemporaree! J.H. Bumbleshook ** EDUCATION EDUCATION, n. That which discloses to the wise and disguises from the foolish their lack of understanding. ** EFFECT EFFECT, n. The second of two phenomena which always occur together in the same order. The first, called a Cause, is said to generate the other -- which is no more sensible than it would be for one who has never seen a dog except in the pursuit of a rabbit to declare the rabbit the cause of a dog. ** EGOTIST EGOTIST, n. A person of low taste, more interested in himself than in me. Megaceph, chosen to serve the State In the halls of legislative debate, One day with all his credentials came To the capitol's door and announced his name. The doorkeeper looked, with a comical twist Of the face, at the eminent egotist, And said: "Go away, for we settle here All manner of questions, knotty and queer, And we cannot have, when the speaker demands To be told how every member stands, A man who to all things under the sky Assents by eternally voting 'I'." ** EJECTION EJECTION, n. An approved remedy for the disease of garrulity. It is also much used in cases of extreme poverty. ** ELECTOR ELECTOR, n. One who enjoys the sacred privilege of voting for the man of another man's choice. ** ELECTRICITY ELECTRICITY, n. The power that causes all natural phenomena not known to be caused by something else. It is the same thing as lightning, and its famous attempt to strike Dr. Franklin is one of the most picturesque incidents in that great and good man's career. The memory of Dr. Franklin is justly held in great reverence, particularly in France, where a waxen effigy of him was recently on exhibition, bearing the following touching account of his life and services to science: "Monsieur Franqulin, inventor of electricity. This illustrious savant, after having made several voyages around the world, died on the Sandwich Islands and was devoured by savages, of whom not a single fragment was ever recovered." Electricity seems destined to play a most important part in the arts and industries. The question of its economical application to some purposes is still unsettled, but experiment has already proved that it will propel a street car better than a gas jet and give more light than a horse. ** ELEGY ELEGY, n. A composition in verse, in which, without employing any of the methods of humor, the writer aims to produce in the reader's mind the dampest kind of dejection. The most famous English example begins somewhat like this: The cur foretells the knell of parting day; The loafing herd winds slowly o'er the lea; The wise man homeward plods; I only stay To fiddle-faddle in a minor key. ** ELOQUENCE ELOQUENCE, n. The art of orally persuading fools that white is the color that it appears to be. It includes the gift of making any color appear white. ** ELYSIUM ELYSIUM, n. An imaginary delightful country which the ancients foolishly believed to be inhabited by the spirits of the good. This ridiculous and mischievous fable was swept off the face of the earth by the early Christians -- may their souls be happy in Heaven! ** EMANCIPATION EMANCIPATION, n. A bondman's change from the tyranny of another to the despotism of himself. He was a slave: at word he went and came; His iron collar cut him to the bone. Then Liberty erased his owner's name, Tightened the rivets and inscribed his own. G.J. ** EMBALM EMBALM, v.i. To cheat vegetation by locking up the gases upon which it feeds. By embalming their dead and thereby deranging the natural balance between animal and vegetable life, the Egyptians made their once fertile and populous country barren and incapable of supporting more than a meagre crew. The modern metallic burial casket is a step in the same direction, and many a dead man who ought now to be ornamenting his neighbor's lawn as a tree, or enriching his table as a bunch of radishes, is doomed to a long inutility. We shall get him after awhile if we are spared, but in the meantime the violet and rose are languishing for a nibble at his _glutoeus maximus_. ** EMOTION EMOTION, n. A prostrating disease caused by a determination of the heart to the head. It is sometimes accompanied by a copious discharge of hydrated chloride of sodium from the eyes. ** ENCOMIAST ENCOMIAST, n. A special (but not particular) kind of liar. ** END END, n. The position farthest removed on either hand from the Interlocutor. The man was perishing apace Who played the tambourine; The seal of death was on his face -- 'Twas pallid, for 'twas clean. "This is the end," the sick man said In faint and failing tones. A moment later he was dead, And Tambourine was Bones. Tinley Roquot ** ENOUGH ENOUGH, pro. All there is in the world if you like it. Enough is as good as a feast -- for that matter Enougher's as good as a feast for the platter. Arbely C. Strunk ** ENTERTAINMENT ENTERTAINMENT, n. Any kind of amusement whose inroads stop short of death by injection. ** ENTHUSIASM ENTHUSIASM, n. A distemper of youth, curable by small doses of repentance in connection with outward applications of experience. Byron, who recovered long enough to call it "entuzy-muzy," had a relapse, which carried him off -- to Missolonghi. ** ENVELOPE ENVELOPE, n. The coffin of a document; the scabbard of a bill; the husk of a remittance; the bed-gown of a love-letter. ** ENVY ENVY, n. Emulation adapted to the meanest capacity. ** EPAULET EPAULET, n. An ornamented badge, serving to distinguish a military officer from the enemy -- that is to say, from the officer of lower rank to whom his death would give promotion. ** EPICURE EPICURE, n. An opponent of Epicurus, an abstemious philosopher who, holding that pleasure should be the chief aim of man, wasted no time in gratification from the senses. ** EPIGRAM EPIGRAM, n. A short, sharp saying in prose or verse, frequently characterize by acidity or acerbity and sometimes by wisdom. Following are some of the more notable epigrams of the learned and ingenious Dr. Jamrach Holobom: We know better the needs of ourselves than of others. To serve oneself is economy of administration. In each human heart are a tiger, a pig, an ass and a nightingale. Diversity of character is due to their unequal activity. There are three sexes; males, females and girls. Beauty in women and distinction in men are alike in this: they seem to be the unthinking a kind of credibility. Women in love are less ashamed than men. They have less to be ashamed of. While your friend holds you affectionately by both your hands you are safe, for you can watch both his. ** EPITAPH EPITAPH, n. An inscription on a tomb, showing that virtues acquired by death have a retroactive effect. Following is a touching example: Here lie the bones of Parson Platt, Wise, pious, humble and all that, Who showed us life as all should live it; Let that be said -- and God forgive it! ** ERUDITION ERUDITION, n. Dust shaken out of a book into an empty skull. So wide his erudition's mighty span, He knew Creation's origin and plan And only came by accident to grief -- He thought, poor man, 'twas right to be a thief. Romach Pute ** ESOTERIC ESOTERIC, adj. Very particularly abstruse and consummately occult. The ancient philosophies were of two kinds, -- _exoteric_, those that the philosophers themselves could partly understand, and _esoteric_, those that nobody could understand. It is the latter that have most profoundly affected modern thought and found greatest acceptance in our time. ** ETHNOLOGY ETHNOLOGY, n. The science that treats of the various tribes of Man, as robbers, thieves, swindlers, dunces, lunatics, idiots and ethnologists. ** EUCHARIST EUCHARIST, n. A sacred feast of the religious sect of Theophagi. A dispute once unhappily arose among the members of this sect as to what it was that they ate. In this controversy some five hundred thousand have already been slain, and the question is still unsettled. ** EULOGY EULOGY, n. Praise of a person who has either the advantages of wealth and power, or the consideration to be dead. ** EVANGELIST EVANGELIST, n. A bearer of good tidings, particularly (in a religious sense) such as assure us of our own salvation and the damnation of our neighbors. ** EVERLASTING EVERLASTING, adj. Lasting forever. It is with no small diffidence that I venture to offer this brief and elementary definition, for I am not unaware of the existence of a bulky volume by a sometime Bishop of Worcester, entitled, _A Partial Definition of the Word "Everlasting," as Used in the Authorized Version of the Holy Scriptures_. His book was once esteemed of great authority in the Anglican Church, and is still, I understand, studied with pleasure to the mind and profit of the soul. ** EXCEPTION EXCEPTION, n. A thing which takes the liberty to differ from other things of its class, as an honest man, a truthful woman, etc. "The exception proves the rule" is an expression constantly upon the lips of the ignorant, who parrot it from one another with never a thought of its absurdity. In the Latin, "_Exceptio probat regulam_" means that the exception _tests_ the rule, puts it to the proof, not _confirms_ it. The malefactor who drew the meaning from this excellent dictum and substituted a contrary one of his own exerted an evil power which appears to be immortal. ** EXCESS EXCESS, n. In morals, an indulgence that enforces by appropriate penalties the law of moderation. Hail, high Excess -- especially in wine, To thee in worship do I bend the knee Who preach abstemiousness unto me -- My skull thy pulpit, as my paunch thy shrine. Precept on precept, aye, and line on line, Could ne'er persuade so sweetly to agree With reason as thy touch, exact and free, Upon my forehead and along my spine. At thy command eschewing pleasure's cup, With the hot grape I warm no more my wit; When on thy stool of penitence I sit I'm quite converted, for I can't get up. Ungrateful he who afterward would falter To make new sacrifices at thine altar! ** EXCOMMUNICATION EXCOMMUNICATION, n. This "excommunication" is a word In speech ecclesiastical oft heard, And means the damning, with bell, book and candle, Some sinner whose opinions are a scandal -- A rite permitting Satan to enslave him Forever, and forbidding Christ to save him. Gat Huckle ** EXECUTIVE EXECUTIVE, n. An officer of the Government, whose duty it is to enforce the wishes of the legislative power until such time as the judicial department shall be pleased to pronounce them invalid and of no effect. Following is an extract from an old book entitled, _The Lunarian Astonished_ -- Pfeiffer & Co., Boston, 1803: LUNARIAN: Then when your Congress has passed a law it goes directly to the Supreme Court in order that it may at once be known whether it is constitutional? TERRESTRIAN: O no; it does not require the approval of the Supreme Court until having perhaps been enforced for many years somebody objects to its operation against himself -- I mean his client. The President, if he approves it, begins to execute it at once. LUNARIAN: Ah, the executive power is a part of the legislative. Do your policemen also have to approve the local ordinances that they enforce? TERRESTRIAN: Not yet -- at least not in their character of constables. Generally speaking, though, all laws require the approval of those whom they are intended to restrain. LUNARIAN: I see. The death warrant is not valid until signed by the murderer. TERRESTRIAN: My friend, you put it too strongly; we are not so consistent. LUNARIAN: But this system of maintaining an expensive judicial machinery to pass upon the validity of laws only after they have long been executed, and then only when brought before the court by some private person -- does it not cause great confusion? TERRESTRIAN: It does. LUNARIAN: Why then should not your laws, previously to being executed, be validated, not by the signature of your President, but by that of the Chief Justice of the Supreme Court? TERRESTRIAN: There is no precedent for any such course. LUNARIAN: Precedent. What is that? TERRESTRIAN: It has been defined by five hundred lawyers in three volumes each. So how can any one know? ** EXHORT EXHORT, v.t. In religious affairs, to put the conscience of another upon the spit and roast it to a nut-brown discomfort. ** EXILE EXILE, n. One who serves his country by residing abroad, yet is not an ambassador. An English sea-captain being asked if he had read "The Exile of Erin," replied: "No, sir, but I should like to anchor on it." Years afterwards, when he had been hanged as a pirate after a career of unparalleled atrocities, the following memorandum was found in the ship's log that he had kept at the time of his reply: Aug. 3d, 1842. Made a joke on the ex-Isle of Erin. Coldly received. War with the whole world! ** EXISTENCE EXISTENCE, n. A transient, horrible, fantastic dream, Wherein is nothing yet all things do seem: From which we're wakened by a friendly nudge Of our bedfellow Death, and cry: "O fudge!" ** EXPERIENCE EXPERIENCE, n. The wisdom that enables us to recognize as an undesirable old acquaintance the folly that we have already embraced. To one who, journeying through night and fog, Is mired neck-deep in an unwholesome bog, Experience, like the rising of the dawn, Reveals the path that he should not have gone. Joel Frad Bink ** EXPOSTULATION EXPOSTULATION, n. One of the many methods by which fools prefer to lose their friends. ** EXTINCTION EXTINCTION, n. The raw material out of which theology created the future state. F ** FAIRY FAIRY, n. A creature, variously fashioned and endowed, that formerly inhabited the meadows and forests. It was nocturnal in its habits, and somewhat addicted to dancing and the theft of children. The fairies are now believed by naturalist to be extinct, though a clergyman of the Church of England saw three near Colchester as lately as 1855, while passing through a park after dining with the lord of the manor. The sight greatly staggered him, and he was so affected that his account of it was incoherent. In the year 1807 a troop of fairies visited a wood near Aix and carried off the daughter of a peasant, who had been seen to enter it with a bundle of clothing. The son of a wealthy _bourgeois_ disappeared about the same time, but afterward returned. He had seen the abduction been in pursuit of the fairies. Justinian Gaux, a writer of the fourteenth century, avers that so great is the fairies' power of transformation that he saw one change itself into two opposing armies and fight a battle with great slaughter, and that the next day, after it had resumed its original shape and gone away, there were seven hundred bodies of the slain which the villagers had to bury. He does not say if any of the wounded recovered. In the time of Henry III, of England, a law was made which prescribed the death penalty for "Kyllynge, wowndynge, or mamynge" a fairy, and it was universally respected. ** FAITH FAITH, n. Belief without evidence in what is told by one who speaks without knowledge, of things without parallel. ** FAMOUS FAMOUS, adj. Conspicuously miserable. Done to a turn on the iron, behold Him who to be famous aspired. Content? Well, his grill has a plating of gold, And his twistings are greatly admired. Hassan Brubuddy ** FASHION FASHION, n. A despot whom the wise ridicule and obey. A king there was who lost an eye In some excess of passion; And straight his courtiers all did try To follow the new fashion. Each dropped one eyelid when before The throne he ventured, thinking 'Twould please the king. That monarch swore He'd slay them all for winking. What should they do? They were not hot To hazard such disaster; They dared not close an eye -- dared not See better than their master. Seeing them lacrymose and glum, A leech consoled the weepers: He spread small rags with liquid gum And covered half their peepers. The court all wore the stuff, the flame Of royal anger dying. That's how court-plaster got its name Unless I'm greatly lying. Naramy Oof ** FEAST FEAST, n. A festival. A religious celebration usually signalized by gluttony and drunkenness, frequently in honor of some holy person distinguished for abstemiousness. In the Roman Catholic Church feasts are "movable" and "immovable," but the celebrants are uniformly immovable until they are full. In their earliest development these entertainments took the form of feasts for the dead; such were held by the Greeks, under the name _Nemeseia_, by the Aztecs and Peruvians, as in modern times they are popular with the Chinese; though it is believed that the ancient dead, like the modern, were light eaters. Among the many feasts of the Romans was the _Novemdiale_, which was held, according to Livy, whenever stones fell from heaven. ** FELON FELON, n. A person of greater enterprise than discretion, who in embracing an opportunity has formed an unfortunate attachment. ** FEMALE FEMALE, n. One of the opposing, or unfair, sex. The Maker, at Creation's birth, With living things had stocked the earth. From elephants to bats and snails, They all were good, for all were males. But when the Devil came and saw He said: "By Thine eternal law Of growth, maturity, decay, These all must quickly pass away And leave untenanted the earth Unless Thou dost establish birth" -- Then tucked his head beneath his wing To laugh -- he had no sleeve -- the thing With deviltry did so accord, That he'd suggested to the Lord. The Master pondered this advice, Then shook and threw the fateful dice Wherewith all matters here below Are ordered, and observed the throw; Then bent His head in awful state, Confirming the decree of Fate. From every part of earth anew The conscious dust consenting flew, While rivers from their courses rolled To make it plastic for the mould. Enough collected (but no more, For niggard Nature hoards her store) He kneaded it to flexible clay, While Nick unseen threw some away. And then the various forms He cast, Gross organs first and finer last; No one at once evolved, but all By even touches grew and small Degrees advanced, till, shade by shade, To match all living things He'd made Females, complete in all their parts Except (His clay gave out) the hearts. "No matter," Satan cried; "with speed I'll fetch the very hearts they need" -- So flew away and soon brought back The number needed, in a sack. That night earth range with sounds of strife -- Ten million males each had a wife; That night sweet Peace her pinions spread O'er Hell -- ten million devils dead! G.J. ** FIB FIB, n. A lie that has not cut its teeth. An habitual liar's nearest approach to truth: the perigee of his eccentric orbit. When David said: "All men are liars," Dave, Himself a liar, fibbed like any thief. Perhaps he thought to weaken disbelief By proof that even himself was not a slave To Truth; though I suspect the aged knave Had been of all her servitors the chief Had he but known a fig's reluctant leaf Is more than e'er she wore on land or wave. No, David served not Naked Truth when he Struck that sledge-hammer blow at all his race; Nor did he hit the nail upon the head: For reason shows that it could never be, And the facts contradict him to his face. Men are not liars all, for some are dead. Bartle Quinker ** FICKLENESS FICKLENESS, n. The iterated satiety of an enterprising affection. ** FIDDLE FIDDLE, n. An instrument to tickle human ears by friction of a horse's tail on the entrails of a cat. To Rome said Nero: "If to smoke you turn I shall not cease to fiddle while you burn." To Nero Rome replied: "Pray do your worst, 'Tis my excuse that you were fiddling first." Orm Pludge ** FIDELITY FIDELITY, n. A virtue peculiar to those who are about to be betrayed. ** FINANCE FINANCE, n. The art or science of managing revenues and resources for the best advantage of the manager. The pronunciation of this word with the i long and the accent on the first syllable is one of America's most precious discoveries and possessions. ** FLAG FLAG, n. A colored rag borne above troops and hoisted on forts and ships. It appears to serve the same purpose as certain signs that one sees and vacant lots in London -- "Rubbish may be shot here." ** FLESH FLESH, n. The Second Person of the secular Trinity. ** FLOP FLOP, v. Suddenly to change one's opinions and go over to another party. The most notable flop on record was that of Saul of Tarsus, who has been severely criticised as a turn-coat by some of our partisan journals. ** FLY-SPECK FLY-SPECK, n. The prototype of punctuation. It is observed by Garvinus that the systems of punctuation in use by the various literary nations depended originally upon the social habits and general diet of the flies infesting the several countries. These creatures, which have always been distinguished for a neighborly and companionable familiarity with authors, liberally or niggardly embellish the manuscripts in process of growth under the pen, according to their bodily habit, bringing out the sense of the work by a species of interpretation superior to, and independent of, the writer's powers. The "old masters" of literature -- that is to say, the early writers whose work is so esteemed by later scribes and critics in the same language -- never punctuated at all, but worked right along free-handed, without that abruption of the thought which comes from the use of points. (We observe the same thing in children to-day, whose usage in this particular is a striking and beautiful instance of the law that the infancy of individuals reproduces the methods and stages of development characterizing the infancy of races.) In the work of these primitive scribes all the punctuation is found, by the modern investigator with his optical instruments and chemical tests, to have been inserted by the writers' ingenious and serviceable collaborator, the common house-fly -- _Musca maledicta_. In transcribing these ancient MSS, for the purpose of either making the work their own or preserving what they naturally regard as divine revelations, later writers reverently and accurately copy whatever marks they find upon the papyrus or parchment, to the unspeakable enhancement of the lucidity of the thought and value of the work. Writers contemporary with the copyists naturally avail themselves of the obvious advantages of these marks in their own work, and with such assistance as the flies of their own household may be willing to grant, frequently rival and sometimes surpass the older compositions, in respect at least of punctuation, which is no small glory. Fully to understand the important services that flies perform to literature it is only necessary to lay a page of some popular novelist alongside a saucer of cream-and-molasses in a sunny room and observe "how the wit brightens and the style refines" in accurate proportion to the duration of exposure. ** FOLLY FOLLY, n. That "gift and faculty divine" whose creative and controlling energy inspires Man's mind, guides his actions and adorns his life. Folly! although Erasmus praised thee once In a thick volume, and all authors known, If not thy glory yet thy power have shown, Deign to take homage from thy son who hunts Through all thy maze his brothers, fool and dunce, To mend their lives and to sustain his own, However feebly be his arrows thrown, Howe'er each hide the flying weapons blunts. All-Father Folly! be it mine to raise, With lusty lung, here on his western strand With all thine offspring thronged from every land, Thyself inspiring me, the song of praise. And if too weak, I'll hire, to help me bawl, Dick Watson Gilder, gravest of us all. Aramis Loto Frope ** FOOL FOOL, n. A person who pervades the domain of intellectual speculation and diffuses himself through the channels of moral activity. He is omnific, omniform, omnipercipient, omniscience, omnipotent. He it was who invented letters, printing, the railroad, the steamboat, the telegraph, the platitude and the circle of the sciences. He created patriotism and taught the nations war -- founded theology, philosophy, law, medicine and Chicago. He established monarchical and republican government. He is from everlasting to everlasting -- such as creation's dawn beheld he fooleth now. In the morning of time he sang upon primitive hills, and in the noonday of existence headed the procession of being. His grandmotherly hand was warmly tucked-in the set sun of civilization, and in the twilight he prepares Man's evening meal of milk-and-morality and turns down the covers of the universal grave. And after the rest of us shall have retired for the night of eternal oblivion he will sit up to write a history of human civilization. ** FORCE FORCE, n. "Force is but might," the teacher said -- "That definition's just." The boy said naught but through instead, Remembering his pounded head: "Force is not might but must!" ** FOREFINGER FOREFINGER, n. The finger commonly used in pointing out two malefactors. ** FOREORDINATION FOREORDINATION, n. This looks like an easy word to define, but when I consider that pious and learned theologians have spent long lives in explaining it, and written libraries to explain their explanations; when I remember the nations have been divided and bloody battles caused by the difference between foreordination and predestination, and that millions of treasure have been expended in the effort to prove and disprove its compatibility with freedom of the will and the efficacy of prayer, praise, and a religious life, -- recalling these awful facts in the history of the word, I stand appalled before the mighty problem of its signification, abase my spiritual eyes, fearing to contemplate its portentous magnitude, reverently uncover and humbly refer it to His Eminence Cardinal Gibbons and His Grace Bishop Potter. ** FORGETFULNESS FORGETFULNESS, n. A gift of God bestowed upon doctors in compensation for their destitution of conscience. ** FORK FORK, n. An instrument used chiefly for the purpose of putting dead animals into the mouth. Formerly the knife was employed for this purpose, and by many worthy persons is still thought to have many advantages over the other tool, which, however, they do not altogether reject, but use to assist in charging the knife. The immunity of these persons from swift and awful death is one of the most striking proofs of God's mercy to those that hate Him. ** FORMA FORMA :PAUPERIS:. [Latin] In the character of a poor person -- a method by which a litigant without money for lawyers is considerately permitted to lose his case. When Adam long ago in Cupid's awful court (For Cupid ruled ere Adam was invented) Sued for Eve's favor, says an ancient law report, He stood and pleaded unhabilimented. "You sue _in forma pauperis_, I see," Eve cried; "Actions can't here be that way prosecuted." So all poor Adam's motions coldly were denied: He went away -- as he had come -- nonsuited. G.J. ** FRANKALMOIGNE FRANKALMOIGNE, n. The tenure by which a religious corporation holds lands on condition of praying for the soul of the donor. In mediaeval times many of the wealthiest fraternities obtained their estates in this simple and cheap manner, and once when Henry VIII of England sent an officer to confiscate certain vast possessions which a fraternity of monks held by frankalmoigne, "What!" said the Prior, "would you master stay our benefactor's soul in Purgatory?" "Ay," said the officer, coldly, "an ye will not pray him thence for naught he must e'en roast." "But look you, my son," persisted the good man, "this act hath rank as robbery of God!" "Nay, nay, good father, my master the king doth but deliver him from the manifold temptations of too great wealth." ** FREEBOOTER FREEBOOTER, n. A conqueror in a small way of business, whose annexations lack of the sanctifying merit of magnitude. ** FREEDOM FREEDOM, n. Exemption from the stress of authority in a beggarly half dozen of restraint's infinite multitude of methods. A political condition that every nation supposes itself to enjoy in virtual monopoly. Liberty. The distinction between freedom and liberty is not accurately known; naturalists have never been able to find a living specimen of either. Freedom, as every schoolboy knows, Once shrieked as Kosciusko fell; On every wind, indeed, that blows I hear her yell. She screams whenever monarchs meet, And parliaments as well, To bind the chains about her feet And toll her knell. And when the sovereign people cast The votes they cannot spell, Upon the pestilential blast Her clamors swell. For all to whom the power's given To sway or to compel, Among themselves apportion Heaven And give her Hell. Blary O'Gary ** FREEMASONS FREEMASONS, n. An order with secret rites, grotesque ceremonies and fantastic costumes, which, originating in the reign of Charles II, among working artisans of London, has been joined successively by the dead of past centuries in unbroken retrogression until now it embraces all the generations of man on the hither side of Adam and is drumming up distinguished recruits among the pre-Creational inhabitants of Chaos and Formless Void. The order was founded at different times by Charlemagne, Julius Caesar, Cyrus, Solomon, Zoroaster, Confucious, Thothmes, and Buddha. Its emblems and symbols have been found in the Catacombs of Paris and Rome, on the stones of the Parthenon and the Chinese Great Wall, among the temples of Karnak and Palmyra and in the Egyptian Pyramids -- always by a Freemason. ** FRIENDLESS FRIENDLESS, adj. Having no favors to bestow. Destitute of fortune. Addicted to utterance of truth and common sense. ** FRIENDSHIP FRIENDSHIP, n. A ship big enough to carry two in fair weather, but only one in foul. The sea was calm and the sky was blue; Merrily, merrily sailed we two. (High barometer maketh glad.) On the tipsy ship, with a dreadful shout, The tempest descended and we fell out. (O the walking is nasty bad!) Armit Huff Bettle ** FROG FROG, n. A reptile with edible legs. The first mention of frogs in profane literature is in Homer's narrative of the war between them and the mice. Skeptical persons have doubted Homer's authorship of the work, but the learned, ingenious and industrious Dr. Schliemann has set the question forever at rest by uncovering the bones of the slain frogs. One of the forms of moral suasion by which Pharaoh was besought to favor the Israelities was a plague of frogs, but Pharaoh, who liked them _fricasees_, remarked, with truly oriental stoicism, that he could stand it as long as the frogs and the Jews could; so the programme was changed. The frog is a diligent songster, having a good voice but no ear. The libretto of his favorite opera, as written by Aristophanes, is brief, simple and effective -- "brekekex-koax"; the music is apparently by that eminent composer, Richard Wagner. Horses have a frog in each hoof -- a thoughtful provision of nature, enabling them to shine in a hurdle race. ** FRYING-PAN FRYING-PAN, n. One part of the penal apparatus employed in that punitive institution, a woman's kitchen. The frying-pan was invented by Calvin, and by him used in cooking span-long infants that had died without baptism; and observing one day the horrible torment of a tramp who had incautiously pulled a fried babe from the waste-dump and devoured it, it occurred to the great divine to rob death of its terrors by introducing the frying-pan into every household in Geneva. Thence it spread to all corners of the world, and has been of invaluable assistance in the propagation of his sombre faith. The following lines (said to be from the pen of his Grace Bishop Potter) seem to imply that the usefulness of this utensil is not limited to this world; but as the consequences of its employment in this life reach over into the life to come, so also itself may be found on the other side, rewarding its devotees: Old Nick was summoned to the skies. Said Peter: "Your intentions Are good, but you lack enterprise Concerning new inventions. "Now, broiling in an ancient plan Of torment, but I hear it Reported that the frying-pan Sears best the wicked spirit. "Go get one -- fill it up with fat -- Fry sinners brown and good in't." "I know a trick worth two o' that," Said Nick -- "I'll cook their food in't." ** FUNERAL FUNERAL, n. A pageant whereby we attest our respect for the dead by enriching the undertaker, and strengthen our grief by an expenditure that deepens our groans and doubles our tears. The savage dies -- they sacrifice a horse To bear to happy hunting-grounds the corse. Our friends expire -- we make the money fly In hope their souls will chase it to the sky. Jex Wopley ** FUTURE FUTURE, n. That period of time in which our affairs prosper, our friends are true and our happiness is assured. G ** GALLOWS GALLOWS, n. A stage for the performance of miracle plays, in which the leading actor is translated to heaven. In this country the gallows is chiefly remarkable for the number of persons who escape it. Whether on the gallows high Or where blood flows the reddest, The noblest place for man to die -- Is where he died the deadest. (Old play) ** GARGOYLE GARGOYLE, n. A rain-spout projecting from the eaves of mediaeval buildings, commonly fashioned into a grotesque caricature of some personal enemy of the architect or owner of the building. This was especially the case in churches and ecclesiastical structures generally, in which the gargoyles presented a perfect rogues' gallery of local heretics and controversialists. Sometimes when a new dean and chapter were installed the old gargoyles were removed and others substituted having a closer relation to the private animosities of the new incumbents. ** GARTHER GARTHER, n. An elastic band intended to keep a woman from coming out of her stockings and desolating the country. ** GENEROUS GENEROUS, adj. Originally this word meant noble by birth and was rightly applied to a great multitude of persons. It now means noble by nature and is taking a bit of a rest. ** GENEALOGY GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own. ** GENTEEL GENTEEL, adj. Refined, after the fashion of a gent. Observe with care, my son, the distinction I reveal: A gentleman is gentle and a gent genteel. Heed not the definitions your "Unabridged" presents, For dictionary makers are generally gents. G.J. ** GEOGRAPHER GEOGRAPHER, n. A chap who can tell you offhand the difference between the outside of the world and the inside. Habeam, geographer of wide reknown, Native of Abu-Keber's ancient town, In passing thence along the river Zam To the adjacent village of Xelam, Bewildered by the multitude of roads, Got lost, lived long on migratory toads, Then from exposure miserably died, And grateful travelers bewailed their guide. Henry Haukhorn ** GEOLOGY GEOLOGY, n. The science of the earth's crust -- to which, doubtless, will be added that of its interior whenever a man shall come up garrulous out of a well. The geological formations of the globe already noted are catalogued thus: The Primary, or lower one, consists of rocks, bones or mired mules, gas-pipes, miners' tools, antique statues minus the nose, Spanish doubloons and ancestors. The Secondary is largely made up of red worms and moles. The Tertiary comprises railway tracks, patent pavements, grass, snakes, mouldy boots, beer bottles, tomato cans, intoxicated citizens, garbage, anarchists, snap-dogs and fools. ** GHOST GHOST, n. The outward and visible sign of an inward fear. He saw a ghost. It occupied -- that dismal thing! -- The path that he was following. Before he'd time to stop and fly, An earthquake trifled with the eye That saw a ghost. He fell as fall the early good; Unmoved that awful vision stood. The stars that danced before his ken He wildly brushed away, and then He saw a post. Jared Macphester Accounting for the uncommon behavior of ghosts, Heine mentions somebody's ingenious theory to the effect that they are as much afraid of us as we of them. Not quite, if I may judge from such tables of comparative speed as I am able to compile from memories of my own experience. There is one insuperable obstacle to a belief in ghosts. A ghost never comes naked: he appears either in a winding-sheet or "in his habit as he lived." To believe in him, then, is to believe that not only have the dead the power to make themselves visible after there is nothing left of them, but that the same power inheres in textile fabrics. Supposing the products of the loom to have this ability, what object would they have in exercising it? And why does not the apparition of a suit of clothes sometimes walk abroad without a ghost in it? These be riddles of significance. They reach away down and get a convulsive grip on the very tap-root of this flourishing faith. ** GHOUL GHOUL, n. A demon addicted to the reprehensible habit of devouring the dead. The existence of ghouls has been disputed by that class of controversialists who are more concerned to deprive the world of comforting beliefs than to give it anything good in their place. In 1640 Father Secchi saw one in a cemetery near Florence and frightened it away with the sign of the cross. He describes it as gifted with many heads an an uncommon allowance of limbs, and he saw it in more than one place at a time. The good man was coming away from dinner at the time and explains that if he had not been "heavy with eating" he would have seized the demon at all hazards. Atholston relates that a ghoul was caught by some sturdy peasants in a churchyard at Sudbury and ducked in a horsepond. (He appears to think that so distinguished a criminal should have been ducked in a tank of rosewater.) The water turned at once to blood "and so contynues unto ys daye." The pond has since been bled with a ditch. As late as the beginning of the fourteenth century a ghoul was cornered in the crypt of the cathedral at Amiens and the whole population surrounded the place. Twenty armed men with a priest at their head, bearing a crucifix, entered and captured the ghoul, which, thinking to escape by the stratagem, had transformed itself to the semblance of a well known citizen, but was nevertheless hanged, drawn and quartered in the midst of hideous popular orgies. The citizen whose shape the demon had assumed was so affected by the sinister occurrence that he never again showed himself in Amiens and his fate remains a mystery. ** GLUTTON GLUTTON, n. A person who escapes the evils of moderation by committing dyspepsia. ** GNOME GNOME, n. In North-European mythology, a dwarfish imp inhabiting the interior parts of the earth and having special custody of mineral treasures. Bjorsen, who died in 1765, says gnomes were common enough in the southern parts of Sweden in his boyhood, and he frequently saw them scampering on the hills in the evening twilight. Ludwig Binkerhoof saw three as recently as 1792, in the Black Forest, and Sneddeker avers that in 1803 they drove a party of miners out of a Silesian mine. Basing our computations upon data supplied by these statements, we find that the gnomes were probably extinct as early as 1764. ** GNOSTICS GNOSTICS, n. A sect of philosophers who tried to engineer a fusion between the early Christians and the Platonists. The former would not go into the caucus and the combination failed, greatly to the chagrin of the fusion managers. ** GNU GNU, n. An animal of South Africa, which in its domesticated state resembles a horse, a buffalo and a stag. In its wild condition it is something like a thunderbolt, an earthquake and a cyclone. A hunter from Kew caught a distant view Of a peacefully meditative gnu, And he said: "I'll pursue, and my hands imbrue In its blood at a closer interview." But that beast did ensue and the hunter it threw O'er the top of a palm that adjacent grew; And he said as he flew: "It is well I withdrew Ere, losing my temper, I wickedly slew That really meritorious gnu." Jarn Leffer ** GOOD GOOD, adj. Sensible, madam, to the worth of this present writer. Alive, sir, to the advantages of letting him alone. ** GOOSE GOOSE, n. A bird that supplies quills for writing. These, by some occult process of nature, are penetrated and suffused with various degrees of the bird's intellectual energies and emotional character, so that when inked and drawn mechanically across paper by a person called an "author," there results a very fair and accurate transcript of the fowl's thought and feeling. The difference in geese, as discovered by this ingenious method, is considerable: many are found to have only trivial and insignificant powers, but some are seen to be very great geese indeed. ** GORGON GORGON, n. The Gorgon was a maiden bold Who turned to stone the Greeks of old That looked upon her awful brow. We dig them out of ruins now, And swear that workmanship so bad Proves all the ancient sculptors mad. ** GOUT GOUT, n. A physician's name for the rheumatism of a rich patient. ** GRACES GRACES, n. Three beautiful goddesses, Aglaia, Thalia and Euphrosyne, who attended upon Venus, serving without salary. They were at no expense for board and clothing, for they ate nothing to speak of and dressed according to the weather, wearing whatever breeze happened to be blowing. ** GRAMMAR GRAMMAR, n. A system of pitfalls thoughtfully prepared for the feet for the self-made man, along the path by which he advances to distinction. ** GRAPE GRAPE, n. Hail noble fruit! -- by Homer sung, Anacreon and Khayyam; Thy praise is ever on the tongue Of better men than I am. The lyre in my hand has never swept, The song I cannot offer: My humbler service pray accept -- I'll help to kill the scoffer. The water-drinkers and the cranks Who load their skins with liquor -- I'll gladly bear their belly-tanks And tap them with my sticker. Fill up, fill up, for wisdom cools When e'er we let the wine rest. Here's death to Prohibition's fools, And every kind of vine-pest! Jamrach Holobom ** GRAPESHOT GRAPESHOT, n. An argument which the future is preparing in answer to the demands of American Socialism. ** GRAVE GRAVE, n. A place in which the dead are laid to await the coming of the medical student. Beside a lonely grave I stood -- With brambles 'twas encumbered; The winds were moaning in the wood, Unheard by him who slumbered, A rustic standing near, I said: "He cannot hear it blowing!" "'Course not," said he: "the feller's dead -- He can't hear nowt [sic] that's going." "Too true," I said; "alas, too true -- No sound his sense can quicken!" "Well, mister, wot is that to you? -- The deadster ain't a-kickin'." I knelt and prayed: "O Father, smile On him, and mercy show him!" That countryman looked on the while, And said: "Ye didn't know him." Pobeter Dunko ** GRAVITATION GRAVITATION, n. The tendency of all bodies to approach one another with a strength proportion to the quantity of matter they contain -- the quantity of matter they contain being ascertained by the strength of their tendency to approach one another. This is a lovely and edifying illustration of how science, having made A the proof of B, makes B the proof of A. ** GREAT GREAT, adj. "I'm great," the Lion said -- "I reign The monarch of the wood and plain!" The Elephant replied: "I'm great -- No quadruped can match my weight!" "I'm great -- no animal has half So long a neck!" said the Giraffe. "I'm great," the Kangaroo said -- "see My femoral muscularity!" The 'Possum said: "I'm great -- behold, My tail is lithe and bald and cold!" An Oyster fried was understood To say: "I'm great because I'm good!" Each reckons greatness to consist In that in which he heads the list, And Vierick thinks he tops his class Because he is the greatest ass. Arion Spurl Doke ** GUILLOTINE GUILLOTINE, n. A machine which makes a Frenchman shrug his shoulders with good reason. In his great work on _Divergent Lines of Racial Evolution_, the learned Professor Brayfugle argues from the prevalence of this gesture -- the shrug -- among Frenchmen, that they are descended from turtles and it is simply a survival of the habit of retracing the head inside the shell. It is with reluctance that I differ with so eminent an authority, but in my judgment (as more elaborately set forth and enforced in my work entitled _Hereditary Emotions_ -- lib. II, c. XI) the shrug is a poor foundation upon which to build so important a theory, for previously to the Revolution the gesture was unknown. I have not a doubt that it is directly referable to the terror inspired by the guillotine during the period of that instrument's activity. ** GUNPOWDER GUNPOWDER, n. An agency employed by civilized nations for the settlement of disputes which might become troublesome if left unadjusted. By most writers the invention of gunpowder is ascribed to the Chinese, but not upon very convincing evidence. Milton says it was invented by the devil to dispel angels with, and this opinion seems to derive some support from the scarcity of angels. Moreover, it has the hearty concurrence of the Hon. James Wilson, Secretary of Agriculture. Secretary Wilson became interested in gunpowder through an event that occurred on the Government experimental farm in the District of Columbia. One day, several years ago, a rogue imperfectly reverent of the Secretary's profound attainments and personal character presented him with a sack of gunpowder, representing it as the sed of the _Flashawful flabbergastor_, a Patagonian cereal of great commercial value, admirably adapted to this climate. The good Secretary was instructed to spill it along in a furrow and afterward inhume it with soil. This he at once proceeded to do, and had made a continuous line of it all the way across a ten-acre field, when he was made to look backward by a shout from the generous donor, who at once dropped a lighted match into the furrow at the starting-point. Contact with the earth had somewhat dampened the powder, but the startled functionary saw himself pursued by a tall moving pillar of fire and smoke and fierce evolution. He stood for a moment paralyzed and speechless, then he recollected an engagement and, dropping all, absented himself thence with such surprising celerity that to the eyes of spectators along the route selected he appeared like a long, dim streak prolonging itself with inconceivable rapidity through seven villages, and audibly refusing to be comforted. "Great Scott! what is that?" cried a surveyor's chainman, shading his eyes and gazing at the fading line of agriculturist which bisected his visible horizon. "That," said the surveyor, carelessly glancing at the phenomenon and again centering his attention upon his instrument, "is the Meridian of Washington." H ** HABEAS HABEAS :CORPUS:. A writ by which a man may be taken out of jail when confined for the wrong crime. ** HABIT HABIT, n. A shackle for the free. ** HADES HADES, n. The lower world; the residence of departed spirits; the place where the dead live. Among the ancients the idea of Hades was not synonymous with our Hell, many of the most respectable men of antiquity residing there in a very comfortable kind of way. Indeed, the Elysian Fields themselves were a part of Hades, though they have since been removed to Paris. When the Jacobean version of the New Testament was in process of evolution the pious and learned men engaged in the work insisted by a majority vote on translating the Greek word "Aides" as "Hell"; but a conscientious minority member secretly possessed himself of the record and struck out the objectional word wherever he could find it. At the next meeting, the Bishop of Salisbury, looking over the work, suddenly sprang to his feet and said with considerable excitement: "Gentlemen, somebody has been razing 'Hell' here!" Years afterward the good prelate's death was made sweet by the reflection that he had been the means (under Providence) of making an important, serviceable and immortal addition to the phraseology of the English tongue. ** HAG HAG, n. An elderly lady whom you do not happen to like; sometimes called, also, a hen, or cat. Old witches, sorceresses, etc., were called hags from the belief that their heads were surrounded by a kind of baleful lumination or nimbus -- hag being the popular name of that peculiar electrical light sometimes observed in the hair. At one time hag was not a word of reproach: Drayton speaks of a "beautiful hag, all smiles," much as Shakespeare said, "sweet wench." It would not now be proper to call your sweetheart a hag -- that compliment is reserved for the use of her grandchildren. ** HALF HALF, n. One of two equal parts into which a thing may be divided, or considered as divided. In the fourteenth century a heated discussion arose among theologists and philosophers as to whether Omniscience could part an object into three halves; and the pious Father Aldrovinus publicly prayed in the cathedral at Rouen that God would demonstrate the affirmative of the proposition in some signal and unmistakable way, and particularly (if it should please Him) upon the body of that hardy blasphemer, Manutius Procinus, who maintained the negative. Procinus, however, was spared to die of the bite of a viper. ** HALO HALO, n. Properly, a luminous ring encircling an astronomical body, but not infrequently confounded with "aureola," or "nimbus," a somewhat similar phenomenon worn as a head-dress by divinities and saints. The halo is a purely optical illusion, produced by moisture in the air, in the manner of a rainbow; but the aureola is conferred as a sign of superior sanctity, in the same way as a bishop's mitre, or the Pope's tiara. In the painting of the Nativity, by Szedgkin, a pious artist of Pesth, not only do the Virgin and the Child wear the nimbus, but an ass nibbling hay from the sacred manger is similarly decorated and, to his lasting honor be it said, appears to bear his unaccustomed dignity with a truly saintly grace. ** HAND HAND, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody's pocket. ** HANDKERCHIEF HANDKERCHIEF, n. A small square of silk or linen, used in various ignoble offices about the face and especially serviceable at funerals to conceal the lack of tears. The handkerchief is of recent invention; our ancestors knew nothing of it and intrusted its duties to the sleeve. Shakespeare's introducing it into the play of "Othello" is an anachronism: Desdemona dried her nose with her skirt, as Dr. Mary Walker and other reformers have done with their coattails in our own day -- an evidence that revolutions sometimes go backward. ** HANGMAN HANGMAN, n. An officer of the law charged with duties of the highest dignity and utmost gravity, and held in hereditary disesteem by a populace having a criminal ancestry. In some of the American States his functions are now performed by an electrician, as in New Jersey, where executions by electricity have recently been ordered -- the first instance known to this lexicographer of anybody questioning the expediency of hanging Jerseymen. ** HAPPINESS HAPPINESS, n. An agreeable sensation arising from contemplating the misery of another. ** HARANGUE HARANGUE, n. A speech by an opponent, who is known as an harrangue- outang. ** HARBOR HARBOR, n. A place where ships taking shelter from stores are exposed to the fury of the customs. ** HARMONISTS HARMONISTS, n. A sect of Protestants, now extinct, who came from Europe in the beginning of the last century and were distinguished for the bitterness of their internal controversies and dissensions. ** HASH HASH, x. There is no definition for this word -- nobody knows what hash is. ** HATCHET HATCHET, n. A young axe, known among Indians as a Thomashawk. "O bury the hatchet, irascible Red, For peace is a blessing," the White Man said. The Savage concurred, and that weapon interred, With imposing rites, in the White Man's head. John Lukkus ** HATRED HATRED, n. A sentiment appropriate to the occasion of another's superiority. ** HEAD-MONEY HEAD-MONEY, n. A capitation tax, or poll-tax. In ancient times there lived a king Whose tax-collectors could not wring From all his subjects gold enough To make the royal way less rough. For pleasure's highway, like the dames Whose premises adjoin it, claims Perpetual repairing. So The tax-collectors in a row Appeared before the throne to pray Their master to devise some way To swell the revenue. "So great," Said they, "are the demands of state A tithe of all that we collect Will scarcely meet them. Pray reflect: How, if one-tenth we must resign, Can we exist on t'other nine?" The monarch asked them in reply: "Has it occurred to you to try The advantage of economy?" "It has," the spokesman said: "we sold All of our gray garrotes of gold; With plated-ware we now compress The necks of those whom we assess. Plain iron forceps we employ To mitigate the miser's joy Who hoards, with greed that never tires, That which your Majesty requires." Deep lines of thought were seen to plow Their way across the royal brow. "Your state is desperate, no question; Pray favor me with a suggestion." "O King of Men," the spokesman said, "If you'll impose upon each head A tax, the augmented revenue We'll cheerfully divide with you." As flashes of the sun illume The parted storm-cloud's sullen gloom, The king smiled grimly. "I decree That it be so -- and, not to be In generosity outdone, Declare you, each and every one, Exempted from the operation Of this new law of capitation. But lest the people censure me Because they're bound and you are free, 'Twere well some clever scheme were laid By you this poll-tax to evade. I'll leave you now while you confer With my most trusted minister." The monarch from the throne-room walked And straightway in among them stalked A silent man, with brow concealed, Bare-armed -- his gleaming axe revealed! G.J. ** HEARSE HEARSE, n. Death's baby-carriage. ** HEART HEART, n. An automatic, muscular blood-pump. Figuratively, this useful organ is said to be the esat of emotions and sentiments -- a very pretty fancy which, however, is nothing but a survival of a once universal belief. It is now known that the sentiments and emotions reside in the stomach, being evolved from food by chemical action of the gastric fluid. The exact process by which a beefsteak becomes a feeling -- tender or not, according to the age of the animal from which it was cut; the successive stages of elaboration through which a caviar sandwich is transmuted to a quaint fancy and reappears as a pungent epigram; the marvelous functional methods of converting a hard-boiled egg into religious contrition, or a cream-puff into a sigh of sensibility -- these things have been patiently ascertained by M. Pasteur, and by him expounded with convincing lucidity. (See, also, my monograph, _The Essential Identity of the Spiritual Affections and Certain Intestinal Gases Freed in Digestion_ -- 4to, 687 pp.) In a scientific work entitled, I believe, _Delectatio Demonorum_ (John Camden Hotton, London, 1873) this view of the sentiments receives a striking illustration; and for further light consult Professor Dam's famous treatise on _Love as a Product of Alimentary Maceration_. ** HEAT HEAT, n. Heat, says Professor Tyndall, is a mode Of motion, but I know now how he's proving His point; but this I know -- hot words bestowed With skill will set the human fist a-moving, And where it stops the stars burn free and wild. _Crede expertum_ -- I have seen them, child. Gorton Swope ** HEATHEN HEATHEN, n. A benighted creature who has the folly to worship something that he can see and feel. According to Professor Howison, of the California State University, Hebrews are heathens. "The Hebrews are heathens!" says Howison. He's A Christian philosopher. I'm A scurril agnostical chap, if you please, Addicted too much to the crime Of religious discussion in my rhyme. Though Hebrew and Howison cannot agree On a _modus vivendi_ -- not they! -- Yet Heaven has had the designing of me, And I haven't been reared in a way To joy in the thick of the fray. For this of my creed is the soul and the gist, And the truth of it I aver: Who differs from me in his faith is an 'ist, And 'ite, an 'ie, or an 'er -- And I'm down upon him or her! Let Howison urge with perfunctory chin Toleration -- that's all very well, But a roast is "nuts" to his nostril thin, And he's running -- I know by the smell -- A secret and personal Hell! Bissell Gip ** HEAVEN HEAVEN, n. A place where the wicked cease from troubling you with talk of their personal affairs, and the good listen with attention while you expound your own. ** HEBREW HEBREW, n. A male Jew, as distinguished from the Shebrew, an altogether superior creation. ** HELPMATE HELPMATE, n. A wife, or bitter half. "Now, why is yer wife called a helpmate, Pat?" Says the priest. "Since the time 'o yer wooin' She's niver [sic] assisted in what ye were at -- For it's naught ye are ever doin'." "That's true of yer Riverence [sic]," Patrick replies, And no sign of contrition envices; "But, bedad, it's a fact which the word implies, For she helps to mate the expinses [sic]!" Marley Wottel ** HEMP HEMP, n. A plant from whose fibrous bark is made an article of neckwear which is frequently put on after public speaking in the open air and prevents the wearer from taking cold. ** HERMIT HERMIT, n. A person whose vices and follies are not sociable. ** HERS HERS, pron. His. ** HIBERNATE HIBERNATE, v.i. To pass the winter season in domestic seclusion. There have been many singular popular notions about the hibernation of various animals. Many believe that the bear hibernates during the whole winter and subsists by mechanically sucking its paws. It is admitted that it comes out of its retirement in the spring so lean that it had to try twice before it can cast a shadow. Three or four centuries ago, in England, no fact was better attested than that swallows passed the winter months in the mud at the bottom of their brooks, clinging together in globular masses. They have apparently been compelled to give up the custom and account of the foulness of the brooks. Sotus Ecobius discovered in Central Asia a whole nation of people who hibernate. By some investigators, the fasting of Lent is supposed to have been originally a modified form of hibernation, to which the Church gave a religious significance; but this view was strenuously opposed by that eminent authority, Bishop Kip, who did not wish any honors denied to the memory of the Founder of his family. ** HIPPOGRIFF HIPPOGRIFF, n. An animal (now extinct) which was half horse and half griffin. The griffin was itself a compound creature, half lion and half eagle. The hippogriff was actually, therefore, a one-quarter eagle, which is two dollars and fifty cents in gold. The study of zoology is full of surprises. ** HISTORIAN HISTORIAN, n. A broad-gauge gossip. ** HISTORY HISTORY, n. An account mostly false, of events mostly unimportant, which are brought about by rulers mostly knaves, and soldiers mostly fools. Of Roman history, great Niebuhr's shown 'Tis nine-tenths lying. Faith, I wish 'twere known, Ere we accept great Niebuhr as a guide, Wherein he blundered and how much he lied. Salder Bupp ** HOG HOG, n. A bird remarkable for the catholicity of its appetite and serving to illustrate that of ours. Among the Mahometans and Jews, the hog is not in favor as an article of diet, but is respected for the delicacy and the melody of its voice. It is chiefly as a songster that the fowl is esteemed; the cage of him in full chorus has been known to draw tears from two persons at once. The scientific name of this dicky-bird is _Porcus Rockefelleri_. Mr. Rockefeller did not discover the hog, but it is considered his by right of resemblance. ** HOMOEOPATHIST HOMOEOPATHIST, n. The humorist of the medical profession. ** HOMOEOPATHY HOMOEOPATHY, n. A school of medicine midway between Allopathy and Christian Science. To the last both the others are distinctly inferior, for Christian Science will cure imaginary diseases, and they can not. ** HOMICIDE HOMICIDE, n. The slaying of one human being by another. There are four kinds of homocide: felonious, excusable, justifiable, and praiseworthy, but it makes no great difference to the person slain whether he fell by one kind or another -- the classification is for advantage of the lawyers. ** HOMILETICS HOMILETICS, n. The science of adapting sermons to the spiritual needs, capacities and conditions of the congregation. So skilled the parson was in homiletics That all his normal purges and emetics To medicine the spirit were compounded With a most just discrimination founded Upon a rigorous examination Of tongue and pulse and heart and respiration. Then, having diagnosed each one's condition, His scriptural specifics this physician Administered -- his pills so efficacious And pukes of disposition so vivacious That souls afflicted with ten kinds of Adam Were convalescent ere they knew they had 'em. But Slander's tongue -- itself all coated -- uttered Her bilious mind and scandalously muttered That in the case of patients having money The pills were sugar and the pukes were honey. _Biography of Bishop Potter_ ** HONORABLE HONORABLE, adj. Afflicted with an impediment in one's reach. In legislative bodies it is customary to mention all members as honorable; as, "the honorable gentleman is a scurvy cur." ** HOPE HOPE, n. Desire and expectation rolled into one. Delicious Hope! when naught to man it left -- Of fortune destitute, of friends bereft; When even his dog deserts him, and his goat With tranquil disaffection chews his coat While yet it hangs upon his back; then thou, The star far-flaming on thine angel brow, Descendest, radiant, from the skies to hint The promise of a clerkship in the Mint. Fogarty Weffing ** HOSPITALITY HOSPITALITY, n. The virtue which induces us to feed and lodge certain persons who are not in need of food and lodging. ** HOSTILITY HOSTILITY, n. A peculiarly sharp and specially applied sense of the earth's overpopulation. Hostility is classified as active and passive; as (respectively) the feeling of a woman for her female friends, and that which she entertains for all the rest of her sex. ** HOURI HOURI, n. A comely female inhabiting the Mohammedan Paradise to make things cheery for the good Mussulman, whose belief in her existence marks a noble discontent with his earthly spouse, whom he denies a soul. By that good lady the Houris are said to be held in deficient esteem. ** HOUSE HOUSE, n. A hollow edifice erected for the habitation of man, rat, mouse, beelte, cockroach, fly, mosquito, flea, bacillus and microbe. _House of Correction_, a place of reward for political and personal service, and for the detention of offenders and appropriations. _House of God_, a building with a steeple and a mortgage on it. _House-dog_, a pestilent beast kept on domestic premises to insult persons passing by and appal the hardy visitor. _House-maid_, a youngerly person of the opposing sex employed to be variously disagreeable and ingeniously unclean in the station in which it has pleased God to place her. ** HOUSELESS HOUSELESS, adj. Having paid all taxes on household goods. ** HOVEL HOVEL, n. The fruit of a flower called the Palace. Twaddle had a hovel, Twiddle had a palace; Twaddle said: "I'll grovel Or he'll think I bear him malice" -- A sentiment as novel As a castor on a chalice. Down upon the middle Of his legs fell Twaddle And astonished Mr. Twiddle, Who began to lift his noddle. Feed upon the fiddle- Faddle flummery, unswaddle A new-born self-sufficiency and think himself a [mockery.] G.J. ** HUMANITY HUMANITY, n. The human race, collectively, exclusive of the anthropoid poets. ** HUMORIST HUMORIST, n. A plague that would have softened down the hoar austerity of Pharaoh's heart and persuaded him to dismiss Israel with his best wishes, cat-quick. Lo! the poor humorist, whose tortured mind See jokes in crowds, though still to gloom inclined -- Whose simple appetite, untaught to stray, His brains, renewed by night, consumes by day. He thinks, admitted to an equal sty, A graceful hog would bear his company. Alexander Poke ** HURRICANE HURRICANE, n. An atmospheric demonstration once very common but now generally abandoned for the tornado and cyclone. The hurricane is still in popular use in the West Indies and is preferred by certain old-fashioned sea-captains. It is also used in the construction of the upper decks of steamboats, but generally speaking, the hurricane's usefulness has outlasted it. ** HURRY HURRY, n. The dispatch of bunglers. ** HUSBAND HUSBAND, n. One who, having dined, is charged with the care of the plate. ** HYBRID HYBRID, n. A pooled issue. ** HYDRA HYDRA, n. A kind of animal that the ancients catalogued under many heads. ** HYENA HYENA, n. A beast held in reverence by some oriental nations from its habit of frequenting at night the burial-places of the dead. But the medical student does that. ** HYPOCHONDRIASIS HYPOCHONDRIASIS, n. Depression of one's own spirits. Some heaps of trash upon a vacant lot Where long the village rubbish had been shot Displayed a sign among the stuff and stumps -- "Hypochondriasis." It meant The Dumps. Bogul S. Purvy ** HYPOCRITE HYPOCRITE, n. One who, profession virtues that he does not respect secures the advantage of seeming to be what he depises. I ** I I is the first letter of the alphabet, the first word of the language, the first thought of the mind, the first object of affection. In grammar it is a pronoun of the first person and singular number. Its plural is said to be _We_, but how there can be more than one myself is doubtless clearer the grammarians than it is to the author of this incomparable dictionary. Conception of two myselfs is difficult, but fine. The frank yet graceful use of "I" distinguishes a good writer from a bad; the latter carries it with the manner of a thief trying to cloak his loot. ** ICHOR ICHOR, n. A fluid that serves the gods and goddesses in place of blood. Fair Venus, speared by Diomed, Restrained the raging chief and said: "Behold, rash mortal, whom you've bled -- Your soul's stained white with ichorshed!" Mary Doke ** ICONOCLAST ICONOCLAST, n. A breaker of idols, the worshipers whereof are imperfectly gratified by the performance, and most strenuously protest that he unbuildeth but doth not reedify, that he pulleth down but pileth not up. For the poor things would have other idols in place of those he thwacketh upon the mazzard and dispelleth. But the iconoclast saith: "Ye shall have none at all, for ye need them not; and if the rebuilder fooleth round hereabout, behold I will depress the head of him and sit thereon till he squawk it." ** IDIOT IDIOT, n. A member of a large and powerful tribe whose influence in human affairs has always been dominant and controlling. The Idiot's activity is not confined to any special field of thought or action, but "pervades and regulates the whole." He has the last word in everything; his decision is unappealable. He sets the fashions and opinion of taste, dictates the limitations of speech and circumscribes conduct with a dead-line. ** IDLENESS IDLENESS, n. A model farm where the devil experiments with seeds of new sins and promotes the growth of staple vices. ** IGNORAMUS IGNORAMUS, n. A person unacquainted with certain kinds of knowledge familiar to yourself, and having certain other kinds that you know nothing about. Dumble was an ignoramus, Mumble was for learning famous. Mumble said one day to Dumble: "Ignorance should be more humble. Not a spark have you of knowledge That was got in any college." Dumble said to Mumble: "Truly You're self-satisfied unduly. Of things in college I'm denied A knowledge -- you of all beside." Borelli ** ILLUMINATI ILLUMINATI, n. A sect of Spanish heretics of the latter part of the sixteenth century; so called because they were light weights -- _cunctationes illuminati_. ** ILLUSTRIOUS ILLUSTRIOUS, adj. Suitably placed for the shafts of malice, envy and detraction. ** IMAGINATION IMAGINATION, n. A warehouse of facts, with poet and liar in joint ownership. ** IMBECILITY IMBECILITY, n. A kind of divine inspiration, or sacred fire affecting censorious critics of this dictionary. ** IMMIGRANT IMMIGRANT, n. An unenlightened person who thinks one country better than another. ** IMMODEST IMMODEST, adj. Having a strong sense of one's own merit, coupled with a feeble conception of worth in others. There was once a man in Ispahan Ever and ever so long ago, And he had a head, the phrenologists said, That fitted him for a show. For his modesty's bump was so large a lump (Nature, they said, had taken a freak) That its summit stood far above the wood Of his hair, like a mountain peak. So modest a man in all Ispahan, Over and over again they swore -- So humble and meek, you would vainly seek; None ever was found before. Meantime the hump of that awful bump Into the heavens contrived to get To so great a height that they called the wight The man with the minaret. There wasn't a man in all Ispahan Prouder, or louder in praise of his chump: With a tireless tongue and a brazen lung He bragged of that beautiful bump Till the Shah in a rage sent a trusty page Bearing a sack and a bow-string too, And that gentle child explained as he smiled: "A little present for you." The saddest man in all Ispahan, Sniffed at the gift, yet accepted the same. "If I'd lived," said he, "my humility Had given me deathless fame!" Sukker Uffro ** IMMORAL IMMORAL, adj. Inexpedient. Whatever in the long run and with regard to the greater number of instances men find to be generally inexpedient comes to be considered wrong, wicked, immoral. If man's notions of right and wrong have any other basis than this of expediency; if they originated, or could have originated, in any other way; if actions have in themselves a moral character apart from, and nowise dependent on, their consequences -- then all philosophy is a lie and reason a disorder of the mind. ** IMMORTALITY IMMORTALITY, n. A toy which people cry for, And on their knees apply for, Dispute, contend and lie for, And if allowed Would be right proud Eternally to die for. G.J. ** IMPALE IMPALE, v.t. In popular usage to pierce with any weapon which remains fixed in the wound. This, however, is inaccurate; to imaple is, properly, to put to death by thrusting an upright sharp stake into the body, the victim being left in a sitting position. This was a common mode of punishment among many of the nations of antiquity, and is still in high favor in China and other parts of Asia. Down to the beginning of the fifteenth century it was widely employed in "churching" heretics and schismatics. Wolecraft calls it the "stoole of repentynge," and among the common people it was jocularly known as "riding the one legged horse." Ludwig Salzmann informs us that in Thibet impalement is considered the most appropriate punishment for crimes against religion; and although in China it is sometimes awarded for secular offences, it is most frequently adjudged in cases of sacrilege. To the person in actual experience of impalement it must be a matter of minor importance by what kind of civil or religious dissent he was made acquainted with its discomforts; but doubtless he would feel a certain satisfaction if able to contemplate himself in the character of a weather-cock on the spire of the True Church. ** IMPARTIAL IMPARTIAL, adj. Unable to perceive any promise of personal advantage from espousing either side of a controversy or adopting either of two conflicting opinions. ** IMPENITENCE IMPENITENCE, n. A state of mind intermediate in point of time between sin and punishment. ** IMPIETY IMPIETY, n. Your irreverence toward my deity. ** IMPOSITION IMPOSITION, n. The act of blessing or consecrating by the laying on of hands -- a ceremony common to many ecclesiastical systems, but performed with the frankest sincerity by the sect known as Thieves. "Lo! by the laying on of hands," Say parson, priest and dervise, "We consecrate your cash and lands To ecclesiastical service. No doubt you'll swear till all is blue At such an imposition. Do." Pollo Doncas ** IMPOSTOR IMPOSTOR n. A rival aspirant to public honors. ** IMPROBABILITY IMPROBABILITY, n. His tale he told with a solemn face And a tender, melancholy grace. Improbable 'twas, no doubt, When you came to think it out, But the fascinated crowd Their deep surprise avowed And all with a single voice averred 'Twas the most amazing thing they'd heard -- All save one who spake never a word, But sat as mum As if deaf and dumb, Serene, indifferent and unstirred. Then all the others turned to him And scrutinized him limb from limb -- Scanned him alive; But he seemed to thrive And tranquiler grow each minute, As if there were nothing in it. "What! what!" cried one, "are you not amazed At what our friend has told?" He raised Soberly then his eyes and gazed In a natural way And proceeded to say, As he crossed his feet on the mantel-shelf: "O no -- not at all; I'm a liar myself." ** IMPROVIDENCE IMPROVIDENCE, n. Provision for the needs of to-day from the revenues of to-morrow. ** IMPUNITY IMPUNITY, n. Wealth. ** INADMISSIBLE INADMISSIBLE, adj. Not competent to be considered. Said of certain kinds of testimony which juries are supposed to be unfit to be entrusted with, and which judges, therefore, rule out, even of proceedings before themselves alone. Hearsay evidence is inadmissible because the person quoted was unsworn and is not before the court for examination; yet most momentous actions, military, political, commercial and of every other kind, are daily undertaken on hearsay evidence. There is no religion in the world that has any other basis than hearsay evidence. Revelation is hearsay evidence; that the Scriptures are the word of God we have only the testimony of men long dead whose identity is not clearly established and who are not known to have been sworn in any sense. Under the rules of evidence as they now exist in this country, no single assertion in the Bible has in its support any evidence admissible in a court of law. It cannot be proved that the battle of Blenheim ever was fought, that there was such as person as Julius Caesar, such an empire as Assyria. But as records of courts of justice are admissible, it can easily be proved that powerful and malevolent magicians once existed and were a scourge to mankind. The evidence (including confession) upon which certain women were convicted of witchcraft and executed was without a flaw; it is still unimpeachable. The judges' decisions based on it were sound in logic and in law. Nothing in any existing court was ever more thoroughly proved than the charges of witchcraft and sorcery for which so many suffered death. If there were no witches, human testimony and human reason are alike destitute of value. ** INAUSPICIOUSLY INAUSPICIOUSLY, adv. In an unpromising manner, the auspices being unfavorable. Among the Romans it was customary before undertaking any important action or enterprise to obtain from the augurs, or state prophets, some hint of its probable outcome; and one of their favorite and most trustworthy modes of divination consisted in observing the flight of birds -- the omens thence derived being called _auspices_. Newspaper reporters and certain miscreant lexicographers have decided that the word -- always in the plural -- shall mean "patronage" or "management"; as, "The festivities were under the auspices of the Ancient and Honorable Order of Body-Snatchers"; or, "The hilarities were auspicated by the Knights of Hunger." A Roman slave appeared one day Before the Augur. "Tell me, pray, If --" here the Augur, smiling, made A checking gesture and displayed His open palm, which plainly itched, For visibly its surface twitched. A _denarius_ (the Latin nickel) Successfully allayed the tickle, And then the slave proceeded: "Please Inform me whether Fate decrees Success or failure in what I To-night (if it be dark) shall try. Its nature? Never mind -- I think 'Tis writ on this" -- and with a wink Which darkened half the earth, he drew Another denarius to view, Its shining face attentive scanned, Then slipped it into the good man's hand, Who with great gravity said: "Wait While I retire to question Fate." That holy person then withdrew His scared clay and, passing through The temple's rearward gate, cried "Shoo!" Waving his robe of office. Straight Each sacred peacock and its mate (Maintained for Juno's favor) fled With clamor from the trees o'erhead, Where they were perching for the night. The temple's roof received their flight, For thither they would always go, When danger threatened them below. Back to the slave the Augur went: "My son, forecasting the event By flight of birds, I must confess The auspices deny success." That slave retired, a sadder man, Abandoning his secret plan -- Which was (as well the craft seer Had from the first divined) to clear The wall and fraudulently seize On Juno's poultry in the trees. G.J. ** INCOME INCOME, n. The natural and rational gauge and measure of respectability, the commonly accepted standards being artificial, arbitrary and fallacious; for, as "Sir Sycophas Chrysolater" in the play has justly remarked, "the true use and function of property (in whatsoever it consisteth -- coins, or land, or houses, or merchant- stuff, or anything which may be named as holden of right to one's own subservience) as also of honors, titles, preferments and place, and all favor and acquaintance of persons of quality or ableness, are but to get money. Hence it followeth that all things are truly to be rated as of worth in measure of their serviceableness to that end; and their possessors should take rank in agreement thereto, neither the lord of an unproducing manor, howsoever broad and ancient, nor he who bears an unremunerate dignity, nor yet the pauper favorite of a king, being esteemed of level excellency with him whose riches are of daily accretion; and hardly should they whose wealth is barren claim and rightly take more honor than the poor and unworthy." ** INCOMPATIBILITY INCOMPATIBILITY, n. In matrimony a similarity of tastes, particularly the taste for domination. Incompatibility may, however, consist of a meek-eyed matron living just around the corner. It has even been known to wear a moustache. ** INCOMPOSSIBLE INCOMPOSSIBLE, adj. Unable to exist if something else exists. Two things are incompossible when the world of being has scope enough for one of them, but not enough for both -- as Walt Whitman's poetry and God's mercy to man. Incompossibility, it will be seen, is only incompatibility let loose. Instead of such low language as "Go heel yourself -- I mean to kill you on sight," the words, "Sir, we are incompossible," would convey and equally significant intimation and in stately courtesy are altogether superior. ** INCUBUS INCUBUS, n. One of a race of highly improper demons who, though probably not wholly extinct, may be said to have seen their best nights. For a complete account of _incubi_ and _succubi_, including _incubae_ and _succubae_, see the _Liber Demonorum_ of Protassus (Paris, 1328), which contains much curious information that would be out of place in a dictionary intended as a text-book for the public schools. Victor Hugo relates that in the Channel Islands Satan himself -- tempted more than elsewhere by the beauty of the women, doubtless -- sometimes plays at _incubus_, greatly to the inconvenience and alarm of the good dames who wish to be loyal to their marriage vows, generally speaking. A certain lady applied to the parish priest to learn how they might, in the dark, distinguish the hardy intruder from their husbands. The holy man said they must feel his brown for horns; but Hugo is ungallant enough to hint a doubt of the efficacy of the test. ** INCUMBENT INCUMBENT, n. A person of the liveliest interest to the outcumbents. ** INDECISION INDECISION, n. The chief element of success; "for whereas," saith Sir Thomas Brewbold, "there is but one way to do nothing and divers way to do something, whereof, to a surety, only one is the right way, it followeth that he who from indecision standeth still hath not so many chances of going astray as he who pusheth forwards" -- a most clear and satisfactory exposition on the matter. "Your prompt decision to attack," said Genera Grant on a certain occasion to General Gordon Granger, "was admirable; you had but five minutes to make up your mind in." "Yes, sir," answered the victorious subordinate, "it is a great thing to be know exactly what to do in an emergency. When in doubt whether to attack or retreat I never hesitate a moment -- I toss us a copper." "Do you mean to say that's what you did this time?" "Yes, General; but for Heaven's sake don't reprimand me: I disobeyed the coin." ** INDIFFERENT INDIFFERENT, adj. Imperfectly sensible to distinctions among things. "You tiresome man!" cried Indolentio's wife, "You've grown indifferent to all in life." "Indifferent?" he drawled with a slow smile; "I would be, dear, but it is not worth while." Apuleius M. Gokul ** INDIGESTION INDIGESTION, n. A disease which the patient and his friends frequently mistake for deep religious conviction and concern for the salvation of mankind. As the simple Red Man of the western wild put it, with, it must be confessed, a certain force: "Plenty well, no pray; big bellyache, heap God." ** INDISCRETION INDISCRETION, n. The guilt of woman. ** INEXPEDIENT INEXPEDIENT, adj. Not calculated to advance one's interests. ** INFANCY INFANCY, n. The period of our lives when, according to Wordsworth, "Heaven lies about us." The world begins lying about us pretty soon afterward. ** INFERIAE INFERIAE,n. [Latin] Among the Greeks and Romans, sacrifices for propitation of the _Dii Manes_, or souls of the dead heroes; for the pious ancients could not invent enough gods to satisfy their spiritual needs, and had to have a number of makeshift deities, or, as a sailor might say, jury-gods, which they made out of the most unpromising materials. It was while sacrificing a bullock to the spirit of Agamemnon that Laiaides, a priest of Aulis, was favored with an audience of that illustrious warrior's shade, who prophetically recounted to him the birth of Christ and the triumph of Christianity, giving him also a rapid but tolerably complete review of events down to the reign of Saint Louis. The narrative ended abruptly at the point, owing to the inconsiderate crowing of a cock, which compelled the ghosted King of Men to scamper back to Hades. There is a fine mediaeval flavor to this story, and as it has not been traced back further than Pere Brateille, a pious but obscure writer at the court of Saint Louis, we shall probably not err on the side of presumption in considering it apocryphal, though Monsignor Capel's judgment of the matter might be different; and to that I bow -- wow. ** INFIDEL INFIDEL, n. In New York, one who does not believe in the Christian religion; in Constantinople, one who does. (See GIAOUR.) A kind of scoundrel imperfectly reverent of, and niggardly contributory to, divines, ecclesiastics, popes, parsons, canons, monks, mollahs, voodoos, presbyters, hierophants, prelates, obeah-men, abbes, nuns, missionaries, exhorters, deacons, friars, hadjis, high-priests, muezzins, brahmins, medicine-men, confessors, eminences, elders, primates, prebendaries, pilgrims, prophets, imaums, beneficiaries, clerks, vicars-choral, archbishops, bishops, abbots, priors, preachers, padres, abbotesses, caloyers, palmers, curates, patriarchs, bonezs, santons, beadsmen, canonesses, residentiaries, diocesans, deans, subdeans, rural deans, abdals, charm-sellers, archdeacons, hierarchs, class-leaders, incumbents, capitulars, sheiks, talapoins, postulants, scribes, gooroos, precentors, beadles, fakeers, sextons, reverences, revivalists, cenobites, perpetual curates, chaplains, mudjoes, readers, novices, vicars, pastors, rabbis, ulemas, lamas, sacristans, vergers, dervises, lectors, church wardens, cardinals, prioresses, suffragans, acolytes, rectors, cures, sophis, mutifs and pumpums. ** INFLUENCE INFLUENCE, n. In politics, a visionary _quo_ given in exchange for a substantial _quid_. ** INFALAPSARIAN INFALAPSARIAN, n. One who ventures to believe that Adam need not have sinned unless he had a mind to -- in opposition to the Supralapsarians, who hold that that luckless person's fall was decreed from the beginning. Infralapsarians are sometimes called Sublapsarians without material effect upon the importance and lucidity of their views about Adam. Two theologues once, as they wended their way To chapel, engaged in colloquial fray -- An earnest logomachy, bitter as gall, Concerning poor Adam and what made him fall. "'Twas Predestination," cried one -- "for the Lord Decreed he should fall of his own accord." "Not so -- 'twas Free will," the other maintained, "Which led him to choose what the Lord had ordained." So fierce and so fiery grew the debate That nothing but bloodshed their dudgeon could sate; So off flew their cassocks and caps to the ground And, moved by the spirit, their hands went round. Ere either had proved his theology right By winning, or even beginning, the fight, A gray old professor of Latin came by, A staff in his hand and a scowl in his eye, And learning the cause of their quarrel (for still As they clumsily sparred they disputed with skill Of foreordination freedom of will) Cried: "Sirrahs! this reasonless warfare compose: Atwixt ye's no difference worthy of blows. The sects ye belong to -- I'm ready to swear Ye wrongly interpret the names that they bear. _You_ -- Infralapsarian son of a clown! -- Should only contend that Adam slipped down; While _you_ -- you Supralapsarian pup! -- Should nothing aver but that Adam slipped up. It's all the same whether up or down You slip on a peel of banana brown. Even Adam analyzed not his blunder, But thought he had slipped on a peal of thunder! G.J. ** INGRATE INGRATE, n. One who receives a benefit from another, or is otherwise an object of charity. "All men are ingrates," sneered the cynic. "Nay," The good philanthropist replied; "I did great service to a man one day Who never since has cursed me to repay, Nor vilified." "Ho!" cried the cynic, "lead me to him straight -- With veneration I am overcome, And fain would have his blessing." "Sad your fate -- He cannot bless you, for AI grieve to state This man is dumb." Ariel Selp ** INJURY INJURY, n. An offense next in degree of enormity to a slight. ** INJUSTICE INJUSTICE, n. A burden which of all those that we load upon others and carry ourselves is lightest in the hands and heaviest upon the back. ** INK INK, n. A villainous compound of tannogallate of iron, gum-arabic and water, chiefly used to facilitate the infection of idiocy and promote intellectual crime. The properties of ink are peculiar and contradictory: it may be used to make reputations and unmake them; to blacken them and to make them white; but it is most generally and acceptably employed as a mortar to bind together the stones of an edifice of fame, and as a whitewash to conceal afterward the rascal quality of the material. There are men called journalists who have established ink baths which some persons pay money to get into, others to get out of. Not infrequently it occurs that a person who has paid to get in pays twice as much to get out. ** INNATE INNATE, adj. Natural, inherent -- as innate ideas, that is to say, ideas that we are born with, having had them previously imparted to us. The doctrine of innate ideas is one of the most admirable faiths of philosophy, being itself an innate idea and therefore inaccessible to disproof, though Locke foolishly supposed himself to have given it "a black eye." Among innate ideas may be mentioned the belief in one's ability to conduct a newspaper, in the greatness of one's country, in the superiority of one's civilization, in the importance of one's personal affairs and in the interesting nature of one's diseases. ** IN'ARDS IN'ARDS, n. The stomach, heart, soul and other bowels. Many eminent investigators do not class the soul as an in'ard, but that acute observer and renowned authority, Dr. Gunsaulus, is persuaded that the mysterious organ known as the spleen is nothing less than our important part. To the contrary, Professor Garrett P. Servis holds that man's soul is that prolongation of his spinal marrow which forms the pith of his no tail; and for demonstration of his faith points confidently to the fact that no tailed animals have no souls. Concerning these two theories, it is best to suspend judgment by believing both. ** INSCRIPTION INSCRIPTION, n. Something written on another thing. Inscriptions are of many kinds, but mostly memorial, intended to commemorate the fame of some illustrious person and hand down to distant ages the record of his services and virtues. To this class of inscriptions belongs the name of John Smith, penciled on the Washington monument. Following are examples of memorial inscriptions on tombstones: (See EPITAPH.) "In the sky my soul is found, And my body in the ground. By and by my body'll rise To my spirit in the skies, Soaring up to Heaven's gate. 1878." "Sacred to the memory of Jeremiah Tree. Cut down May 9th, 1862, aged 27 yrs. 4 mos. and 12 ds. Indigenous." "Affliction sore long time she boar, Phisicians was in vain, Till Deth released the dear deceased And left her a remain. Gone to join Ananias in the regions of bliss." "The clay that rests beneath this stone As Silas Wood was widely known. Now, lying here, I ask what good It was to let me be S. Wood. O Man, let not ambition trouble you, Is the advice of Silas W." "Richard Haymon, of Heaven. Fell to Earth Jan. 20, 1807, and had the dust brushed off him Oct. 3, 1874." ** INSECTIVORA INSECTIVORA, n. "See," cries the chorus of admiring preachers, "How Providence provides for all His creatures!" "His care," the gnat said, "even the insects follows: For us He has provided wrens and swallows." Sempen Railey ** INSURANCE INSURANCE, n. An ingenious modern game of chance in which the player is permitted to enjoy the comfortable conviction that he is beating the man who keeps the table. INSURANCE AGENT: My dear sir, that is a fine house -- pray let me insure it. HOUSE OWNER: With pleasure. Please make the annual premium so low that by the time when, according to the tables of your actuary, it will probably be destroyed by fire I will have paid you considerably less than the face of the policy. INSURANCE AGENT: O dear, no -- we could not afford to do that. We must fix the premium so that you will have paid more. HOUSE OWNER: How, then, can _I_ afford _that_? INSURANCE AGENT: Why, your house may burn down at any time. There was Smith's house, for example, which -- HOUSE OWNER: Spare me -- there were Brown's house, on the contrary, and Jones's house, and Robinson's house, which -- INSURANCE AGENT: Spare _me_! HOUSE OWNER: Let us understand each other. You want me to pay you money on the supposition that something will occur previously to the time set by yourself for its occurrence. In other words, you expect me to bet that my house will not last so long as you say that it will probably last. INSURANCE AGENT: But if your house burns without insurance it will be a total loss. HOUSE OWNER: Beg your pardon -- by your own actuary's tables I shall probably have saved, when it burns, all the premiums I would otherwise have paid to you -- amounting to more than the face of the policy they would have bought. But suppose it to burn, uninsured, before the time upon which your figures are based. If I could not afford that, how could you if it were insured? INSURANCE AGENT: O, we should make ourselves whole from our luckier ventures with other clients. Virtually, they pay your loss. HOUSE OWNER: And virtually, then, don't I help to pay their losses? Are not their houses as likely as mine to burn before they have paid you as much as you must pay them? The case stands this way: you expect to take more money from your clients than you pay to them, do you not? INSURANCE AGENT: Certainly; if we did not -- HOUSE OWNER: I would not trust you with my money. Very well then. If it is _certain_, with reference to the whole body of your clients, that they lose money on you it is _probable_, with reference to any one of them, that _he_ will. It is these individual probabilities that make the aggregate certainty. INSURANCE AGENT: I will not deny it -- but look at the figures in this pamph -- HOUSE OWNER: Heaven forbid! INSURANCE AGENT: You spoke of saving the premiums which you would otherwise pay to me. Will you not be more likely to squander them? We offer you an incentive to thrift. HOUSE OWNER: The willingness of A to take care of B's money is not peculiar to insurance, but as a charitable institution you command esteem. Deign to accept its expression from a Deserving Object. ** INSURRECTION INSURRECTION, n. An unsuccessful revolution. Disaffection's failure to substitute misrule for bad government. ** INTENTION INTENTION, n. The mind's sense of the prevalence of one set of influences over another set; an effect whose cause is the imminence, immediate or remote, of the performance of an involuntary act. ** INTERPRETER INTERPRETER, n. One who enables two persons of different languages to understand each other by repeating to each what it would have been to the interpreter's advantage for the other to have said. ** INTERREGNUM INTERREGNUM, n. The period during which a monarchical country is governed by a warm spot on the cushion of the throne. The experiment of letting the spot grow cold has commonly been attended by most unhappy results from the zeal of many worthy persons to make it warm again. ** INTIMACY INTIMACY, n. A relation into which fools are providentially drawn for their mutual destruction. Two Seidlitz powders, one in blue And one in white, together drew And having each a pleasant sense Of t'other powder's excellence, Forsook their jackets for the snug Enjoyment of a common mug. So close their intimacy grew One paper would have held the two. To confidences straight they fell, Less anxious each to hear than tell; Then each remorsefully confessed To all the virtues he possessed, Acknowledging he had them in So high degree it was a sin. The more they said, the more they felt Their spirits with emotion melt, Till tears of sentiment expressed Their feelings. Then they effervesced! So Nature executes her feats Of wrath on friends and sympathetes The good old rule who don't apply, That you are you and I am I. ** INTRODUCTION INTRODUCTION, n. A social ceremony invented by the devil for the gratification of his servants and the plaguing of his enemies. The introduction attains its most malevolent development in this century, being, indeed, closely related to our political system. Every American being the equal of every other American, it follows that everybody has the right to know everybody else, which implies the right to introduce without request or permission. The Declaration of Independence should have read thus: "We hold these truths to be self-evident: that all men are created equal; that they are endowed by their Creator with certain inalienable rights; that among these are life, and the right to make that of another miserable by thrusting upon him an incalculable quantity of acquaintances; liberty, particularly the liberty to introduce persons to one another without first ascertaining if they are not already acquainted as enemies; and the pursuit of another's happiness with a running pack of strangers." ** INVENTOR INVENTOR, n. A person who makes an ingenious arrangement of wheels, levers and springs, and believes it civilization. ** IRRELIGION IRRELIGION, n. The principal one of the great faiths of the world. ** ITCH ITCH, n. The patriotism of a Scotchman. J ** J J is a consonant in English, but some nations use it as a vowel -- than which nothing could be more absurd. Its original form, which has been but slightly modified, was that of the tail of a subdued dog, and it was not a letter but a character, standing for a Latin verb, _jacere_, "to throw," because when a stone is thrown at a dog the dog's tail assumes that shape. This is the origin of the letter, as expounded by the renowned Dr. Jocolpus Bumer, of the University of Belgrade, who established his conclusions on the subject in a work of three quarto volumes and committed suicide on being reminded that the j in the Roman alphabet had originally no curl. ** JEALOUS JEALOUS, adj. Unduly concerned about the preservation of that which can be lost only if not worth keeping. ** JESTER JESTER, n. An officer formerly attached to a king's household, whose business it was to amuse the court by ludicrous actions and utterances, the absurdity being attested by his motley costume. The king himself being attired with dignity, it took the world some centuries to discover that his own conduct and decrees were sufficiently ridiculous for the amusement not only of his court but of all mankind. The jester was commonly called a fool, but the poets and romancers have ever delighted to represent him as a singularly wise and witty person. In the circus of to-day the melancholy ghost of the court fool effects the dejection of humbler audiences with the same jests wherewith in life he gloomed the marble hall, panged the patrician sense of humor and tapped the tank of royal tears. The widow-queen of Portugal Had an audacious jester Who entered the confessional Disguised, and there confessed her. "Father," she said, "thine ear bend down -- My sins are more than scarlet: I love my fool -- blaspheming clown, And common, base-born varlet." "Daughter," the mimic priest replied, "That sin, indeed, is awful: The church's pardon is denied To love that is unlawful. "But since thy stubborn heart will be For him forever pleading, Thou'dst better make him, by decree, A man of birth and breeding." She made the fool a duke, in hope With Heaven's taboo to palter; Then told a priest, who told the Pope, Who damned her from the altar! Barel Dort ** JEWS-HARP JEWS-HARP, n. An unmusical instrument, played by holding it fast with the teeth and trying to brush it away with the finger. ** JOSS-STICKS JOSS-STICKS, n. Small sticks burned by the Chinese in their pagan tomfoolery, in imitation of certain sacred rites of our holy religion. ** JUSTICE JUSTICE, n. A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service. K ** K K is a consonant that we get from the Greeks, but it can be traced away back beyond them to the Cerathians, a small commercial nation inhabiting the peninsula of Smero. In their tongue it was called _Klatch_, which means "destroyed." The form of the letter was originally precisely that of our H, but the erudite Dr. Snedeker explains that it was altered to its present shape to commemorate the destruction of the great temple of Jarute by an earthquake, _circa_ 730 B.C. This building was famous for the two lofty columns of its portico, one of which was broken in half by the catastrophe, the other remaining intact. As the earlier form of the letter is supposed to have been suggested by these pillars, so, it is thought by the great antiquary, its later was adopted as a simple and natural -- not to say touching -- means of keeping the calamity ever in the national memory. It is not known if the name of the letter was altered as an additional mnemonic, or if the name was always _Klatch_ and the destruction one of nature's pums. As each theory seems probable enough, I see no objection to believing both -- and Dr. Snedeker arrayed himself on that side of the question. ** KEEP KEEP, v.t. He willed away his whole estate, And then in death he fell asleep, Murmuring: "Well, at any rate, My name unblemished I shall keep." But when upon the tomb 'twas wrought Whose was it? -- for the dead keep naught. Durang Gophel Arn ** KILL KILL, v.t. To create a vacancy without nominating a successor. ** KILT KILT, n. A costume sometimes worn by Scotchmen in America and Americans in Scotland. ** KINDNESS KINDNESS, n. A brief preface to ten volumes of exaction. ** KING KING, n. A male person commonly known in America as a "crowned head," although he never wears a crown and has usually no head to speak of. A king, in times long, long gone by, Said to his lazy jester: "If I were you and you were I My moments merrily would fly -- Nor care nor grief to pester." "The reason, Sire, that you would thrive," The fool said -- "if you'll hear it -- Is that of all the fools alive Who own you for their sovereign, I've The most forgiving spirit." Oogum Bem ** KING'S EVIL KING'S EVIL, n. A malady that was formerly cured by the touch of the sovereign, but has now to be treated by the physicians. Thus 'the most pious Edward" of England used to lay his royal hand upon the ailing subjects and make them whole -- a crowd of wretched souls That stay his cure: their malady convinces The great essay of art; but at his touch, Such sanctity hath Heaven given his hand, They presently amend, as the "Doctor" in _Macbeth_ hath it. This useful property of the royal hand could, it appears, be transmitted along with other crown properties; for according to "Malcolm," 'tis spoken To the succeeding royalty he leaves The healing benediction. But the gift somewhere dropped out of the line of succession: the later sovereigns of England have not been tactual healers, and the disease once honored with the name "king's evil" now bears the humbler one of "scrofula," from _scrofa_, a sow. The date and author of the following epigram are known only to the author of this dictionary, but it is old enough to show that the jest about Scotland's national disorder is not a thing of yesterday. Ye Kynge his evill in me laye, Wh. he of Scottlande charmed awaye. He layde his hand on mine and sayd: "Be gone!" Ye ill no longer stayd. But O ye wofull plyght in wh. I'm now y-pight: I have ye itche! The superstition that maladies can be cured by royal taction is dead, but like many a departed conviction it has left a monument of custom to keep its memory green. The practice of forming a line and shaking the President's hand had no other origin, and when that great dignitary bestows his healing salutation on strangely visited people, All swoln and ulcerous, pitiful to the eye, The mere despair of surgery, he and his patients are handing along an extinguished torch which once was kindled at the altar-fire of a faith long held by all classes of men. It is a beautiful and edifying "survival" -- one which brings the sainted past close home in our "business and bosoms." ** KISS KISS, n. A word invented by the poets as a rhyme for "bliss." It is supposed to signify, in a general way, some kind of rite or ceremony appertaining to a good understanding; but the manner of its performance is unknown to this lexicographer. ** KLEPTOMANIAC KLEPTOMANIAC, n. A rich thief. ** KNIGHT KNIGHT, n. Once a warrior gentle of birth, Then a person of civic worth, Now a fellow to move our mirth. Warrior, person, and fellow -- no more: We must knight our dogs to get any lower. Brave Knights Kennelers then shall be, Noble Knights of the Golden Flea, Knights of the Order of St. Steboy, Knights of St. Gorge and Sir Knights Jawy. God speed the day when this knighting fad Shall go to the dogs and the dogs go mad. ** KORAN KORAN, n. A book which the Mohammedans foolishly believe to have been written by divine inspiration, but which Christians know to be a wicked imposture, contradictory to the Holy Scriptures. L ** LABOR LABOR, n. One of the processes by which A acquires property for B. ** LAND LAND, n. A part of the earth's surface, considered as property. The theory that land is property subject to private ownership and control is the foundation of modern society, and is eminently worthy of the superstructure. Carried to its logical conclusion, it means that some have the right to prevent others from living; for the right to own implies the right exclusively to occupy; and in fact laws of trespass are enacted wherever property in land is recognized. It follows that if the whole area of _terra firma_ is owned by A, B and C, there will be no place for D, E, F and G to be born, or, born as trespassers, to exist. A life on the ocean wave, A home on the rolling deep, For the spark the nature gave I have there the right to keep. They give me the cat-o'-nine Whenever I go ashore. Then ho! for the flashing brine -- I'm a natural commodore! Dodle ** LANGUAGE LANGUAGE, n. The music with which we charm the serpents guarding another's treasure. ** LAOCOON LAOCOON, n. A famous piece of antique scripture representing a priest of that name and his two sons in the folds of two enormous serpents. The skill and diligence with which the old man and lads support the serpents and keep them up to their work have been justly regarded as one of the noblest artistic illustrations of the mastery of human intelligence over brute inertia. ** LAP LAP, n. One of the most important organs of the female system -- an admirable provision of nature for the repose of infancy, but chiefly useful in rural festivities to support plates of cold chicken and heads of adult males. The male of our species has a rudimentary lap, imperfectly developed and in no way contributing to the animal's substantial welfare. ** LAST LAST, n. A shoemaker's implement, named by a frowning Providence as opportunity to the maker of puns. Ah, punster, would my lot were cast, Where the cobbler is unknown, So that I might forget his last And hear your own. Gargo Repsky ** LAUGHTER LAUGHTER, n. An interior convulsion, producing a distortion of the features and accompanied by inarticulate noises. It is infectious and, though intermittent, incurable. Liability to attacks of laughter is one of the characteristics distinguishing man from the animals -- these being not only inaccessible to the provocation of his example, but impregnable to the microbes having original jurisdiction in bestowal of the disease. Whether laughter could be imparted to animals by inoculation from the human patient is a question that has not been answered by experimentation. Dr. Meir Witchell holds that the infection character of laughter is due to the instantaneous fermentation of _sputa_ diffused in a spray. From this peculiarity he names the disorder _Convulsio spargens_. ** LAUREATE LAUREATE, adj. Crowned with leaves of the laurel. In England the Poet Laureate is an officer of the sovereign's court, acting as dancing skeleton at every royal feast and singing-mute at every royal funeral. Of all incumbents of that high office, Robert Southey had the most notable knack at drugging the Samson of public joy and cutting his hair to the quick; and he had an artistic color-sense which enabled him so to blacken a public grief as to give it the aspect of a national crime. ** LAUREL LAUREL, n. The _laurus_, a vegetable dedicated to Apollo, and formerly defoliated to wreathe the brows of victors and such poets as had influence at court. (_Vide supra._) ** LAW LAW, n. Once Law was sitting on the bench, And Mercy knelt a-weeping. "Clear out!" he cried, "disordered wench! Nor come before me creeping. Upon your knees if you appear, 'Tis plain your have no standing here." Then Justice came. His Honor cried: "_Your_ status? -- devil seize you!" "_Amica curiae,_" she replied -- "Friend of the court, so please you." "Begone!" he shouted -- "there's the door -- I never saw your face before!" G.J. ** LAWFUL LAWFUL, adj. Compatible with the will of a judge having jurisdiction. ** LAWYER LAWYER, n. One skilled in circumvention of the law. ** LAZINESS LAZINESS, n. Unwarranted repose of manner in a person of low degree. ** LEAD LEAD, n. A heavy blue-gray metal much used in giving stability to light lovers -- particularly to those who love not wisely but other men's wives. Lead is also of great service as a counterpoise to an argument of such weight that it turns the scale of debate the wrong way. An interesting fact in the chemistry of international controversy is that at the point of contact of two patriotisms lead is precipitated in great quantities. Hail, holy Lead! -- of human feuds the great And universal arbiter; endowed With penetration to pierce any cloud Fogging the field of controversial hate, And with a sift, inevitable, straight, Searching precision find the unavowed But vital point. Thy judgment, when allowed By the chirurgeon, settles the debate. O useful metal! -- were it not for thee We'd grapple one another's ears alway: But when we hear thee buzzing like a bee We, like old Muhlenberg, "care not to stay." And when the quick have run away like pellets Jack Satan smelts the dead to make new bullets. ** LEARNING LEARNING, n. The kind of ignorance distinguishing the studious. ** LECTURER LECTURER, n. One with his hand in your pocket, his tongue in your ear and his faith in your patience. ** LEGACY LEGACY, n. A gift from one who is legging it out of this vale of tears. ** LEONINE LEONINE, adj. Unlike a menagerie lion. Leonine verses are those in which a word in the middle of a line rhymes with a word at the end, as in this famous passage from Bella Peeler Silcox: The electric light invades the dunnest deep of Hades. Cries Pluto, 'twixt his snores: "O tempora! O mores!" It should be explained that Mrs. Silcox does not undertake to teach pronunciation of the Greek and Latin tongues. Leonine verses are so called in honor of a poet named Leo, whom prosodists appear to find a pleasure in believing to have been the first to discover that a rhyming couplet could be run into a single line. ** LETTUCE LETTUCE, n. An herb of the genus _Lactuca_, "Wherewith," says that pious gastronome, Hengist Pelly, "God has been pleased to reward the good and punish the wicked. For by his inner light the righteous man has discerned a manner of compounding for it a dressing to the appetency whereof a multitude of gustible condiments conspire, being reconciled and ameliorated with profusion of oil, the entire comestible making glad the heart of the godly and causing his face to shine. But the person of spiritual unworth is successfully tempted to the Adversary to eat of lettuce with destitution of oil, mustard, egg, salt and garlic, and with a rascal bath of vinegar polluted with sugar. Wherefore the person of spiritual unworth suffers an intestinal pang of strange complexity and raises the song." ** LEVIATHAN LEVIATHAN, n. An enormous aquatic animal mentioned by Job. Some suppose it to have been the whale, but that distinguished ichthyologer, Dr. Jordan, of Stanford University, maintains with considerable heat that it was a species of gigantic Tadpole (_Thaddeus Polandensis_) or Polliwig -- _Maria pseudo-hirsuta_. For an exhaustive description and history of the Tadpole consult the famous monograph of Jane Potter, _Thaddeus of Warsaw_. ** LEXICOGRAPHER LEXICOGRAPHER, n. A pestilent fellow who, under the pretense of recording some particular stage in the development of a language, does what he can to arrest its growth, stiffen its flexibility and mechanize its methods. For your lexicographer, having written his dictionary, comes to be considered "as one having authority," whereas his function is only to make a record, not to give a law. The natural servility of the human understanding having invested him with judicial power, surrenders its right of reason and submits itself to a chronicle as if it were a statue. Let the dictionary (for example) mark a good word as "obsolete" or "obsolescent" and few men thereafter venture to use it, whatever their need of it and however desirable its restoration to favor -- whereby the process of improverishment is accelerated and speech decays. On the contrary, recognizing the truth that language must grow by innovation if it grow at all, makes new words and uses the old in an unfamiliar sense, has no following and is tartly reminded that "it isn't in the dictionary" -- although down to the time of the first lexicographer (Heaven forgive him!) no author ever had used a word that _was_ in the dictionary. In the golden prime and high noon of English speech; when from the lips of the great Elizabethans fell words that made their own meaning and carried it in their very sound; when a Shakespeare and a Bacon were possible, and the language now rapidly perishing at one end and slowly renewed at the other was in vigorous growth and hardy preservation -- sweeter than honey and stronger than a lion -- the lexicographer was a person unknown, the dictionary a creation which his Creator had not created him to create. God said: "Let Spirit perish into Form," And lexicographers arose, a swarm! Thought fled and left her clothing, which they took, And catalogued each garment in a book. Now, from her leafy covert when she cries: "Give me my clothes and I'll return," they rise And scan the list, and say without compassion: "Excuse us -- they are mostly out of fashion." Sigismund Smith ** LIAR LIAR, n. A lawyer with a roving commission. ** LIBERTY LIBERTY, n. One of Imagination's most precious possessions. The rising People, hot and out of breath, Roared around the palace: "Liberty or death!" "If death will do," the King said, "let me reign; You'll have, I'm sure, no reason to complain." Martha Braymance ** LICKSPITTLE LICKSPITTLE, n. A useful functionary, not infrequently found editing a newspaper. In his character of editor he is closely allied to the blackmailer by the tie of occasional identity; for in truth the lickspittle is only the blackmailer under another aspect, although the latter is frequently found as an independent species. Lickspittling is more detestable than blackmailing, precisely as the business of a confidence man is more detestable than that of a highway robber; and the parallel maintains itself throughout, for whereas few robbers will cheat, every sneak will plunder if he dare. ** LIFE LIFE, n. A spiritual pickle preserving the body from decay. We live in daily apprehension of its loss; yet when lost it is not missed. The question, "Is life worth living?" has been much discussed; particularly by those who think it is not, many of whom have written at great length in support of their view and by careful observance of the laws of health enjoyed for long terms of years the honors of successful controversy. "Life's not worth living, and that's the truth," Carelessly caroled the golden youth. In manhood still he maintained that view And held it more strongly the older he grew. When kicked by a jackass at eighty-three, "Go fetch me a surgeon at once!" cried he. Han Soper ** LIGHTHOUSE LIGHTHOUSE, n. A tall building on the seashore in which the government maintains a lamp and the friend of a politician. ** LIMB LIMB, n. The branch of a tree or the leg of an American woman. 'Twas a pair of boots that the lady bought, And the salesman laced them tight To a very remarkable height -- Higher, indeed, than I think he ought -- Higher than _can_ be right. For the Bible declares -- but never mind: It is hardly fit To censure freely and fault to find With others for sins that I'm not inclined Myself to commit. Each has his weakness, and though my own Is freedom from every sin, It still were unfair to pitch in, Discharging the first censorious stone. Besides, the truth compels me to say, The boots in question were _made_ that way. As he drew the lace she made a grimace, And blushingly said to him: "This boot, I'm sure, is too high to endure, It hurts my -- hurts my -- limb." The salesman smiled in a manner mild, Like an artless, undesigning child; Then, checking himself, to his face he gave A look as sorrowful as the grave, Though he didn't care two figs For her paints and throes, As he stroked her toes, Remarking with speech and manner just Befitting his calling: "Madam, I trust That it doesn't hurt your twigs." B. Percival Dike ** LINEN LINEN, n. "A kind of cloth the making of which, when made of hemp, entails a great waste of hemp." -- Calcraft the Hangman. ** LITIGANT LITIGANT, n. A person about to give up his skin for the hope of retaining his bones. ** LITIGATION LITIGATION, n. A machine which you go into as a pig and come out of as a sausage. ** LIVER LIVER, n. A large red organ thoughtfully provided by nature to be bilious with. The sentiments and emotions which every literary anatomist now knows to haunt the heart were anciently believed to infest the liver; and even Gascoygne, speaking of the emotional side of human nature, calls it "our hepaticall parte." It was at one time considered the seat of life; hence its name -- liver, the thing we live with. The liver is heaven's best gift to the goose; without it that bird would be unable to supply us with the Strasbourg _pate_. LL.D. Letters indicating the degree _Legumptionorum Doctor_, one learned in laws, gifted with legal gumption. Some suspicion is cast upon this derivation by the fact that the title was formerly _LL.d._, and conferred only upon gentlemen distinguished for their wealth. At the date of this writing Columbia University is considering the expediency of making another degree for clergymen, in place of the old D.D. -- _Damnator Diaboli_. The new honor will be known as _Sanctorum Custus_, and written _$$c_. The name of the Rev. John Satan has been suggested as a suitable recipient by a lover of consistency, who points out that Professor Harry Thurston Peck has long enjoyed the advantage of a degree. ** LOCK-AND-KEY LOCK-AND-KEY, n. The distinguishing device of civilization and enlightenment. ** LODGER LODGER, n. A less popular name for the Second Person of that delectable newspaper Trinity, the Roomer, the Bedder, and the Mealer. ** LOGIC LOGIC, n. The art of thinking and reasoning in strict accordance with the limitations and incapacities of the human misunderstanding. The basic of logic is the syllogism, consisting of a major and a minor premise and a conclusion -- thus: _Major Premise_: Sixty men can do a piece of work sixty times as quickly as one man. _Minor Premise_: One man can dig a posthole in sixty seconds; therefore -- _Conclusion_: Sixty men can dig a posthole in one second. This may be called the syllogism arithmetical, in which, by combining logic and mathematics, we obtain a double certainty and are twice blessed. ** LOGOMACHY LOGOMACHY, n. A war in which the weapons are words and the wounds punctures in the swim-bladder of self-esteem -- a kind of contest in which, the vanquished being unconscious of defeat, the victor is denied the reward of success. 'Tis said by divers of the scholar-men That poor Salmasius died of Milton's pen. Alas! we cannot know if this is true, For reading Milton's wit we perish too. ** LOGANIMITY LOGANIMITY, n. The disposition to endure injury with meek forbearance while maturing a plan of revenge. ** LONGEVITY LONGEVITY, n. Uncommon extension of the fear of death. ** LOOKING-GLASS LOOKING-GLASS, n. A vitreous plane upon which to display a fleeting show for man's disillusion given. The King of Manchuria had a magic looking-glass, whereon whoso looked saw, not his own image, but only that of the king. A certain courtier who had long enjoyed the king's favor and was thereby enriched beyond any other subject of the realm, said to the king: "Give me, I pray, thy wonderful mirror, so that when absent out of thine august presence I may yet do homage before thy visible shadow, prostrating myself night and morning in the glory of thy benign countenance, as which nothing has so divine splendor, O Noonday Sun of the Universe!" Please with the speech, the king commanded that the mirror be conveyed to the courtier's palace; but after, having gone thither without apprisal, he found it in an apartment where was naught but idle lumber. And the mirror was dimmed with dust and overlaced with cobwebs. This so angered him that he fisted it hard, shattering the glass, and was sorely hurt. Enraged all the more by this mischance, he commanded that the ungrateful courtier be thrown into prison, and that the glass be repaired and taken back to his own palace; and this was done. But when the king looked again on the mirror he saw not his image as before, but only the figure of a crowned ass, having a bloody bandage on one of its hinder hooves -- as the artificers and all who had looked upon it had before discerned but feared to report. Taught wisdom and charity, the king restored his courtier to liberty, had the mirror set into the back of the throne and reigned many years with justice and humility; and one day when he fell asleep in death while on the throne, the whole court saw in the mirror the luminous figure of an angel, which remains to this day. ** LOQUACITY LOQUACITY, n. A disorder which renders the sufferer unable to curb his tongue when you wish to talk. ** LORD LORD, n. In American society, an English tourist above the state of a costermonger, as, lord 'Aberdasher, Lord Hartisan and so forth. The traveling Briton of lesser degree is addressed as "Sir," as, Sir 'Arry Donkiboi, or 'Amstead 'Eath. The word "Lord" is sometimes used, also, as a title of the Supreme Being; but this is thought to be rather flattery than true reverence. Miss Sallie Ann Splurge, of her own accord, Wedded a wandering English lord -- Wedded and took him to dwell with her "paw," A parent who throve by the practice of Draw. Lord Cadde I don't hesitate to declare Unworthy the father-in-legal care Of that elderly sport, notwithstanding the truth That Cadde had renounced all the follies of youth; For, sad to relate, he'd arrived at the stage Of existence that's marked by the vices of age. Among them, cupidity caused him to urge Repeated demands on the pocket of Splurge, Till, wrecked in his fortune, that gentleman saw Inadequate aid in the practice of Draw, And took, as a means of augmenting his pelf, To the business of being a lord himself. His neat-fitting garments he wilfully shed And sacked himself strangely in checks instead; Denuded his chin, but retained at each ear A whisker that looked like a blasted career. He painted his neck an incarnadine hue Each morning and varnished it all that he knew. The moony monocular set in his eye Appeared to be scanning the Sweet Bye-and-Bye. His head was enroofed with a billycock hat, And his low-necked shoes were aduncous and flat. In speech he eschewed his American ways, Denying his nose to the use of his A's And dulling their edge till the delicate sense Of a babe at their temper could take no offence. His H's -- 'twas most inexpressibly sweet, The patter they made as they fell at his feet! Re-outfitted thus, Mr. Splurge without fear Began as Lord Splurge his recouping career. Alas, the Divinity shaping his end Entertained other views and decided to send His lordship in horror, despair and dismay From the land of the nobleman's natural prey. For, smit with his Old World ways, Lady Cadde Fell -- suffering Caesar! -- in love with her dad! G.J. ** LORE LORE, n. Learning -- particularly that sort which is not derived from a regular course of instruction but comes of the reading of occult books, or by nature. This latter is commonly designated as folk-lore and embraces popularly myths and superstitions. In Baring-Gould's _Curious Myths of the Middle Ages_ the reader will find many of these traced backward, through various people son converging lines, toward a common origin in remote antiquity. Among these are the fables of "Teddy the Giant Killer," "The Sleeping John Sharp Williams," "Little Red Riding Hood and the Sugar Trust," "Beauty and the Brisbane," "The Seven Aldermen of Ephesus," "Rip Van Fairbanks," and so forth. The fable with Goethe so affectingly relates under the title of "The Erl- King" was known two thousand years ago in Greece as "The Demos and the Infant Industry." One of the most general and ancient of these myths is that Arabian tale of "Ali Baba and the Forty Rockefellers." ** LOSS LOSS, n. Privation of that which we had, or had not. Thus, in the latter sense, it is said of a defeated candidate that he "lost his election"; and of that eminent man, the poet Gilder, that he has "lost his mind." It is in the former and more legitimate sense, that the word is used in the famous epitaph: Here Huntington's ashes long have lain Whose loss is our eternal gain, For while he exercised all his powers Whatever he gained, the loss was ours. ** LOVE LOVE, n. A temporary insanity curable by marriage or by removal of the patient from the influences under which he incurred the disorder. This disease, like _caries_ and many other ailments, is prevalent only among civilized races living under artificial conditions; barbarous nations breathing pure air and eating simple food enjoy immunity from its ravages. It is sometimes fatal, but more frequently to the physician than to the patient. ** LOW-BRED LOW-BRED, adj. "Raised" instead of brought up. ** LUMINARY LUMINARY, n. One who throws light upon a subject; as an editor by not writing about it. ** LUNARIAN LUNARIAN, n. An inhabitant of the moon, as distinguished from Lunatic, one whom the moon inhabits. The Lunarians have been described by Lucian, Locke and other observers, but without much agreement. For example, Bragellos avers their anatomical identity with Man, but Professor Newcomb says they are more like the hill tribes of Vermont. ** LYRE LYRE, n. An ancient instrument of torture. The word is now used in a figurative sense to denote the poetic faculty, as in the following fiery lines of our great poet, Ella Wheeler Wilcox: I sit astride Parnassus with my lyre, And pick with care the disobedient wire. That stupid shepherd lolling on his crook With deaf attention scarcely deigns to look. I bide my time, and it shall come at length, When, with a Titan's energy and strength, I'll grab a fistful of the strings, and O, The word shall suffer when I let them go! Farquharson Harris M ** MACE MACE, n. A staff of office signifying authority. Its form, that of a heavy club, indicates its original purpose and use in dissuading from dissent. ** MACHINATION MACHINATION, n. The method employed by one's opponents in baffling one's open and honorable efforts to do the right thing. So plain the advantages of machination It constitutes a moral obligation, And honest wolves who think upon't with loathing Feel bound to don the sheep's deceptive clothing. So prospers still the diplomatic art, And Satan bows, with hand upon his heart. R.S.K. ** MACROBIAN MACROBIAN, n. One forgotten of the gods and living to a great age. History is abundantly supplied with examples, from Methuselah to Old Parr, but some notable instances of longevity are less well known. A Calabrian peasant named Coloni, born in 1753, lived so long that he had what he considered a glimpse of the dawn of universal peace. Scanavius relates that he knew an archbishop who was so old that he could remember a time when he did not deserve hanging. In 1566 a linen draper of Bristol, England, declared that he had lived five hundred years, and that in all that time he had never told a lie. There are instances of longevity (_macrobiosis_) in our own country. Senator Chauncey Depew is old enough to know better. The editor of _The American_, a newspaper in New York City, has a memory that goes back to the time when he was a rascal, but not to the fact. The President of the United States was born so long ago that many of the friends of his youth have risen to high political and military preferment without the assistance of personal merit. The verses following were written by a macrobian: When I was young the world was fair And amiable and sunny. A brightness was in all the air, In all the waters, honey. The jokes were fine and funny, The statesmen honest in their views, And in their lives, as well, And when you heard a bit of news 'Twas true enough to tell. Men were not ranting, shouting, reeking, Nor women "generally speaking." The Summer then was long indeed: It lasted one whole season! The sparkling Winter gave no heed When ordered by Unreason To bring the early peas on. Now, where the dickens is the sense In calling that a year Which does no more than just commence Before the end is near? When I was young the year extended From month to month until it ended. I know not why the world has changed To something dark and dreary, And everything is now arranged To make a fellow weary. The Weather Man -- I fear he Has much to do with it, for, sure, The air is not the same: It chokes you when it is impure, When pure it makes you lame. With windows closed you are asthmatic; Open, neuralgic or sciatic. Well, I suppose this new regime Of dun degeneration Seems eviler than it would seem To a better observation, And has for compensation Some blessings in a deep disguise Which mortal sight has failed To pierce, although to angels' eyes They're visible unveiled. If Age is such a boon, good land! He's costumed by a master hand! Venable Strigg ** MAD MAD, adj. Affected with a high degree of intellectual independence; not conforming to standards of thought, speech and action derived by the conformants from study of themselves; at odds with the majority; in short, unusual. It is noteworthy that persons are pronounced mad by officials destitute of evidence that themselves are sane. For illustration, this present (and illustrious) lexicographer is no firmer in the faith of his own sanity than is any inmate of any madhouse in the land; yet for aught he knows to the contrary, instead of the lofty occupation that seems to him to be engaging his powers he may really be beating his hands against the window bars of an asylum and declaring himself Noah Webster, to the innocent delight of many thoughtless spectators. ** MAGDALENE MAGDALENE, n. An inhabitant of Magdala. Popularly, a woman found out. This definition of the word has the authority of ignorance, Mary of Magdala being another person than the penitent woman mentioned by St. Luke. It has also the official sanction of the governments of Great Britain and the United States. In England the word is pronounced Maudlin, whence maudlin, adjective, unpleasantly sentimental. With their Maudlin for Magdalene, and their Bedlam for Bethlehem, the English may justly boast themselves the greatest of revisers. ** MAGIC MAGIC, n. An art of converting superstition into coin. There are other arts serving the same high purpose, but the discreet lexicographer does not name them. ** MAGNET MAGNET, n. Something acted upon by magnetism. ** MAGNETISM MAGNETISM, n. Something acting upon a magnet. The two definitions immediately foregoing are condensed from the works of one thousand eminent scientists, who have illuminated the subject with a great white light, to the inexpressible advancement of human knowledge. ** MAGNIFICENT MAGNIFICENT, adj. Having a grandeur or splendor superior to that to which the spectator is accustomed, as the ears of an ass, to a rabbit, or the glory of a glowworm, to a maggot. ** MAGNITUDE MAGNITUDE, n. Size. Magnitude being purely relative, nothing is large and nothing small. If everything in the universe were increased in bulk one thousand diameters nothing would be any larger than it was before, but if one thing remain unchanged all the others would be larger than they had been. To an understanding familiar with the relativity of magnitude and distance the spaces and masses of the astronomer would be no more impressive than those of the microscopist. For anything we know to the contrary, the visible universe may be a small part of an atom, with its component ions, floating in the life- fluid (luminiferous ether) of some animal. Possibly the wee creatures peopling the corpuscles of our own blood are overcome with the proper emotion when contemplating the unthinkable distance from one of these to another. ** MAGPIE MAGPIE, n. A bird whose thievish disposition suggested to someone that it might be taught to talk. ** MAIDEN MAIDEN, n. A young person of the unfair sex addicted to clewless conduct and views that madden to crime. The genus has a wide geographical distribution, being found wherever sought and deplored wherever found. The maiden is not altogether unpleasing to the eye, nor (without her piano and her views) insupportable to the ear, though in respect to comeliness distinctly inferior to the rainbow, and, with regard to the part of her that is audible, bleating out of the field by the canary -- which, also, is more portable. A lovelorn maiden she sat and sang -- This quaint, sweet song sang she; "It's O for a youth with a football bang And a muscle fair to see! The Captain he Of a team to be! On the gridiron he shall shine, A monarch by right divine, And never to roast on it -- me!" Opoline Jones ** MAJESTY MAJESTY, n. The state and title of a king. Regarded with a just contempt by the Most Eminent Grand Masters, Grand Chancellors, Great Incohonees and Imperial Potentates of the ancient and honorable orders of republican America. ** MALE MALE, n. A member of the unconsidered, or negligible sex. The male of the human race is commonly known (to the female) as Mere Man. The genus has two varieties: good providers and bad providers. ** MALEFACTOR MALEFACTOR, n. The chief factor in the progress of the human race. ** MALTHUSIAN MALTHUSIAN, adj. Pertaining to Malthus and his doctrines. Malthus believed in artificially limiting population, but found that it could not be done by talking. One of the most practical exponents of the Malthusian idea was Herod of Judea, though all the famous soldiers have been of the same way of thinking. ** MAMMALIA MAMMALIA, n.pl. A family of vertebrate animals whose females in a state of nature suckle their young, but when civilized and enlightened put them out to nurse, or use the bottle. ** MAMMON MAMMON, n. The god of the world's leading religion. The chief temple is in the holy city of New York. He swore that all other religions were gammon, And wore out his knees in the worship of Mammon. Jared Oopf ** MAN MAN, n. An animal so lost in rapturous contemplation of what he thinks he is as to overlook what he indubitably ought to be. His chief occupation is extermination of other animals and his own species, which, however, multiplies with such insistent rapidity as to infest the whole habitable earh and Canada. When the world was young and Man was new, And everything was pleasant, Distinctions Nature never drew 'Mongst kings and priest and peasant. We're not that way at present, Save here in this Republic, where We have that old regime, For all are kings, however bare Their backs, howe'er extreme Their hunger. And, indeed, each has a voice To accept the tyrant of his party's choice. A citizen who would not vote, And, therefore, was detested, Was one day with a tarry coat (With feathers backed and breasted) By patriots invested. "It is your duty," cried the crowd, "Your ballot true to cast For the man o' your choice." He humbly bowed, And explained his wicked past: "That's what I very gladly would have done, Dear patriots, but he has never run." Apperton Duke ** MANES MANES, n. The immortal parts of dead Greeks and Romans. They were in a state of dull discomfort until the bodies from which they had exhaled were buried and burned; and they seem not to have been particularly happy afterward. ** MANICHEISM MANICHEISM, n. The ancient Persian doctrine of an incessant warfare between Good and Evil. When Good gave up the fight the Persians joined the victorious Opposition. ** MANNA MANNA, n. A food miraculously given to the Israelites in the wilderness. When it was no longer supplied to them they settled down and tilled the soil, fertilizing it, as a rule, with the bodies of the original occupants. ** MARRIAGE MARRIAGE, n. The state or condition of a community consisting of a master, a mistress and two slaves, making in all, two. ** MARTYR MARTYR, n. One who moves along the line of least reluctance to a desired death. ** MATERIAL MATERIAL, adj. Having an actual existence, as distinguished from an imaginary one. Important. Material things I know, or fell, or see; All else is immaterial to me. Jamrach Holobom ** MAUSOLEUM MAUSOLEUM, n. The final and funniest folly of the rich. ** MAYONNAISE MAYONNAISE, n. One of the sauces which serve the French in place of a state religion. ** ME ME, pro. The objectionable case of I. The personal pronoun in English has three cases, the dominative, the objectionable and the oppressive. Each is all three. ** MEANDER MEANDER, n. To proceed sinuously and aimlessly. The word is the ancient name of a river about one hundred and fifty miles south of Troy, which turned and twisted in the effort to get out of hearing when the Greeks and Trojans boasted of their prowess. ** MEDAL MEDAL, n. A small metal disk given as a reward for virtues, attainments or services more or less authentic. It is related of Bismark, who had been awarded a medal for gallantly rescuing a drowning person, that, being asked the meaning of the medal, he replied: "I save lives sometimes." And sometimes he didn't. ** MEDICINE MEDICINE, n. A stone flung down the Bowery to kill a dog in Broadway. ** MEEKNESS MEEKNESS, n. Uncommon patience in planning a revenge that is worth while. M is for Moses, Who slew the Egyptian. As sweet as a rose is The meekness of Moses. No monument shows his Post-mortem inscription, But M is for Moses Who slew the Egyptian. _The Biographical Alphabet_ ** MEERSCHAUM MEERSCHAUM, n. (Literally, seafoam, and by many erroneously supposed to be made of it.) A fine white clay, which for convenience in coloring it brown is made into tobacco pipes and smoked by the workmen engaged in that industry. The purpose of coloring it has not been disclosed by the manufacturers. There was a youth (you've heard before, This woeful tale, may be), Who bought a meerschaum pipe and swore That color it would he! He shut himself from the world away, Nor any soul he saw. He smoke by night, he smoked by day, As hard as he could draw. His dog died moaning in the wrath Of winds that blew aloof; The weeds were in the gravel path, The owl was on the roof. "He's gone afar, he'll come no more," The neighbors sadly say. And so they batter in the door To take his goods away. Dead, pipe in mouth, the youngster lay, Nut-brown in face and limb. "That pipe's a lovely white," they say, "But it has colored him!" The moral there's small need to sing -- 'Tis plain as day to you: Don't play your game on any thing That is a gamester too. Martin Bulstrode ** MENDACIOUS MENDACIOUS, adj. Addicted to rhetoric. ** MERCHANT MERCHANT, n. One engaged in a commercial pursuit. A commercial pursuit is one in which the thing pursued is a dollar. ** MERCY MERCY, n. An attribute beloved of detected offenders. ** MESMERISM MESMERISM, n. Hypnotism before it wore good clothes, kept a carriage and asked Incredulity to dinner. ** METROPOLIS METROPOLIS, n. A stronghold of provincialism. ** MILLENNIUM MILLENNIUM, n. The period of a thousand years when the lid is to be screwed down, with all reformers on the under side. ** MIND MIND, n. A mysterious form of matter secreted by the brain. Its chief activity consists in the endeavor to ascertain its own nature, the futility of the attempt being due to the fact that it has nothing but itself to know itself with. From the Latin _mens_, a fact unknown to that honest shoe-seller, who, observing that his learned competitor over the way had displayed the motto "_Mens conscia recti_," emblazoned his own front with the words "Men's, women's and children's conscia recti." ** MINE MINE, adj. Belonging to me if I can hold or seize it. ** MINISTER MINISTER, n. An agent of a higher power with a lower responsibility. In diplomacy and officer sent into a foreign country as the visible embodiment of his sovereign's hostility. His principal qualification is a degree of plausible inveracity next below that of an ambassador. ** MINOR MINOR, adj. Less objectionable. ** MINSTREL MINSTREL, adj. Formerly a poet, singer or musician; now a nigger with a color less than skin deep and a humor more than flesh and blood can bear. ** MIRACLE MIRACLE, n. An act or event out of the order of nature and unaccountable, as beating a normal hand of four kings and an ace with four aces and a king. ** MISCREANT MISCREANT, n. A person of the highest degree of unworth. Etymologically, the word means unbeliever, and its present signification may be regarded as theology's noblest contribution to the development of our language. ** MISDEMEANOR MISDEMEANOR, n. An infraction of the law having less dignity than a felony and constituting no claim to admittance into the best criminal society. By misdemeanors he essays to climb Into the aristocracy of crime. O, woe was him! -- with manner chill and grand "Captains of industry" refused his hand, "Kings of finance" denied him recognition And "railway magnates" jeered his low condition. He robbed a bank to make himself respected. They still rebuffed him, for he was detected. S.V. Hanipur ** MISERICORDE MISERICORDE, n. A dagger which in mediaeval warfare was used by the foot soldier to remind an unhorsed knight that he was mortal. ** MISFORTUNE MISFORTUNE, n. The kind of fortune that never misses. ** MISS MISS, n. The title with which we brand unmarried women to indicate that they are in the market. Miss, Missis (Mrs.) and Mister (Mr.) are the three most distinctly disagreeable words in the language, in sound and sense. Two are corruptions of Mistress, the other of Master. In the general abolition of social titles in this our country they miraculously escaped to plague us. If we must have them let us be consistent and give one to the unmarried man. I venture to suggest Mush, abbreviated to Mh. ** MOLECULE MOLECULE, n. The ultimate, indivisible unit of matter. It is distinguished from the corpuscle, also the ultimate, indivisible unit of matter, by a closer resemblance to the atom, also the ultimate, indivisible unit of matter. Three great scientific theories of the structure of the universe are the molecular, the corpuscular and the atomic. A fourth affirms, with Haeckel, the condensation of precipitation of matter from ether -- whose existence is proved by the condensation of precipitation. The present trend of scientific thought is toward the theory of ions. The ion differs from the molecule, the corpuscle and the atom in that it is an ion. A fifth theory is held by idiots, but it is doubtful if they know any more about the matter than the others. ** MONAD MONAD, n. The ultimate, indivisible unit of matter. (See _Molecule_.) According to Leibnitz, as nearly as he seems willing to be understood, the monad has body without bulk, and mind without manifestation -- Leibnitz knows him by the innate power of considering. He has founded upon him a theory of the universe, which the creature bears without resentment, for the monad is a gentlmean. Small as he is, the monad contains all the powers and possibilities needful to his evolution into a German philosopher of the first class -- altogether a very capable little fellow. He is not to be confounded with the microbe, or bacillus; by its inability to discern him, a good microscope shows him to be of an entirely distinct species. ** MONARCH MONARCH, n. A person engaged in reigning. Formerly the monarch ruled, as the derivation of the word attests, and as many subjects have had occasion to learn. In Russia and the Orient the monarch has still a considerable influence in public affairs and in the disposition of the human head, but in western Europe political administration is mostly entrusted to his ministers, he being somewhat preoccupied with reflections relating to the status of his own head. ** MONARCHICAL GOVERNMENT MONARCHICAL GOVERNMENT, n. Government. ** MONDAY MONDAY, n. In Christian countries, the day after the baseball game. ** MONEY MONEY, n. A blessing that is of no advantage to us excepting when we part with it. An evidence of culture and a passport to polite society. Supportable property. ** MONKEY MONKEY, n. An arboreal animal which makes itself at home in genealogical trees. ** MONOSYLLABIC MONOSYLLABIC, adj. Composed of words of one syllable, for literary babes who never tire of testifying their delight in the vapid compound by appropriate googoogling. The words are commonly Saxon -- that is to say, words of a barbarous people destitute of ideas and incapable of any but the most elementary sentiments and emotions. The man who writes in Saxon Is the man to use an ax on Judibras ** MONSIGNOR MONSIGNOR, n. A high ecclesiastical title, of which the Founder of our religion overlooked the advantages. ** MONUMENT MONUMENT, n. A structure intended to commemorate something which either needs no commemoration or cannot be commemorated. The bones of Agammemnon are a show, And ruined is his royal monument, but Agammemnon's fame suffers no diminution in consequence. The monument custom has its _reductiones ad absurdum_ in monuments "to the unknown dead" -- that is to say, monuments to perpetuate the memory of those who have left no memory. ** MORAL MORAL, adj. Conforming to a local and mutable standard of right. Having the quality of general expediency. It is sayd there be a raunge of mountaynes in the Easte, on one syde of the which certayn conducts are immorall, yet on the other syde they are holden in good esteeme; wherebye the mountayneer is much conveenyenced, for it is given to him to goe downe eyther way and act as it shall suite his moode, withouten offence. _Gooke's Meditations_ ** MORE MORE, adj. The comparative degree of too much. ** MOUSE MOUSE, n. An animal which strews its path with fainting women. As in Rome Christians were thrown to the lions, so centuries earlier in Otumwee, the most ancient and famous city of the world, female heretics were thrown to the mice. Jakak-Zotp, the historian, the only Otumwump whose writings have descended to us, says that these martyrs met their death with little dignity and much exertion. He even attempts to exculpate the mice (such is the malice of bigotry) by declaring that the unfortunate women perished, some from exhaustion, some of broken necks from falling over their own feet, and some from lack of restoratives. The mice, he avers, enjoyed the pleasures of the chase with composure. But if "Roman history is nine-tenths lying," we can hardly expect a smaller proportion of that rhetorical figure in the annals of a people capable of so incredible cruelty to a lovely women; for a hard heart has a false tongue. ** MOUSQUETAIRE MOUSQUETAIRE, n. A long glove covering a part of the arm. Worn in New Jersey. But "mousquetaire" is a might poor way to spell muskeeter. ** MOUTH MOUTH, n. In man, the gateway to the soul; in woman, the outlet of the heart. ** MUGWUMP MUGWUMP, n. In politics one afflicted with self-respect and addicted to the vice of independence. A term of contempt. ** MULATTO MULATTO, n. A child of two races, ashamed of both. ** MULTITUDE MULTITUDE, n. A crowd; the source of political wisdom and virtue. In a republic, the object of the statesman's adoration. "In a multitude of consellors there is wisdom," saith the proverb. If many men of equal individual wisdom are wiser than any one of them, it must be that they acquire the excess of wisdom by the mere act of getting together. Whence comes it? Obviously from nowhere -- as well say that a range of mountains is higher than the single mountains composing it. A multitude is as wise as its wisest member if it obey him; if not, it is no wiser than its most foolish. ** MUMMY MUMMY, n. An ancient Egyptian, formerly in universal use among modern civilized nations as medicine, and now engaged in supplying art with an excellent pigment. He is handy, too, in museums in gratifying the vulgar curiosity that serves to distinguish man from the lower animals. By means of the Mummy, mankind, it is said, Attests to the gods its respect for the dead. We plunder his tomb, be he sinner or saint, Distil him for physic and grind him for paint, Exhibit for money his poor, shrunken frame, And with levity flock to the scene of the shame. O, tell me, ye gods, for the use of my rhyme: For respecting the dead what's the limit of time? Scopas Brune ** MUSTANG MUSTANG, n. An indocile horse of the western plains. In English society, the American wife of an English nobleman. ** MYRMIDON MYRMIDON, n. A follower of Achilles -- particularly when he didn't lead. ** MYTHOLOGY MYTHOLOGY, n. The body of a primitive people's beliefs concerning its origin, early history, heroes, deities and so forth, as distinguished from the true accounts which it invents later. N ** NECTAR NECTAR, n. A drink served at banquets of the Olympian deities. The secret of its preparation is lost, but the modern Kentuckians believe that they come pretty near to a knowledge of its chief ingredient. Juno drank a cup of nectar, But the draught did not affect her. Juno drank a cup of rye -- Then she bad herself good-bye. J.G. ** NEGRO NEGRO, n. The _piece de resistance_ in the American political problem. Representing him by the letter n, the Republicans begin to build their equation thus: "Let n = the white man." This, however, appears to give an unsatisfactory solution. ** NEIGHBOR NEIGHBOR, n. One whom we are commanded to love as ourselves, and who does all he knows how to make us disobedient. ** NEPOTISM NEPOTISM, n. Appointing your grandmother to office for the good of the party. ** NEWTONIAN NEWTONIAN, adj. Pertaining to a philosophy of the universe invented by Newton, who discovered that an apple will fall to the ground, but was unable to say why. His successors and disciples have advanced so far as to be able to say when. ** NIHILIST NIHILIST, n. A Russian who denies the existence of anything but Tolstoi. The leader of the school is Tolstoi. ** NIRVANA NIRVANA, n. In the Buddhist religion, a state of pleasurable annihilation awarded to the wise, particularly to those wise enough to understand it. ** NOBLEMAN NOBLEMAN, n. Nature's provision for wealthy American minds ambitious to incur social distinction and suffer high life. ** NOISE NOISE, n. A stench in the ear. Undomesticated music. The chief product and authenticating sign of civilization. ** NOMINATE NOMINATE, v. To designate for the heaviest political assessment. To put forward a suitable person to incur the mudgobbling and deadcatting of the opposition. ** NOMINEE NOMINEE, n. A modest gentleman shrinking from the distinction of private life and diligently seeking the honorable obscurity of public office. ** NON-COMBATANT NON-COMBATANT, n. A dead Quaker. ** NONSENSE NONSENSE, n. The objections that are urged against this excellent dictionary. ** NOSE NOSE, n. The extreme outpost of the face. From the circumstance that great conquerors have great noses, Getius, whose writings antedate the age of humor, calls the nose the organ of quell. It has been observed that one's nose is never so happy as when thrust into the affairs of others, from which some physiologists have drawn the inference that the nose is devoid of the sense of smell. There's a man with a Nose, And wherever he goes The people run from him and shout: "No cotton have we For our ears if so be He blow that interminous snout!" So the lawyers applied For injunction. "Denied," Said the Judge: "the defendant prefixion, Whate'er it portend, Appears to transcend The bounds of this court's jurisdiction." Arpad Singiny ** NOTORIETY NOTORIETY, n. The fame of one's competitor for public honors. The kind of renown most accessible and acceptable to mediocrity. A Jacob's-ladder leading to the vaudeville stage, with angels ascending and descending. ** NOUMENON NOUMENON, n. That which exists, as distinguished from that which merely seems to exist, the latter being a phenomenon. The noumenon is a bit difficult to locate; it can be apprehended only be a process of reasoning -- which is a phenomenon. Nevertheless, the discovery and exposition of noumena offer a rich field for what Lewes calls "the endless variety and excitement of philosophic thought." Hurrah (therefore) for the noumenon! ** NOVEL NOVEL, n. A short story padded. A species of composition bearing the same relation to literature that the panorama bears to art. As it is too long to be read at a sitting the impressions made by its successive parts are successively effaced, as in the panorama. Unity, totality of effect, is impossible; for besides the few pages last read all that is carried in mind is the mere plot of what has gone before. To the romance the novel is what photography is to painting. Its distinguishing principle, probability, corresponds to the literal actuality of the photograph and puts it distinctly into the category of reporting; whereas the free wing of the romancer enables him to mount to such altitudes of imagination as he may be fitted to attain; and the first three essentials of the literary art are imagination, imagination and imagination. The art of writing novels, such as it was, is long dead everywhere except in Russia, where it is new. Peace to its ashes -- some of which have a large sale. ** NOVEMBER NOVEMBER, n. The eleventh twelfth of a weariness. O ** OATH OATH, n. In law, a solemn appeal to the Deity, made binding upon the conscience by a penalty for perjury. ** OBLIVION OBLIVION, n. The state or condition in which the wicked cease from struggling and the dreary are at rest. Fame's eternal dumping ground. Cold storage for high hopes. A place where ambitious authors meet their works without pride and their betters without envy. A dormitory without an alarm clock. ** OBSERVATORY OBSERVATORY, n. A place where astronomers conjecture away the guesses of their predecessors. ** OBSESSED OBSESSED, p.p. Vexed by an evil spirit, like the Gadarene swine and other critics. Obsession was once more common than it is now. Arasthus tells of a peasant who was occupied by a different devil for every day in the week, and on Sundays by two. They were frequently seen, always walking in his shadow, when he had one, but were finally driven away by the village notary, a holy man; but they took the peasant with them, for he vanished utterly. A devil thrown out of a woman by the Archbishop of Rheims ran through the trees, pursued by a hundred persons, until the open country was reached, where by a leap higher than a church spire he escaped into a bird. A chaplain in Cromwell's army exorcised a soldier's obsessing devil by throwing the soldier into the water, when the devil came to the surface. The soldier, unfortunately, did not. ** OBSOLETE OBSOLETE, adj. No longer used by the timid. Said chiefly of words. A word which some lexicographer has marked obsolete is ever thereafter an object of dread and loathing to the fool writer, but if it is a good word and has no exact modern equivalent equally good, it is good enough for the good writer. Indeed, a writer's attitude toward "obsolete" words is as true a measure of his literary ability as anything except the character of his work. A dictionary of obsolete and obsolescent words would not only be singularly rich in strong and sweet parts of speech; it would add large possessions to the vocabulary of every competent writer who might not happen to be a competent reader. ** OBSTINATE OBSTINATE, adj. Inaccessible to the truth as it is manifest in the splendor and stress of our advocacy. The popular type and exponent of obstinacy is the mule, a most intelligent animal. ** OCCASIONAL OCCASIONAL, adj. Afflicting us with greater or less frequency. That, however, is not the sense in which the word is used in the phrase "occasional verses," which are verses written for an "occasion," such as an anniversary, a celebration or other event. True, they afflict us a little worse than other sorts of verse, but their name has no reference to irregular recurrence. ** OCCIDENT OCCIDENT, n. The part of the world lying west (or east) of the Orient. It is largely inhabited by Christians, a powerful subtribe of the Hypocrites, whose principal industries are murder and cheating, which they are pleased to call "war" and "commerce." These, also, are the principal industries of the Orient. ** OCEAN OCEAN, n. A body of water occupying about two-thirds of a world made for man -- who has no gills. ** OFFENSIVE OFFENSIVE, adj. Generating disagreeable emotions or sensations, as the advance of an army against its enemy. "Were the enemy's tactics offensive?" the king asked. "I should say so!" replied the unsuccessful general. "The blackguard wouldn't come out of his works!" ** OLD OLD, adj. In that stage of usefulness which is not inconsistent with general inefficiency, as an _old man_. Discredited by lapse of time and offensive to the popular taste, as an _old_ book. "Old books? The devil take them!" Goby said. "Fresh every day must be my books and bread." Nature herself approves the Goby rule And gives us every moment a fresh fool. Harley Shum ** OLEAGINOUS OLEAGINOUS, adj. Oily, smooth, sleek. Disraeli once described the manner of Bishop Wilberforce as "unctuous, oleaginous, saponaceous." And the good prelate was ever afterward known as Soapy Sam. For every man there is something in the vocabulary that would stick to him like a second skin. His enemies have only to find it. ** OLYMPIAN OLYMPIAN, adj. Relating to a mountain in Thessaly, once inhabited by gods, now a repository of yellowing newspapers, beer bottles and mutilated sardine cans, attesting the presence of the tourist and his appetite. His name the smirking tourist scrawls Upon Minerva's temple walls, Where thundered once Olympian Zeus, And marks his appetite's abuse. Averil Joop ** OMEN OMEN, n. A sign that something will happen if nothing happens. ** ONCE ONCE, adv. Enough. ** OPERA OPERA, n. A play representing life in another world, whose inhabitants have no speech but song, no motions but gestures and no postures but attitudes. All acting is simulation, and the word _simulation_ is from _simia_, an ape; but in opera the actor takes for his model _Simia audibilis_ (or _Pithecanthropos stentor_) -- the ape that howls. The actor apes a man -- at least in shape; The opera performer apes and ape. ** OPIATE OPIATE, n. An unlocked door in the prison of Identity. It leads into the jail yard. ** OPPORTUNITY OPPORTUNITY, n. A favorable occasion for grasping a disappointment. ** OPPOSE OPPOSE, v. To assist with obstructions and objections. How lonely he who thinks to vex With bandinage the Solemn Sex! Of levity, Mere Man, beware; None but the Grave deserve the Unfair. Percy P. Orminder ** OPPOSITION OPPOSITION, n. In politics the party that prevents the Government from running amuck by hamstringing it. The King of Ghargaroo, who had been abroad to study the science of government, appointed one hundred of his fattest subjects as members of a parliament to make laws for the collection of revenue. Forty of these he named the Party of Opposition and had his Prime Minister carefully instruct them in their duty of opposing every royal measure. Nevertheless, the first one that was submitted passed unanimously. Greatly displeased, the King vetoed it, informing the Opposition that if they did that again they would pay for their obstinacy with their heads. The entire forty promptly disemboweled themselves. "What shall we do now?" the King asked. "Liberal institutions cannot be maintained without a party of Opposition." "Splendor of the universe," replied the Prime Minister, "it is true these dogs of darkness have no longer their credentials, but all is not lost. Leave the matter to this worm of the dust." So the Minister had the bodies of his Majesty's Opposition embalmed and stuffed with straw, put back into the seats of power and nailed there. Forty votes were recorded against every bill and the nation prospered. But one day a bill imposing a tax on warts was defeated -- the members of the Government party had not been nailed to their seats! This so enraged the King that the Prime Minister was put to death, the parliament was dissolved with a battery of artillery, and government of the people, by the people, for the people perished from Ghargaroo. ** OPTIMISM OPTIMISM, n. The doctrine, or belief, that everything is beautiful, including what is ugly, everything good, especially the bad, and everything right that is wrong. It is held with greatest tenacity by those most accustomed to the mischance of falling into adversity, and is most acceptably expounded with the grin that apes a smile. Being a blind faith, it is inaccessible to the light of disproof -- an intellectual disorder, yielding to no treatment but death. It is hereditary, but fortunately not contagious. ** OPTIMIST OPTIMIST, n. A proponent of the doctrine that black is white. A pessimist applied to God for relief. "Ah, you wish me to restore your hope and cheerfulness," said God. "No," replied the petitioner, "I wish you to create something that would justify them." "The world is all created," said God, "but you have overlooked something -- the mortality of the optimist." ** ORATORY ORATORY, n. A conspiracy between speech and action to cheat the understanding. A tyranny tempered by stenography. ** ORPHAN ORPHAN, n. A living person whom death has deprived of the power of filial ingratitude -- a privation appealing with a particular eloquence to all that is sympathetic in human nature. When young the orphan is commonly sent to an asylum, where by careful cultivation of its rudimentary sense of locality it is taught to know its place. It is then instructed in the arts of dependence and servitude and eventually turned loose to prey upon the world as a bootblack or scullery maid. ** ORTHODOX ORTHODOX, n. An ox wearing the popular religious joke. ** ORTHOGRAPHY ORTHOGRAPHY, n. The science of spelling by the eye instead of the ear. Advocated with more heat than light by the outmates of every asylum for the insane. They have had to concede a few things since the time of Chaucer, but are none the less hot in defence of those to be conceded hereafter. A spelling reformer indicted For fudge was before the court cicted. The judge said: "Enough -- His candle we'll snough, And his sepulchre shall not be whicted." ** OSTRICH OSTRICH, n. A large bird to which (for its sins, doubtless) nature has denied that hinder toe in which so many pious naturalists have seen a conspicuous evidence of design. The absence of a good working pair of wings is no defect, for, as has been ingeniously pointed out, the ostrich does not fly. ** OTHERWISE OTHERWISE, adv. No better. ** OUTCOME OUTCOME, n. A particular type of disappointment. By the kind of intelligence that sees in an exception a proof of the rule the wisdom of an act is judged by the outcome, the result. This is immortal nonsense; the wisdom of an act is to be juded by the light that the doer had when he performed it. ** OUTDO OUTDO, v.t. To make an enemy. ** OUT-OF-DOORS OUT-OF-DOORS, n. That part of one's environment upon which no government has been able to collect taxes. Chiefly useful to inspire poets. I climbed to the top of a mountain one day To see the sun setting in glory, And I thought, as I looked at his vanishing ray, Of a perfectly splendid story. 'Twas about an old man and the ass he bestrode Till the strength of the beast was o'ertested; Then the man would carry him miles on the road Till Neddy was pretty well rested. The moon rising solemnly over the crest Of the hills to the east of my station Displayed her broad disk to the darkening west Like a visible new creation. And I thought of a joke (and I laughed till I cried) Of an idle young woman who tarried About a church-door for a look at the bride, Although 'twas herself that was married. To poets all Nature is pregnant with grand Ideas -- with thought and emotion. I pity the dunces who don't understand The speech of earth, heaven and ocean. Stromboli Smith ** OVATION OVATION, n. n ancient Rome, a definite, formal pageant in honor of one who had been disserviceable to the enemies of the nation. A lesser "triumph." In modern English the word is improperly used to signify any loose and spontaneous expression of popular homage to the hero of the hour and place. "I had an ovation!" the actor man said, But I thought it uncommonly queer, That people and critics by him had been led By the ear. The Latin lexicon makes his absurd Assertion as plain as a peg; In "ovum" we find the true root of the word. It means egg. Dudley Spink ** OVEREAT OVEREAT, v. To dine. Hail, Gastronome, Apostle of Excess, Well skilled to overeat without distress! Thy great invention, the unfatal feast, Shows Man's superiority to Beast. John Boop ** OVERWORK OVERWORK, n. A dangerous disorder affecting high public functionaries who want to go fishing. ** OWE OWE, v. To have (and to hold) a debt. The word formerly signified not indebtedness, but possession; it meant "own," and in the minds of debtors there is still a good deal of confusion between assets and liabilities. ** OYSTER OYSTER, n. A slimy, gobby shellfish which civilization gives men the hardihood to eat without removing its entrails! The shells are sometimes given to the poor. P ** PAIN PAIN, n. An uncomfortable frame of mind that may have a physical basis in something that is being done to the body, or may be purely mental, caused by the good fortune of another. ** PAINTING PAINTING, n. The art of protecting flat surfaces from the weather and exposing them to the critic. Formerly, painting and sculpture were combined in the same work: the ancients painted their statues. The only present alliance between the two arts is that the modern painter chisels his patrons. ** PALACE PALACE, n. A fine and costly residence, particularly that of a great official. The residence of a high dignitary of the Christian Church is called a palace; that of the Founder of his religion was known as a field, or wayside. There is progress. ** PALM PALM, n. A species of tree having several varieties, of which the familiar "itching palm" (_Palma hominis_) is most widely distributed and sedulously cultivated. This noble vegetable exudes a kind of invisible gum, which may be detected by applying to the bark a piece of gold or silver. The metal will adhere with remarkable tenacity. The fruit of the itching palm is so bitter and unsatisfying that a considerable percentage of it is sometimes given away in what are known as "benefactions." ** PALMISTRY PALMISTRY, n. The 947th method (according to Mimbleshaw's classification) of obtaining money by false pretences. It consists in "reading character" in the wrinkles made by closing the hand. The pretence is not altogether false; character can really be read very accurately in this way, for the wrinkles in every hand submitted plainly spell the word "dupe." The imposture consists in not reading it aloud. ** PANDEMONIUM PANDEMONIUM, n. Literally, the Place of All the Demons. Most of them have escaped into politics and finance, and the place is now used as a lecture hall by the Audible Reformer. When disturbed by his voice the ancient echoes clamor appropriate responses most gratifying to his pride of distinction. ** PANTALOONS PANTALOONS, n. A nether habiliment of the adult civilized male. The garment is tubular and unprovided with hinges at the points of flexion. Supposed to have been invented by a humorist. Called "trousers" by the enlightened and "pants" by the unworthy. ** PANTHEISM PANTHEISM, n. The doctrine that everything is God, in contradistinction to the doctrine that God is everything. ** PANTOMIME PANTOMIME, n. A play in which the story is told without violence to the language. The least disagreeable form of dramatic action. ** PARDON PARDON, v. To remit a penalty and restore to the life of crime. To add to the lure of crime the temptation of ingratitude. ** PASSPORT PASSPORT, n. A document treacherously inflicted upon a citizen going abroad, exposing him as an alien and pointing him out for special reprobation and outrage. ** PAST PAST, n. That part of Eternity with some small fraction of which we have a slight and regrettable acquaintance. A moving line called the Present parts it from an imaginary period known as the Future. These two grand divisions of Eternity, of which the one is continually effacing the other, are entirely unlike. The one is dark with sorrow and disappointment, the other bright with prosperity and joy. The Past is the region of sobs, the Future is the realm of song. In the one crouches Memory, clad in sackcloth and ashes, mumbling penitential prayer; in the sunshine of the other Hope flies with a free wing, beckoning to temples of success and bowers of ease. Yet the Past is the Future of yesterday, the Future is the Past of to-morrow. They are one -- the knowledge and the dream. ** PASTIME PASTIME, n. A device for promoting dejection. Gentle exercise for intellectual debility. ** PATIENCE PATIENCE, n. A minor form of despair, disguised as a virtue. ** PATRIOT PATRIOT, n. One to whom the interests of a part seem superior to those of the whole. The dupe of statesmen and the tool of conquerors. ** PATRIOTISM PATRIOTISM, n. Combustible rubbish read to the torch of any one ambitious to illuminate his name. In Dr. Johnson's famous dictionary patriotism is defined as the last resort of a scoundrel. With all due respect to an enlightened but inferior lexicographer I beg to submit that it is the first. ** PEACE PEACE, n. In international affairs, a period of cheating between two periods of fighting. O, what's the loud uproar assailing Mine ears without cease? 'Tis the voice of the hopeful, all-hailing The horrors of peace. Ah, Peace Universal; they woo it -- Would marry it, too. If only they knew how to do it 'Twere easy to do. They're working by night and by day On their problem, like moles. Have mercy, O Heaven, I pray, On their meddlesome souls! Ro Amil ** PEDESTRIAN PEDESTRIAN, n. The variable (an audible) part of the roadway for an automobile. ** PEDIGREE PEDIGREE, n. The known part of the route from an arboreal ancestor with a swim bladder to an urban descendant with a cigarette. ** PENITENT PENITENT, adj. Undergoing or awaiting punishment. ** PERFECTION PERFECTION, n. An imaginary state of quality distinguished from the actual by an element known as excellence; an attribute of the critic. The editor of an English magazine having received a letter pointing out the erroneous nature of his views and style, and signed "Perfection," promptly wrote at the foot of the letter: "I don't agree with you," and mailed it to Matthew Arnold. ** PERIPATETIC PERIPATETIC, adj. Walking about. Relating to the philosophy of Aristotle, who, while expounding it, moved from place to place in order to avoid his pupil's objections. A needless precaution -- they knew no more of the matter than he. ** PERORATION PERORATION, n. The explosion of an oratorical rocket. It dazzles, but to an observer having the wrong kind of nose its most conspicuous peculiarity is the smell of the several kinds of powder used in preparing it. ** PERSEVERANCE PERSEVERANCE, n. A lowly virtue whereby mediocrity achieves an inglorious success. "Persevere, persevere!" cry the homilists all, Themselves, day and night, persevering to bawl. "Remember the fable of tortoise and hare -- The one at the goal while the other is -- where?" Why, back there in Dreamland, renewing his lease Of life, all his muscles preserving the peace, The goal and the rival forgotten alike, And the long fatigue of the needless hike. His spirit a-squat in the grass and the dew Of the dogless Land beyond the Stew, He sleeps, like a saint in a holy place, A winner of all that is good in a race. Sukker Uffro ** PESSIMISM PESSIMISM, n. A philosophy forced upon the convictions of the observer by the disheartening prevalence of the optimist with his scarecrow hope and his unsightly smile. ** PHILANTHROPIST PHILANTHROPIST, n. A rich (and usually bald) old gentleman who has trained himself to grin while his conscience is picking his pocket. ** PHILISTINE PHILISTINE, n. One whose mind is the creature of its environment, following the fashion in thought, feeling and sentiment. He is sometimes learned, frequently prosperous, commonly clean and always solemn. ** PHILOSOPHY PHILOSOPHY, n. A route of many roads leading from nowhere to nothing. ** PHOENIX PHOENIX, n. The classical prototype of the modern "small hot bird." ** PHONOGRAPH PHONOGRAPH, n. An irritating toy that restores life to dead noises. ** PHOTOGRAPH PHOTOGRAPH, n. A picture painted by the sun without instruction in art. It is a little better than the work of an Apache, but not quite so good as that of a Cheyenne. ** PHRENOLOGY PHRENOLOGY, n. The science of picking the pocket through the scalp. It consists in locating and exploiting the organ that one is a dupe with. ** PHYSICIAN PHYSICIAN, n. One upon whom we set our hopes when ill and our dogs when well. ** PHYSIOGNOMY PHYSIOGNOMY, n. The art of determining the character of another by the resemblances and differences between his face and our own, which is the standard of excellence. "There is no art," says Shakespeare, foolish man, "To read the mind's construction in the face." The physiognomists his portrait scan, And say: "How little wisdom here we trace! He knew his face disclosed his mind and heart, So, in his own defence, denied our art." Lavatar Shunk ** PIANO PIANO, n. A parlor utensil for subduing the impenitent visitor. It is operated by pressing the keys of the machine and the spirits of the audience. ** PICKANINNY PICKANINNY, n. The young of the _Procyanthropos_, or _Americanus dominans_. It is small, black and charged with political fatalities. ** PICTURE PICTURE, n. A representation in two dimensions of something wearisome in three. "Behold great Daubert's picture here on view -- Taken from Life." If that description's true, Grant, heavenly Powers, that I be taken, too. Jali Hane ** PIE PIE, n. An advance agent of the reaper whose name is Indigestion. Cold pie was highly esteemed by the remains. Rev. Dr. Mucker (in a funeral sermon over a British nobleman) Cold pie is a detestable American comestible. That's why I'm done -- or undone -- So far from that dear London. (from the headstone of a British nobleman in Kalamazoo) ** PIETY PIETY, n. Reverence for the Supreme Being, based upon His supposed resemblance to man. The pig is taught by sermons and epistles To think the God of Swine has snout and bristles. Judibras ** PIG PIG, n. An animal (_Porcus omnivorus_) closely allied to the human race by the splendor and vivacity of its appetite, which, however, is inferior in scope, for it sticks at pig. ** PIGMY PIGMY, n. One of a tribe of very small men found by ancient travelers in many parts of the world, but by modern in Central Africa only. The Pigmies are so called to distinguish them from the bulkier Caucasians -- who are Hogmies. ** PILGRIM PILGRIM, n. A traveler that is taken seriously. A Pilgrim Father was one who, leaving Europe in 1620 because not permitted to sing psalms through his nose, followed it to Massachusetts, where he could personate God according to the dictates of his conscience. ** PILLORY PILLORY, n. A mechanical device for inflicting personal distinction -- prototype of the modern newspaper conducted by persons of austere virtues and blameless lives. ** PIRACY PIRACY, n. Commerce without its folly-swaddles, just as God made it. ** PITIFUL PITIFUL, adj. The state of an enemy of opponent after an imaginary encounter with oneself. ** PITY PITY, n. A failing sense of exemption, inspired by contrast. ** PLAGIARISM PLAGIARISM, n. A literary coincidence compounded of a discreditable priority and an honorable subsequence. ** PLAGIARIZE PLAGIARIZE, v. To take the thought or style of another writer whom one has never, never read. ** PLAGUE PLAGUE, n. In ancient times a general punishment of the innocent for admonition of their ruler, as in the familiar instance of Pharaoh the Immune. The plague as we of to-day have the happiness to know it is merely Nature's fortuitous manifestation of her purposeless objectionableness. ** PLAN PLAN, v.t. To bother about the best method of accomplishing an accidental result. ** PLATITUDE PLATITUDE, n. The fundamental element and special glory of popular literature. A thought that snores in words that smoke. The wisdom of a million fools in the diction of a dullard. A fossil sentiment in artificial rock. A moral without the fable. All that is mortal of a departed truth. A demi-tasse of milk-and-mortality. The Pope's-nose of a featherless peacock. A jelly-fish withering on the shore of the sea of thought. The cackle surviving the egg. A desiccated epigram. ** PLATONIC PLATONIC, adj. Pertaining to the philosophy of Socrates. Platonic Love is a fool's name for the affection between a disability and a frost. ** PLAUDITS PLAUDITS, n. Coins with which the populace pays those who tickle and devour it. ** PLEASE PLEASE, v. To lay the foundation for a superstructure of imposition. ** PLEASURE PLEASURE, n. The least hateful form of dejection. ** PLEBEIAN PLEBEIAN, n. An ancient Roman who in the blood of his country stained nothing but his hands. Distinguished from the Patrician, who was a saturated solution. ** PLEBISCITE PLEBISCITE, n. A popular vote to ascertain the will of the sovereign. ** PLENIPOTENTIARY PLENIPOTENTIARY, adj. Having full power. A Minister Plenipotentiary is a diplomatist possessing absolute authority on condition that he never exert it. ** PLEONASM PLEONASM, n. An army of words escorting a corporal of thought. ** PLOW PLOW, n. An implement that cries aloud for hands accustomed to the pen. ** PLUNDER PLUNDER, v. To take the property of another without observing the decent and customary reticences of theft. To effect a change of ownership with the candid concomitance of a brass band. To wrest the wealth of A from B and leave C lamenting a vanishing opportunity. ** POCKET POCKET, n. The cradle of motive and the grave of conscience. In woman this organ is lacking; so she acts without motive, and her conscience, denied burial, remains ever alive, confessing the sins of others. ** POETRY POETRY, n. A form of expression peculiar to the Land beyond the Magazines. ** POKER POKER, n. A game said to be played with cards for some purpose to this lexicographer unknown. ** POLICE POLICE, n. An armed force for protection and participation. ** POLITENESS POLITENESS, n. The most acceptable hypocrisy. ** POLITICS POLITICS, n. A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage. ** POLITICIAN POLITICIAN, n. An eel in the fundamental mud upon which the superstructure of organized society is reared. When we wriggles he mistakes the agitation of his tail for the trembling of the edifice. As compared with the statesman, he suffers the disadvantage of being alive. ** POLYGAMY POLYGAMY, n. A house of atonement, or expiatory chapel, fitted with several stools of repentance, as distinguished from monogamy, which has but one. ** POPULIST POPULIST, n. A fossil patriot of the early agricultural period, found in the old red soapstone underlying Kansas; characterized by an uncommon spread of ear, which some naturalists contend gave him the power of flight, though Professors Morse and Whitney, pursuing independent lines of thought, have ingeniously pointed out that had he possessed it he would have gone elsewhere. In the picturesque speech of his period, some fragments of which have come down to us, he was known as "The Matter with Kansas." ** PORTABLE PORTABLE, adj. Exposed to a mutable ownership through vicissitudes of possession. His light estate, if neither he did make it Nor yet its former guardian forsake it, Is portable improperly, I take it. Worgum Slupsky ** PORTUGUESE PORTUGUESE, n.pl. A species of geese indigenous to Portugal. They are mostly without feathers and imperfectly edible, even when stuffed with garlic. ** POSITIVE POSITIVE, adj. Mistaken at the top of one's voice. ** POSITIVISM POSITIVISM, n. A philosophy that denies our knowledge of the Real and affirms our ignorance of the Apparent. Its longest exponent is Comte, its broadest Mill and its thickest Spencer. ** POSTERITY POSTERITY, n. An appellate court which reverses the judgment of a popular author's contemporaries, the appellant being his obscure competitor. ** POTABLE POTABLE, n. Suitable for drinking. Water is said to be potable; indeed, some declare it our natural beverage, although even they find it palatable only when suffering from the recurrent disorder known as thirst, for which it is a medicine. Upon nothing has so great and diligent ingenuity been brought to bear in all ages and in all countries, except the most uncivilized, as upon the invention of substitutes for water. To hold that this general aversion to that liquid has no basis in the preservative instinct of the race is to be unscientific -- and without science we are as the snakes and toads. ** POVERTY POVERTY, n. A file provided for the teeth of the rats of reform. The number of plans for its abolition equals that of the reformers who suffer from it, plus that of the philosophers who know nothing about it. Its victims are distinguished by possession of all the virtues and by their faith in leaders seeking to conduct them into a prosperity where they believe these to be unknown. ** PRAY PRAY, v. To ask that the laws of the universe be annulled in behalf of a single petitioner confessedly unworthy. ** PRE-ADAMITE PRE-ADAMITE, n. One of an experimental and apparently unsatisfactory race of antedated Creation and lived under conditions not easily conceived. Melsius believed them to have inhabited "the Void" and to have been something intermediate between fishes and birds. Little its known of them beyond the fact that they supplied Cain with a wife and theologians with a controversy. ** PRECEDENT PRECEDENT, n. In Law, a previous decision, rule or practice which, in the absence of a definite statute, has whatever force and authority a Judge may choose to give it, thereby greatly simplifying his task of doing as he pleases. As there are precedents for everything, he has only to ignore those that make against his interest and accentuate those in the line of his desire. Invention of the precedent elevates the trial-at-law from the low estate of a fortuitous ordeal to the noble attitude of a dirigible arbitrament. ** PRECEDENT PRECEDENT, n. In Law, a previous decision, rule or practice which, in the absence of a definite statute, has whatever force and authority a Judge may choose to give it, thereby greatly simplifying his task of doing as he pleases. As there are precedents for everything, he has only to ignore those that make against his interest and accentuate those in the line of his desire. Invention of the precedent elevates the trial-at-law from the low estate of a fortuitous ordeal to the noble attitude of a dirigible arbitrament. ** PRECIPITATE PRECIPITATE, adj. Anteprandial. Precipitate in all, this sinner Took action first, and then his dinner. Judibras ** PREDESTINATION PREDESTINATION, n. The doctrine that all things occur according to programme. This doctrine should not be confused with that of foreordination, which means that all things are programmed, but does not affirm their occurrence, that being only an implication from other doctrines by which this is entailed. The difference is great enough to have deluged Christendom with ink, to say nothing of the gore. With the distinction of the two doctrines kept well in mind, and a reverent belief in both, one may hope to escape perdition if spared. ** PREDICAMENT PREDICAMENT, n. The wage of consistency. ** PREDILECTION PREDILECTION, n. The preparatory stage of disillusion. ** PRE-EXISTENCE PRE-EXISTENCE, n. An unnoted factor in creation. ** PREFERENCE PREFERENCE, n. A sentiment, or frame of mind, induced by the erroneous belief that one thing is better than another. An ancient philosopher, expounding his conviction that life is no better than death, was asked by a disciple why, then, he did not die. "Because," he replied, "death is no better than life." It is longer. ** PREHISTORIC PREHISTORIC, adj. Belonging to an early period and a museum. Antedating the art and practice of perpetuating falsehood. He lived in a period prehistoric, When all was absurd and phantasmagoric. Born later, when Clio, celestial recorded, Set down great events in succession and order, He surely had seen nothing droll or fortuitous In anything here but the lies that she threw at us. Orpheus Bowen ** PREJUDICE PREJUDICE, n. A vagrant opinion without visible means of support. ** PRELATE PRELATE, n. A church officer having a superior degree of holiness and a fat preferment. One of Heaven's aristocracy. A gentleman of God. ** PREROGATIVE PREROGATIVE, n. A sovereign's right to do wrong. ** PRESBYTERIAN PRESBYTERIAN, n. One who holds the conviction that the government authorities of the Church should be called presbyters. ** PRESCRIPTION PRESCRIPTION, n. A physician's guess at what will best prolong the situation with least harm to the patient. ** PRESENT PRESENT, n. That part of eternity dividing the domain of disappointment from the realm of hope. ** PRESENTABLE PRESENTABLE, adj. Hideously appareled after the manner of the time and place. In Boorioboola-Gha a man is presentable on occasions of ceremony if he have his abdomen painted a bright blue and wear a cow's tail; in New York he may, if it please him, omit the paint, but after sunset he must wear two tails made of the wool of a sheep and dyed black. ** PRESIDE PRESIDE, v. To guide the action of a deliberative body to a desirable result. In Journalese, to perform upon a musical instrument; as, "He presided at the piccolo." The Headliner, holding the copy in hand, Read with a solemn face: "The music was very uncommonly grand -- The best that was every provided, For our townsman Brown presided At the organ with skill and grace." The Headliner discontinued to read, And, spread the paper down On the desk, he dashed in at the top of the screed: "Great playing by President Brown." Orpheus Bowen ** PRESIDENCY PRESIDENCY, n. The greased pig in the field game of American politics. ** PRESIDENT PRESIDENT, n. The leading figure in a small group of men of whom -- and of whom only -- it is positively known that immense numbers of their countrymen did not want any of them for President. If that's an honor surely 'tis a greater To have been a simple and undamned spectator. Behold in me a man of mark and note Whom no elector e'er denied a vote! -- An undiscredited, unhooted gent Who might, for all we know, be President By acclimation. Cheer, ye varlets, cheer -- I'm passing with a wide and open ear! Jonathan Fomry ** PREVARICATOR PREVARICATOR, n. A liar in the caterpillar estate. ** PRICE PRICE, n. Value, plus a reasonable sum for the wear and tear of conscience in demanding it. ** PRIMATE PRIMATE, n. The head of a church, especially a State church supported by involuntary contributions. The Primate of England is the Archbishop of Canterbury, an amiable old gentleman, who occupies Lambeth Palace when living and Westminster Abbey when dead. He is commonly dead. ** PRISON PRISON, n. A place of punishments and rewards. The poet assures us that -- "Stone walls do not a prison make," but a combination of the stone wall, the political parasite and the moral instructor is no garden of sweets. ** PRIVATE PRIVATE, n. A military gentleman with a field-marshal's baton in his knapsack and an impediment in his hope. ** PROBOSCIS PROBOSCIS, n. The rudimentary organ of an elephant which serves him in place of the knife-and-fork that Evolution has as yet denied him. For purposes of humor it is popularly called a trunk. Asked how he knew that an elephant was going on a journey, the illustrious Jo. Miller cast a reproachful look upon his tormentor, and answered, absently: "When it is ajar," and threw himself from a high promontory into the sea. Thus perished in his pride the most famous humorist of antiquity, leaving to mankind a heritage of woe! No successor worthy of the title has appeared, though Mr. Edward bok, of _The Ladies' Home Journal_, is much respected for the purity and sweetness of his personal character. ** PROJECTILE PROJECTILE, n. The final arbiter in international disputes. Formerly these disputes were settled by physical contact of the disputants, with such simple arguments as the rudimentary logic of the times could supply -- the sword, the spear, and so forth. With the growth of prudence in military affairs the projectile came more and more into favor, and is now held in high esteem by the most courageous. Its capital defect is that it requires personal attendance at the point of propulsion. ** PROOF PROOF, n. Evidence having a shade more of plausibility than of unlikelihood. The testimony of two credible witnesses as opposed to that of only one. ** PROOF-READER PROOF-READER, n. A malefactor who atones for making your writing nonsense by permitting the compositor to make it unintelligible. ** PROPERTY PROPERTY, n. Any material thing, having no particular value, that may be held by A against the cupidity of B. Whatever gratifies the passion for possession in one and disappoints it in all others. The object of man's brief rapacity and long indifference. ** PROPHECY PROPHECY, n. The art and practice of selling one's credibility for future delivery. ** PROSPECT PROSPECT, n. An outlook, usually forbidding. An expectation, usually forbidden. Blow, blow, ye spicy breezes -- O'er Ceylon blow your breath, Where every prospect pleases, Save only that of death. Bishop Sheber ** PROVIDENTIAL PROVIDENTIAL, adj. Unexpectedly and conspicuously beneficial to the person so describing it. ** PRUDE PRUDE, n. A bawd hiding behind the back of her demeanor. ** PUBLISH PUBLISH, n. In literary affairs, to become the fundamental element in a cone of critics. ** PUSH PUSH, n. One of the two things mainly conducive to success, especially in politics. The other is Pull. ** PYRRHONISM PYRRHONISM, n. An ancient philosophy, named for its inventor. It consisted of an absolute disbelief in everything but Pyrrhonism. Its modern professors have added that. Q ** QUEEN QUEEN, n. A woman by whom the realm is ruled when there is a king, and through whom it is ruled when there is not. ** QUILL QUILL, n. An implement of torture yielded by a goose and commonly wielded by an ass. This use of the quill is now obsolete, but its modern equivalent, the steel pen, is wielded by the same everlasting Presence. ** QUIVER QUIVER, n. A portable sheath in which the ancient statesman and the aboriginal lawyer carried their lighter arguments. He extracted from his quiver, Did the controversial Roman, An argument well fitted To the question as submitted, Then addressed it to the liver, Of the unpersuaded foeman. Oglum P. Boomp ** QUIXOTIC QUIXOTIC, adj. Absurdly chivalric, like Don Quixote. An insight into the beauty and excellence of this incomparable adjective is unhappily denied to him who has the misfortune to know that the gentleman's name is pronounced Ke-ho-tay. When ignorance from out of our lives can banish Philology, 'tis folly to know Spanish. Juan Smith ** QUORUM QUORUM, n. A sufficient number of members of a deliberative body to have their own way and their own way of having it. In the United States Senate a quorum consists of the chairman of the Committee on Finance and a messenger from the White House; in the House of Representatives, of the Speaker and the devil. ** QUOTATION QUOTATION, n. The act of repeating erroneously the words of another. The words erroneously repeated. Intent on making his quotation truer, He sought the page infallible of Brewer, Then made a solemn vow that we would be Condemned eternally. Ah, me, ah, me! Stumpo Gaker ** QUOTIENT QUOTIENT, n. A number showing how many times a sum of money belonging to one person is contained in the pocket of another -- usually about as many times as it can be got there. R ** RABBLE RABBLE, n. In a republic, those who exercise a supreme authority tempered by fraudulent elections. The rabble is like the sacred Simurgh, of Arabian fable -- omnipotent on condition that it do nothing. (The word is Aristocratese, and has no exact equivalent in our tongue, but means, as nearly as may be, "soaring swine.") ** RACK RACK, n. An argumentative implement formerly much used in persuading devotees of a false faith to embrace the living truth. As a call to the unconverted the rack never had any particular efficacy, and is now held in light popular esteem. ** RANK RANK, n. Relative elevation in the scale of human worth. He held at court a rank so high That other noblemen asked why. "Because," 'twas answered, "others lack His skill to scratch the royal back." Aramis Jukes ** RANSOM RANSOM, n. The purchase of that which neither belongs to the seller, nor can belong to the buyer. The most unprofitable of investments. ** RAPACITY RAPACITY, n. Providence without industry. The thrift of power. ** RAREBIT RAREBIT, n. A Welsh rabbit, in the speech of the humorless, who point out that it is not a rabbit. To whom it may be solemnly explained that the comestible known as toad-in-a-hole is really not a toad, and that _riz-de-veau a la financiere_ is not the smile of a calf prepared after the recipe of a she banker. ** RASCAL RASCAL, n. A fool considered under another aspect. ** RASCALITY RASCALITY, n. Stupidity militant. The activity of a clouded intellect. ** RASH RASH, adj. Insensible to the value of our advice. "Now lay your bet with mine, nor let These gamblers take your cash." "Nay, this child makes no bet." "Great snakes! How can you be so rash?" Bootle P. Gish ** RATIONAL RATIONAL, adj. Devoid of all delusions save those of observation, experience and reflection. ** RATTLESNAKE RATTLESNAKE, n. Our prostrate brother, _Homo ventrambulans_. ** RAZOR RAZOR, n. An instrument used by the Caucasian to enhance his beauty, by the Mongolian to make a guy of himself, and by the Afro-American to affirm his worth. ** REACH REACH, n. The radius of action of the human hand. The area within which it is possible (and customary) to gratify directly the propensity to provide. This is a truth, as old as the hills, That life and experience teach: The poor man suffers that keenest of ills, An impediment of his reach. G.J. ** READING READING, n. The general body of what one reads. In our country it consists, as a rule, of Indiana novels, short stories in "dialect" and humor in slang. We know by one's reading His learning and breeding; By what draws his laughter We know his Hereafter. Read nothing, laugh never -- The Sphinx was less clever! Jupiter Muke ** RADICALISM RADICALISM, n. The conservatism of to-morrow injected into the affairs of to-day. ** RADIUM RADIUM, n. A mineral that gives off heat and stimulates the organ that a scientist is a fool with. ** RAILROAD RAILROAD, n. The chief of many mechanical devices enabling us to get away from where we are to wher we are no better off. For this purpose the railroad is held in highest favor by the optimist, for it permits him to make the transit with great expedition. ** RAMSHACKLE RAMSHACKLE, adj. Pertaining to a certain order of architecture, otherwise known as the Normal American. Most of the public buildings of the United States are of the Ramshackle order, though some of our earlier architects preferred the Ironic. Recent additions to the White House in Washington are Theo-Doric, the ecclesiastic order of the Dorians. They are exceedingly fine and cost one hundred dollars a brick. ** REALISM REALISM, n. The art of depicting nature as it is seem by toads. The charm suffusing a landscape painted by a mole, or a story written by a measuring-worm. ** REALITY REALITY, n. The dream of a mad philosopher. That which would remain in the cupel if one should assay a phantom. The nucleus of a vacuum. ** REALLY REALLY, adv. Apparently. ** REAR REAR, n. In American military matters, that exposed part of the army that is nearest to Congress. ** REASON REASON, v.i. To weight probabilities in the scales of desire. ** REASON REASON, n. Propensitate of prejudice. ** REASONABLE REASONABLE, adj. Accessible to the infection of our own opinions. Hospitable to persuasion, dissuasion and evasion. ** REBEL REBEL, n. A proponent of a new misrule who has failed to establish it. ** RECOLLECT RECOLLECT, v. To recall with additions something not previously known. ** RECONCILIATION RECONCILIATION, n. A suspension of hostilities. An armed truce for the purpose of digging up the dead. ** RECONSIDER RECONSIDER, v. To seek a justification for a decision already made. ** RECOUNT RECOUNT, n. In American politics, another throw of the dice, accorded to the player against whom they are loaded. ** RECREATION RECREATION, n. A particular kind of dejection to relieve a general fatigue. ** RECRUIT RECRUIT, n. A person distinguishable from a civilian by his uniform and from a soldier by his gait. Fresh from the farm or factory or street, His marching, in pursuit or in retreat, Were an impressive martial spectacle Except for two impediments -- his feet. Thompson Johnson ** RECTOR RECTOR, n. In the Church of England, the Third Person of the parochial Trinity, the Cruate and the Vicar being the other two. ** REDEMPTION REDEMPTION, n. Deliverance of sinners from the penalty of their sin, through their murder of the deity against whom they sinned. The doctrine of Redemption is the fundamental mystery of our holy religion, and whoso believeth in it shall not perish, but have everlasting life in which to try to understand it. We must awake Man's spirit from his sin, And take some special measure for redeeming it; Though hard indeed the task to get it in Among the angels any way but teaming it, Or purify it otherwise than steaming it. I'm awkward at Redemption -- a beginner: My method is to crucify the sinner. Golgo Brone ** REDRESS REDRESS, n. Reparation without satisfaction. Among the Anglo-Saxon a subject conceiving himself wronged by the king was permitted, on proving his injury, to beat a brazen image of the royal offender with a switch that was afterward applied to his own naked back. The latter rite was performed by the public hangman, and it assured moderation in the plaintiff's choice of a switch. ** RED-SKIN RED-SKIN, n. A North American Indian, whose skin is not red -- at least not on the outside. ** REDUNDANT REDUNDANT, adj. Superfluous; needless; _de trop_. The Sultan said: "There's evidence abundant To prove this unbelieving dog redundant." To whom the Grand Vizier, with mien impressive, Replied: "His head, at least, appears excessive." Habeeb Suleiman Mr. Debs is a redundant citizen. Theodore Roosevelt ** REFERENDUM REFERENDUM, n. A law for submission of proposed legislation to a popular vote to learn the nonsensus of public opinion. ** REFLECTION REFLECTION, n. An action of the mind whereby we obtain a clearer view of our relation to the things of yesterday and are able to avoid the perils that we shall not again encounter. ** REFORM REFORM, v. A thing that mostly satisfies reformers opposed to reformation. ** REFUGE REFUGE, n. Anything assuring protection to one in peril. Moses and Joshua provided six cities of refuge -- Bezer, Golan, Ramoth, Kadesh, Schekem and Hebron -- to which one who had taken life inadvertently could flee when hunted by relatives of the deceased. This admirable expedient supplied him with wholesome exercise and enabled them to enjoy the pleasures of the chase; whereby the soul of the dead man was appropriately honored by observations akin to the funeral games of early Greece. ** REFUSAL REFUSAL, n. Denial of something desired; as an elderly maiden's hand in marriage, to a rich and handsome suitor; a valuable franchise to a rich corporation, by an alderman; absolution to an impenitent king, by a priest, and so forth. Refusals are graded in a descending scale of finality thus: the refusal absolute, the refusal condition, the refusal tentative and the refusal feminine. The last is called by some casuists the refusal assentive. ** REGALIA REGALIA, n. Distinguishing insignia, jewels and costume of such ancient and honorable orders as Knights of Adam; Visionaries of Detectable Bosh; the Ancient Order of Modern Troglodytes; the League of Holy Humbug; the Golden Phalanx of Phalangers; the Genteel Society of Expurgated Hoodlums; the Mystic Alliances of Georgeous Regalians; Knights and Ladies of the Yellow Dog; the Oriental Order of Sons of the West; the Blatherhood of Insufferable Stuff; Warriors of the Long Bow; Guardians of the Great Horn Spoon; the Band of Brutes; the Impenitent Order of Wife-Beaters; the Sublime Legion of Flamboyant Conspicuants; Worshipers at the Electroplated Shrine; Shining Inaccessibles; Fee-Faw-Fummers of the inimitable Grip; Jannissaries of the Broad-Blown Peacock; Plumed Increscencies of the Magic Temple; the Grand Cabal of Able-Bodied Sedentarians; Associated Deities of the Butter Trade; the Garden of Galoots; the Affectionate Fraternity of Men Similarly Warted; the Flashing Astonishers; Ladies of Horror; Cooperative Association for Breaking into the Spotlight; Dukes of Eden; Disciples Militant of the Hidden Faith; Knights-Champions of the Domestic Dog; the Holy Gregarians; the Resolute Optimists; the Ancient Sodality of Inhospitable Hogs; Associated Sovereigns of Mendacity; Dukes-Guardian of the Mystic Cess-Pool; the Society for Prevention of Prevalence; Kings of Drink; Polite Federation of Gents-Consequential; the Mysterious Order of the Undecipherable Scroll; Uniformed Rank of Lousy Cats; Monarchs of Worth and Hunger; Sons of the South Star; Prelates of the Tub-and-Sword. ** RELIGION RELIGION, n. A daughter of Hope and Fear, explaining to Ignorance the nature of the Unknowable. "What is your religion my son?" inquired the Archbishop of Rheims. "Pardon, monseigneur," replied Rochebriant; "I am ashamed of it." "Then why do you not become an atheist?" "Impossible! I should be ashamed of atheism." "In that case, monsieur, you should join the Protestants." ** RELIQUARY RELIQUARY, n. A receptacle for such sacred objects as pieces of the true cross, short-ribs of the saints, the ears of Balaam's ass, the lung of the cock that called Peter to repentance and so forth. Reliquaries are commonly of metal, and provided with a lock to prevent the contents from coming out and performing miracles at unseasonable times. A feather from the wing of the Angel of the Annunciation once escaped during a sermon in Saint Peter's and so tickled the noses of the congregation that they woke and sneezed with great vehemence three times each. It is related in the "Gesta Sanctorum" that a sacristan in the Canterbury cathedral surprised the head of Saint Dennis in the library. Reprimanded by its stern custodian, it explained that it was seeking a body of doctrine. This unseemly levity so raged the diocesan that the offender was publicly anathematized, thrown into the Stour and replaced by another head of Saint Dennis, brought from Rome. ** RENOWN RENOWN, n. A degree of distinction between notoriety and fame -- a little more supportable than the one and a little more intolerable than the other. Sometimes it is conferred by an unfriendly and inconsiderate hand. I touched the harp in every key, But found no heeding ear; And then Ithuriel touched me With a revealing spear. Not all my genius, great as 'tis, Could urge me out of night. I felt the faint appulse of his, And leapt into the light! W.J. Candleton ** REPARATION REPARATION, n. Satisfaction that is made for a wrong and deducted from the satisfaction felt in committing it. ** REPARTEE REPARTEE, n. Prudent insult in retort. Practiced by gentlemen with a constitutional aversion to violence, but a strong disposition to offend. In a war of words, the tactics of the North American Indian. ** REPENTANCE REPENTANCE, n. The faithful attendant and follower of Punishment. It is usually manifest in a degree of reformation that is not inconsistent with continuity of sin. Desirous to avoid the pains of Hell, You will repent and join the Church, Parnell? How needless! -- Nick will keep you off the coals And add you to the woes of other souls. Jomater Abemy ** REPLICA REPLICA, n. A reproduction of a work of art, by the artist that made the original. It is so called to distinguish it from a "copy," which is made by another artist. When the two are mae with equal skill the replica is the more valuable, for it is supposed to be more beautiful than it looks. ** REPORTER REPORTER, n. A writer who guesses his way to the truth and dispels it with a tempest of words. "More dear than all my bosom knows, O thou Whose 'lips are sealed' and will not disavow!" So sang the blithe reporter-man as grew Beneath his hand the leg-long "interview." Barson Maith ** REPOSE REPOSE, v.i. To cease from troubling. ** REPRESENTATIVE REPRESENTATIVE, n. In national politics, a member of the Lower House in this world, and without discernible hope of promotion in the next. ** REPROBATION REPROBATION, n. In theology, the state of a luckless mortal prenatally damned. The doctrine of reprobation was taught by Calvin, whose joy in it was somewhat marred by the sad sincerity of his conviction that although some are foredoomed to perdition, others are predestined to salvation. ** REPUBLIC REPUBLIC, n. A nation in which, the thing governing and the thing governed being the same, there is only a permitted authority to enforce an optional obedience. In a republic, the foundation of public order is the ever lessening habit of submission inherited from ancestors who, being truly governed, submitted because they had to. There are as many kinds of republics as there are graduations between the despotism whence they came and the anarchy whither they lead. ** REQUIEM REQUIEM, n. A mass for the dead which the minor poets assure us the winds sing o'er the graves of their favorites. Sometimes, by way of providing a varied entertainment, they sing a dirge. ** RESIDENT RESIDENT, adj. Unable to leave. ** RESIGN RESIGN, v.t. To renounce an honor for an advantage. To renounce an advantage for a greater advantage. 'Twas rumored Leonard Wood had signed A true renunciation Of title, rank and every kind Of military station -- Each honorable station. By his example fired -- inclined To noble emulation, The country humbly was resigned To Leonard's resignation -- His Christian resignation. Politian Greame ** RESOLUTE RESOLUTE, adj. Obstinate in a course that we approve. ** RESPECTABILITY RESPECTABILITY, n. The offspring of a _liaison_ between a bald head and a bank account. ** RESPIRATOR RESPIRATOR, n. An apparatus fitted over the nose and mouth of an inhabitant of London, whereby to filter the visible universe in its passage to the lungs. ** RESPITE RESPITE, n. A suspension of hostilities against a sentenced assassin, to enable the Executive to determine whether the murder may not have been done by the prosecuting attorney. Any break in the continuity of a disagreeable expectation. Altgeld upon his incandescend bed Lay, an attendant demon at his head. "O cruel cook, pray grant me some relief -- Some respite from the roast, however brief." "Remember how on earth I pardoned all Your friends in Illinois when held in thrall." "Unhappy soul! for that alone you squirm O'er fire unquenched, a never-dying worm. "Yet, for I pity your uneasy state, Your doom I'll mollify and pains abate. "Naught, for a season, shall your comfort mar, Not even the memory of who you are." Throughout eternal space dread silence fell; Heaven trembled as Compassion entered Hell. "As long, sweet demon, let my respite be As, governing down here, I'd respite thee." "As long, poor soul, as any of the pack You thrust from jail consumed in getting back." A genial chill affected Altgeld's hide While they were turning him on t'other side. Joel Spate Woop ** RESPLENDENT RESPLENDENT, adj. Like a simple American citizen beduking himself in his lodge, or affirming his consequence in the Scheme of Things as an elemental unit of a parade. The Knights of Dominion were so resplendent in their velvet- and-gold that their masters would hardly have known them. "Chronicles of the Classes" ** RESPOND RESPOND, v.i. To make answer, or disclose otherwise a consciousness of having inspired an interest in what Herbert Spencer calls "external coexistences," as Satan "squat like a toad" at the ear of Eve, responded to the touch of the angel's spear. To respond in damages is to contribute to the maintenance of the plaintiff's attorney and, incidentally, to the gratification of the plaintiff. ** RESPONSIBILITY RESPONSIBILITY, n. A detachable burden easily shifted to the shoulders of God, Fate, Fortune, Luck or one's neighbor. In the days of astrology it was customary to unload it upon a star. Alas, things ain't what we should see If Eve had let that apple be; And many a feller which had ought To set with monarchses of thought, Or play some rosy little game With battle-chaps on fields of fame, Is downed by his unlucky star And hollers: "Peanuts! -- here you are!" "The Sturdy Beggar" ** RESTITUTIONS RESTITUTIONS, n. The founding or endowing of universities and public libraries by gift or bequest. ** RESTITUTOR RESTITUTOR, n. Benefactor; philanthropist. ** RETALIATION RETALIATION, n. The natural rock upon which is reared the Temple of Law. ** RETRIBUTION RETRIBUTION, n. A rain of fire-and-brimstone that falls alike upon the just and such of the unjust as have not procured shelter by evicting them. In the lines following, addressed to an Emperor in exile by Father Gassalasca Jape, the reverend poet appears to hint his sense of the improduence of turning about to face Retribution when it is talking exercise: What, what! Dom Pedro, you desire to go Back to Brazil to end your days in quiet? Why, what assurance have you 'twould be so? 'Tis not so long since you were in a riot, And your dear subjects showed a will to fly at Your throat and shake you like a rat. You know That empires are ungrateful; are you certain Republics are less handy to get hurt in? ** REVEILLE REVEILLE, n. A signal to sleeping soldiers to dream of battlefields no more, but get up and have their blue noses counted. In the American army it is ingeniously called "rev-e-lee," and to that pronunciation our countrymen have pledged their lives, their misfortunes and their sacred dishonor. ** REVELATION REVELATION, n. A famous book in which St. John the Divine concealed all that he knew. The revealing is done by the commentators, who know nothing. ** REVERENCE REVERENCE, n. The spiritual attitude of a man to a god and a dog to a man. ** REVIEW REVIEW, v.t. To set your wisdom (holding not a doubt of it, Although in truth there's neither bone nor skin to it) At work upon a book, and so read out of it The qualities that you have first read into it. ** REVOLUTION REVOLUTION, n. In politics, an abrupt change in the form of misgovernment. Specifically, in American history, the substitution of the rule of an Administration for that of a Ministry, whereby the welfare and happiness of the people were advanced a full half-inch. Revolutions are usually accompanied by a considerable effusion of blood, but are accounted worth it -- this appraisement being made by beneficiaries whose blood had not the mischance to be shed. The French revolution is of incalculable value to the Socialist of to-day; when he pulls the string actuating its bones its gestures are inexpressibly terrifying to gory tyrants suspected of fomenting law and order. ** RHADOMANCER RHADOMANCER, n. One who uses a divining-rod in prospecting for precious metals in the pocket of a fool. ** RIBALDRY RIBALDRY, n. Censorious language by another concerning oneself. ** RIBROASTER RIBROASTER, n. Censorious language by oneself concerning another. The word is of classical refinement, and is even said to have been used in a fable by Georgius Coadjutor, one of the most fastidious writers of the fifteenth century -- commonly, indeed, regarded as the founder of the Fastidiotic School. ** RICE-WATER RICE-WATER, n. A mystic beverage secretly used by our most popular novelists and poets to regulate the imagination and narcotize the conscience. It is said to be rich in both obtundite and lethargine, and is brewed in a midnight fog by a fat which of the Dismal Swamp. ** RICH RICH, adj. Holding in trust and subject to an accounting the property of the indolent, the incompetent, the unthrifty, the envious and the luckless. That is the view that prevails in the underworld, where the Brotherhood of Man finds its most logical development and candid advocacy. To denizens of the midworld the word means good and wise. ** RICHES RICHES, n. A gift from Heaven signifying, "This is my beloved son, in whom I am well pleased." John D. Rockefeller The reward of toil and virtue. J.P. Morgan The sayings of many in the hands of one. Eugene Debs To these excellent definitions the inspired lexicographer feels that he can add nothing of value. ** RIDICULE RIDICULE, n. Words designed to show that the person of whom they are uttered is devoid of the dignity of character distinguishing him who utters them. It may be graphic, mimetic or merely rident. Shaftesbury is quoted as having pronounced it the test of truth -- a ridiculous assertion, for many a solemn fallacy has undergone centuries of ridicule with no abatement of its popular acceptance. What, for example, has been more valorously derided than the doctrine of Infant Respectability? ** RIGHT RIGHT, n. Legitimate authority to be, to do or to have; as the right to be a king, the right to do one's neighbor, the right to have measles, and the like. The first of these rights was once universally believed to be derived directly from the will of God; and this is still sometimes affirmed _in partibus infidelium_ outside the enlightened realms of Democracy; as the well known lines of Sir Abednego Bink, following: By what right, then, do royal rulers rule? Whose is the sanction of their state and pow'r? He surely were as stubborn as a mule Who, God unwilling, could maintain an hour His uninvited session on the throne, or air His pride securely in the Presidential chair. Whatever is is so by Right Divine; Whate'er occurs, God wills it so. Good land! It were a wondrous thing if His design A fool could baffle or a rogue withstand! If so, then God, I say (intending no offence) Is guilty of contributory negligence. ** RIGHTEOUSNESS RIGHTEOUSNESS, n. A sturdy virtue that was once found among the Pantidoodles inhabiting the lower part of the peninsula of Oque. Some feeble attempts were made by returned missionaries to introduce it into several European countries, but it appears to have been imperfectly expounded. An example of this faulty exposition is found in the only extant sermon of the pious Bishop Rowley, a characteristic passage from which is here given: "Now righteousness consisteth not merely in a holy state of mind, nor yet in performance of religious rites and obedience to the letter of the law. It is not enough that one be pious and just: one must see to it that others also are in the same state; and to this end compulsion is a proper means. Forasmuch as my injustice may work ill to another, so by his injustice may evil be wrought upon still another, the which it is as manifestly my duty to estop as to forestall mine own tort. Wherefore if I would be righteous I am bound to restrain my neighbor, by force if needful, in all those injurious enterprises from which, through a better disposition and by the help of Heaven, I do myself restrain." ** RIME RIME, n. Agreeing sounds in the terminals of verse, mostly bad. The verses themselves, as distinguished from prose, mostly dull. Usually (and wickedly) spelled "rhyme." ** RIMER RIMER, n. A poet regarded with indifference or disesteem. The rimer quenches his unheeded fires, The sound surceases and the sense expires. Then the domestic dog, to east and west, Expounds the passions burning in his breast. The rising moon o'er that enchanted land Pauses to hear and yearns to understand. Mowbray Myles ** RIOT RIOT, n. A popular entertainment given to the military by innocent bystanders. R.I.P. A careless abbreviation of _requiescat in pace_, attesting to indolent goodwill to the dead. According to the learned Dr. Drigge, however, the letters originally meant nothing more than _reductus in pulvis_. ** RITE RITE, n. A religious or semi-religious ceremony fixed by law, precept or custom, with the essential oil of sincerity carefully squeezed out of it. ** RITUALISM RITUALISM, n. A Dutch Garden of God where He may walk in rectilinear freedom, keeping off the grass. ** ROAD ROAD, n. A strip of land along which one may pass from where it is too tiresome to be to where it is futile to go. All roads, howsoe'er they diverge, lead to Rome, Whence, thank the good Lord, at least one leads back home. Borey the Bald ** ROBBER ROBBER, n. A candid man of affairs. It is related of Voltaire that one night he and some traveling companion lodged at a wayside inn. The surroundings were suggestive, and after supper they agreed to tell robber stories in turn. "Once there was a Farmer-General of the Revenues." Saying nothing more, he was encouraged to continue. "That," he said, "is the story." ** ROMANCE ROMANCE, n. Fiction that owes no allegiance to the God of Things as They Are. In the novel the writer's thought is tethered to probability, as a domestic horse to the hitching-post, but in romance it ranges at will over the entire region of the imagination -- free, lawless, immune to bit and rein. Your novelist is a poor creature, as Carlyle might say -- a mere reporter. He may invent his characters and plot, but he must not imagine anything taking place that might not occur, albeit his entire narrative is candidly a lie. Why he imposes this hard condition on himself, and "drags at each remove a lengthening chain" of his own forging he can explain in ten thick volumes without illuminating by so much as a candle's ray the black profound of his own ignorance of the matter. There are great novels, for great writers have "laid waste their powers" to write them, but it remains true that far and away the most fascinating fiction that we have is "The Thousand and One Nights." ** ROPE ROPE, n. An obsolescent appliance for reminding assassins that they too are mortal. It is put about the neck and remains in place one's whole life long. It has been largely superseded by a more complex electrical device worn upon another part of the person; and this is rapidly giving place to an apparatus known as the preachment. ** ROSTRUM ROSTRUM, n. In Latin, the beak of a bird or the prow of a ship. In America, a place from which a candidate for office energetically expounds the wisdom, virtue and power of the rabble. ** ROUNDHEAD ROUNDHEAD, n. A member of the Parliamentarian party in the English civil war -- so called from his habit of wearing his hair short, whereas his enemy, the Cavalier, wore his long. There were other points of difference between them, but the fashion in hair was the fundamental cause of quarrel. The Cavaliers were royalists because the king, an indolent fellow, found it more convenient to let his hair grow than to wash his neck. This the Roundheads, who were mostly barbers and soap-boilers, deemed an injury to trade, and the royal neck was therefore the object of their particular indignation. Descendants of the belligerents now wear their hair all alike, but the fires of animosity enkindled in that ancient strife smoulder to this day beneath the snows of British civility. ** RUBBISH RUBBISH, n. Worthless matter, such as the religions, philosophies, literatures, arts and sciences of the tribes infesting the regions lying due south from Boreaplas. ** RUIN RUIN, v. To destroy. Specifically, to destroy a maid's belief in the virtue of maids. ** RUM RUM, n. Generically, fiery liquors that produce madness in total abstainers. ** RUMOR RUMOR, n. A favorite weapon of the assassins of character. Sharp, irresistible by mail or shield, By guard unparried as by flight unstayed, O serviceable Rumor, let me wield Against my enemy no other blade. His be the terror of a foe unseen, His the inutile hand upon the hilt, And mine the deadly tongue, long, slender, keen, Hinting a rumor of some ancient guilt. So shall I slay the wretch without a blow, Spare me to celebrate his overthrow, And nurse my valor for another foe. Joel Buxter ** RUSSIAN RUSSIAN, n. A person with a Caucasian body and a Mongolian soul. A Tartar Emetic. S ** SABBATH SABBATH, n. A weekly festival having its origin in the fact that God made the world in six days and was arrested on the seventh. Among the Jews observance of the day was enforced by a Commandment of which this is the Christian version: "Remember the seventh day to make thy neighbor keep it wholly." To the Creator it seemed fit and expedient that the Sabbath should be the last day of the week, but the Early Fathers of the Church held other views. So great is the sanctity of the day that even where the Lord holds a doubtful and precarious jurisdiction over those who go down to (and down into) the sea it is reverently recognized, as is manifest in the following deep-water version of the Fourth Commandment: Six days shalt thou labor and do all thou art able, And on the seventh holystone the deck and scrape the cable. Decks are no longer holystoned, but the cable still supplies the captain with opportunity to attest a pious respect for the divine ordinance. ** SACERDOTALIST SACERDOTALIST, n. One who holds the belief that a clergyman is a priest. Denial of this momentous doctrine is the hardest challenge that is now flung into the teeth of the Episcopalian church by the Neo-Dictionarians. ** SACRAMENT SACRAMENT, n. A solemn religious ceremony to which several degrees of authority and significance are attached. Rome has seven sacraments, but the Protestant churches, being less prosperous, feel that they can afford only two, and these of inferior sanctity. Some of the smaller sects have no sacraments at all -- for which mean economy they will indubitable be damned. ** SACRED SACRED, adj. Dedicated to some religious purpose; having a divine character; inspiring solemn thoughts or emotions; as, the Dalai Lama of Thibet; the Moogum of M'bwango; the temple of Apes in Ceylon; the Cow in India; the Crocodile, the Cat and the Onion of ancient Egypt; the Mufti of Moosh; the hair of the dog that bit Noah, etc. All things are either sacred or profane. The former to ecclesiasts bring gain; The latter to the devil appertain. Dumbo Omohundro ** SANDLOTTER SANDLOTTER, n. A vertebrate mammal holding the political views of Denis Kearney, a notorious demagogue of San Francisco, whose audiences gathered in the open spaces (sandlots) of the town. True to the traditions of his species, this leader of the proletariat was finally bought off by his law-and-order enemies, living prosperously silent and dying impenitently rich. But before his treason he imposed upon California a constitution that was a confection of sin in a diction of solecisms. The similarity between the words "sandlotter" and "sansculotte" is problematically significant, but indubitably suggestive. ** SAFETY-CLUTCH SAFETY-CLUTCH, n. A mechanical device acting automatically to prevent the fall of an elevator, or cage, in case of an accident to the hoisting apparatus. Once I seen a human ruin In an elevator-well, And his members was bestrewin' All the place where he had fell. And I says, apostrophisin' That uncommon woful wreck: "Your position's so surprisin' That I tremble for your neck!" Then that ruin, smilin' sadly And impressive, up and spoke: "Well, I wouldn't tremble badly, For it's been a fortnight broke." Then, for further comprehension Of his attitude, he begs I will focus my attention On his various arms and legs -- How they all are contumacious; Where they each, respective, lie; How one trotter proves ungracious, T'other one an _alibi_. These particulars is mentioned For to show his dismal state, Which I wasn't first intentioned To specifical relate. None is worser to be dreaded That I ever have heard tell Than the gent's who there was spreaded In that elevator-well. Now this tale is allegoric -- It is figurative all, For the well is metaphoric And the feller didn't fall. I opine it isn't moral For a writer-man to cheat, And despise to wear a laurel As was gotten by deceit. For 'tis Politics intended By the elevator, mind, It will boost a person splendid If his talent is the kind. Col. Bryan had the talent (For the busted man is him) And it shot him up right gallant Till his head begun to swim. Then the rope it broke above him And he painful come to earth Where there's nobody to love him For his detrimented worth. Though he's livin' none would know him, Or at leastwise not as such. Moral of this woful poem: Frequent oil your safety-clutch. Porfer Poog ** SAINT SAINT, n. A dead sinner revised and edited. The Duchess of Orleans relates that the irreverent old calumniator, Marshal Villeroi, who in his youth had known St. Francis de Sales, said, on hearing him called saint: "I am delighted to hear that Monsieur de Sales is a saint. He was fond of saying indelicate things, and used to cheat at cards. In other respects he was a perfect gentleman, though a fool." ** SALACITY SALACITY, n. A certain literary quality frequently observed in popular novels, especially in those written by women and young girls, who give it another name and think that in introducing it they are occupying a neglected field of letters and reaping an overlooked harvest. If they have the misfortune to live long enough they are tormented with a desire to burn their sheaves. ** SALAMANDER SALAMANDER, n. Originally a reptile inhabiting fire; later, an anthropomorphous immortal, but still a pyrophile. Salamanders are now believed to be extinct, the last one of which we have an account having been seen in Carcassonne by the Abbe Belloc, who exorcised it with a bucket of holy water. ** SARCOPHAGUS SARCOPHAGUS, n. Among the Greeks a coffin which being made of a certain kind of carnivorous stone, had the peculiar property of devouring the body placed in it. The sarcophagus known to modern obsequiographers is commonly a product of the carpenter's art. ** SATAN SATAN, n. One of the Creator's lamentable mistakes, repented in sashcloth and axes. Being instated as an archangel, Satan made himself multifariously objectionable and was finally expelled from Heaven. Halfway in his descent he paused, bent his head in thought a moment and at last went back. "There is one favor that I should like to ask," said he. "Name it." "Man, I understand, is about to be created. He will need laws." "What, wretch! you his appointed adversary, charged from the dawn of eternity with hatred of his soul -- you ask for the right to make his laws?" "Pardon; what I have to ask is that he be permitted to make them himself." It was so ordered. ** SATIETY SATIETY, n. The feeling that one has for the plate after he has eaten its contents, madam. ** SATIRE SATIRE, n. An obsolete kind of literary composition in which the vices and follies of the author's enemies were expounded with imperfect tenderness. In this country satire never had more than a sickly and uncertain existence, for the soul of it is wit, wherein we are dolefully deficient, the humor that we mistake for it, like all humor, being tolerant and sympathetic. Moreover, although Americans are "endowed by their Creator" with abundant vice and folly, it is not generally known that these are reprehensible qualities, wherefore the satirist is popularly regarded as a soul-spirited knave, and his ever victim's outcry for codefendants evokes a national assent. Hail Satire! be thy praises ever sung In the dead language of a mummy's tongue, For thou thyself art dead, and damned as well -- Thy spirit (usefully employed) in Hell. Had it been such as consecrates the Bible Thou hadst not perished by the law of libel. Barney Stims ** SATYR SATYR, n. One of the few characters of the Grecian mythology accorded recognition in the Hebrew. (Leviticus, xvii, 7.) The satyr was at first a member of the dissolute community acknowledging a loose allegiance with Dionysius, but underwent many transformations and improvements. Not infrequently he is confounded with the faun, a later and decenter creation of the Romans, who was less like a man and more like a goat. ** SAUCE SAUCE, n. The one infallible sign of civilization and enlightenment. A people with no sauces has one thousand vices; a people with one sauce has only nine hundred and ninety-nine. For every sauce invented and accepted a vice is renounced and forgiven. ** SAW SAW, n. A trite popular saying, or proverb. (Figurative and colloquial.) So called because it makes its way into a wooden head. Following are examples of old saws fitted with new teeth. A penny saved is a penny to squander. A man is known by the company that he organizes. A bad workman quarrels with the man who calls him that. A bird in the hand is worth what it will bring. Better late than before anybody has invited you. Example is better than following it. Half a loaf is better than a whole one if there is much else. Think twice before you speak to a friend in need. What is worth doing is worth the trouble of asking somebody to do it. Least said is soonest disavowed. He laughs best who laughs least. Speak of the Devil and he will hear about it. Of two evils choose to be the least. Strike while your employer has a big contract. Where there's a will there's a won't. ** SCARABAEUS SCARABAEUS, n. The sacred beetle of the ancient Egyptians, allied to our familiar "tumble-bug." It was supposed to symbolize immortality, the fact that God knew why giving it its peculiar sanctity. Its habit of incubating its eggs in a ball of ordure may also have commended it to the favor of the priesthood, and may some day assure it an equal reverence among ourselves. True, the American beetle is an inferior beetle, but the American priest is an inferior priest. ** SCARABEE SCARABEE, n. The same as scarabaeus. He fell by his own hand Beneath the great oak tree. He'd traveled in a foreign land. He tried to make her understand The dance that's called the Saraband, But he called it Scarabee. He had called it so through an afternoon, And she, the light of his harem if so might be, Had smiled and said naught. O the body was fair to see, All frosted there in the shine o' the moon -- Dead for a Scarabee And a recollection that came too late. O Fate! They buried him where he lay, He sleeps awaiting the Day, In state, And two Possible Puns, moon-eyed and wan, Gloom over the grave and then move on. Dead for a Scarabee! Fernando Tapple ** SCARIFICATION SCARIFICATION, n. A form of penance practised by the mediaeval pious. The rite was performed, sometimes with a knife, sometimes with a hot iron, but always, says Arsenius Asceticus, acceptably if the penitent spared himself no pain nor harmless disfigurement. Scarification, with other crude penances, has now been superseded by benefaction. The founding of a library or endowment of a university is said to yield to the penitent a sharper and more lasting pain than is conferred by the knife or iron, and is therefore a surer means of grace. There are, however, two grave objections to it as a penitential method: the good that it does and the taint of justice. ** SCEPTER SCEPTER, n. A king's staff of office, the sign and symbol of his authority. It was originally a mace with which the sovereign admonished his jester and vetoed ministerial measures by breaking the bones of their proponents. ** SCIMETAR SCIMETAR, n. A curved sword of exceeding keenness, in the conduct of which certain Orientals attain a surprising proficiency, as the incident here related will serve to show. The account is translated from the Japanese by Shusi Itama, a famous writer of the thirteenth century. When the great Gichi-Kuktai was Mikado he condemned to decapitation Jijiji Ri, a high officer of the Court. Soon after the hour appointed for performance of the rite what was his Majesty's surprise to see calmly approaching the throne the man who should have been at that time ten minutes dead! "Seventeen hundred impossible dragons!" shouted the enraged monarch. "Did I not sentence you to stand in the market-place and have your head struck off by the public executioner at three o'clock? And is it not now 3:10?" "Son of a thousand illustrious deities," answered the condemned minister, "all that you say is so true that the truth is a lie in comparison. But your heavenly Majesty's sunny and vitalizing wishes have been pestilently disregarded. With joy I ran and placed my unworthy body in the market-place. The executioner appeared with his bare scimetar, ostentatiously whirled it in air, and then, tapping me lightly upon the neck, strode away, pelted by the populace, with whom I was ever a favorite. I am come to pray for justice upon his own dishonorable and treasonous head." "To what regiment of executioners does the black-boweled caitiff belong?" asked the Mikado. "To the gallant Ninety-eight Hundred and Thirty-seventh -- I know the man. His name is Sakko-Samshi." "Let him be brought before me," said the Mikado to an attendant, and a half-hour later the culprit stood in the Presence. "Thou bastard son of a three-legged hunchback without thumbs!" roared the sovereign -- "why didst thou but lightly tap the neck that it should have been thy pleasure to sever?" "Lord of Cranes of Cherry Blooms," replied the executioner, unmoved, "command him to blow his nose with his fingers." Being commanded, Jijiji Ri laid hold of his nose and trumpeted like an elephant, all expecting to see the severed head flung violently from him. Nothing occurred: the performance prospered peacefully to the close, without incident. All eyes were now turned on the executioner, who had grown as white as the snows on the summit of Fujiama. His legs trembled and his breath came in gasps of terror. "Several kinds of spike-tailed brass lions!" he cried; "I am a ruined and disgraced swordsman! I struck the villain feebly because in flourishing the scimetar I had accidentally passed it through my own neck! Father of the Moon, I resign my office." So saying, he gasped his top-knot, lifted off his head, and advancing to the throne laid it humbly at the Mikado's feet. ** SCRAP-BOOK SCRAP-BOOK, n. A book that is commonly edited by a fool. Many persons of some small distinction compile scrap-books containing whatever they happen to read about themselves or employ others to collect. One of these egotists was addressed in the lines following, by Agamemnon Melancthon Peters: Dear Frank, that scrap-book where you boast You keep a record true Of every kind of peppered roast That's made of you; Wherein you paste the printed gibes That revel round your name, Thinking the laughter of the scribes Attests your fame; Where all the pictures you arrange That comic pencils trace -- Your funny figure and your strange Semitic face -- Pray lend it me. Wit I have not, Nor art, but there I'll list The daily drubbings you'd have got Had God a fist. ** SCRIBBLER SCRIBBLER, n. A professional writer whose views are antagonistic to one's own. ** SCRIPTURES SCRIPTURES, n. The sacred books of our holy religion, as distinguished from the false and profane writings on which all other faiths are based. ** SEAL SEAL, n. A mark impressed upon certain kinds of documents to attest their authenticity and authority. Sometimes it is stamped upon wax, and attached to the paper, sometimes into the paper itself. Sealing, in this sense, is a survival of an ancient custom of inscribing important papers with cabalistic words or signs to give them a magical efficacy independent of the authority that they represent. In the British museum are preserved many ancient papers, mostly of a sacerdotal character, validated by necromantic pentagrams and other devices, frequently initial letters of words to conjure with; and in many instances these are attached in the same way that seals are appended now. As nearly every reasonless and apparently meaningless custom, rite or observance of modern times had origin in some remote utility, it is pleasing to note an example of ancient nonsense evolving in the process of ages into something really useful. Our word "sincere" is derived from _sine cero_, without wax, but the learned are not in agreement as to whether this refers to the absence of the cabalistic signs, or to that of the wax with which letters were formerly closed from public scrutiny. Either view of the matter will serve one in immediate need of an hypothesis. The initials L.S., commonly appended to signatures of legal documents, mean _locum sigillis_, the place of the seal, although the seal is no longer used -- an admirable example of conservatism distinguishing Man from the beasts that perish. The words _locum sigillis_ are humbly suggested as a suitable motto for the Pribyloff Islands whenever they shall take their place as a sovereign State of the American Union. ** SEINE SEINE, n. A kind of net for effecting an involuntary change of environment. For fish it is made strong and coarse, but women are more easily taken with a singularly delicate fabric weighted with small, cut stones. The devil casting a seine of lace, (With precious stones 'twas weighted) Drew it into the landing place And its contents calculated. All souls of women were in that sack -- A draft miraculous, precious! But ere he could throw it across his back They'd all escaped through the meshes. Baruch de Loppis ** SELF-ESTEEM SELF-ESTEEM, n. An erroneous appraisement. ** SELF-EVIDENT SELF-EVIDENT, adj. Evident to one's self and to nobody else. ** SELFISH SELFISH, adj. Devoid of consideration for the selfishness of others. ** SENATE SENATE, n. A body of elderly gentlemen charged with high duties and misdemeanors. ** SERIAL SERIAL, n. A literary work, usually a story that is not true, creeping through several issues of a newspaper or magazine. Frequently appended to each installment is a "synposis of preceding chapters" for those who have not read them, but a direr need is a synposis of succeeding chapters for those who do not intend to read _them_. A synposis of the entire work would be still better. The late James F. Bowman was writing a serial tale for a weekly paper in collaboration with a genius whose name has not come down to us. They wrote, not jointly but alternately, Bowman supplying the installment for one week, his friend for the next, and so on, world without end, they hoped. Unfortunately they quarreled, and one Monday morning when Bowman read the paper to prepare himself for his task, he found his work cut out for him in a way to surprise and pain him. His collaborator had embarked every character of the narrative on a ship and sunk them all in the deepest part of the Atlantic. ** SEVERALTY SEVERALTY, n. Separateness, as, lands in severalty, i.e., lands held individually, not in joint ownership. Certain tribes of Indians are believed now to be sufficiently civilized to have in severalty the lands that they have hitherto held as tribal organizations, and could not sell to the Whites for waxen beads and potato whiskey. Lo! the poor Indian whose unsuited mind Saw death before, hell and the grave behind; Whom thrifty settler ne'er besought to stay -- His small belongings their appointed prey; Whom Dispossession, with alluring wile, Persuaded elsewhere every little while! His fire unquenched and his undying worm By "land in severalty" (charming term!) Are cooled and killed, respectively, at last, And he to his new holding anchored fast! ** SHERIFF SHERIFF, n. In America the chief executive office of a country, whose most characteristic duties, in some of the Western and Southern States, are the catching and hanging of rogues. John Elmer Pettibone Cajee (I write of him with little glee) Was just as bad as he could be. 'Twas frequently remarked: "I swon! The sun has never looked upon So bad a man as Neighbor John." A sinner through and through, he had This added fault: it made him mad To know another man was bad. In such a case he thought it right To rise at any hour of night And quench that wicked person's light. Despite the town's entreaties, he Would hale him to the nearest tree And leave him swinging wide and free. Or sometimes, if the humor came, A luckless wight's reluctant frame Was given to the cheerful flame. While it was turning nice and brown, All unconcerned John met the frown Of that austere and righteous town. "How sad," his neighbors said, "that he So scornful of the law should be -- An anar c, h, i, s, t." (That is the way that they preferred To utter the abhorrent word, So strong the aversion that it stirred.) "Resolved," they said, continuing, "That Badman John must cease this thing Of having his unlawful fling. "Now, by these sacred relics" -- here Each man had out a souvenir Got at a lynching yesteryear -- "By these we swear he shall forsake His ways, nor cause our hearts to ache By sins of rope and torch and stake. "We'll tie his red right hand until He'll have small freedom to fulfil The mandates of his lawless will." So, in convention then and there, They named him Sheriff. The affair Was opened, it is said, with prayer. J. Milton Sloluck ** SIREN SIREN, n. One of several musical prodigies famous for a vain attempt to dissuade Odysseus from a life on the ocean wave. Figuratively, any lady of splendid promise, dissembled purpose and disappointing performance. ** SLANG SLANG, n. The grunt of the human hog (_Pignoramus intolerabilis_) with an audible memory. The speech of one who utters with his tongue what he thinks with his ear, and feels the pride of a creator in accomplishing the feat of a parrot. A means (under Providence) of setting up as a wit without a capital of sense. ** SMITHAREEN SMITHAREEN, n. A fragment, a decomponent part, a remain. The word is used variously, but in the following verse on a noted female reformer who opposed bicycle-riding by women because it "led them to the devil" it is seen at its best: The wheels go round without a sound -- The maidens hold high revel; In sinful mood, insanely gay, True spinsters spin adown the way From duty to the devil! They laugh, they sing, and -- ting-a-ling! Their bells go all the morning; Their lanterns bright bestar the night Pedestrians a-warning. With lifted hands Miss Charlotte stands, Good-Lording and O-mying, Her rheumatism forgotten quite, Her fat with anger frying. She blocks the path that leads to wrath, Jack Satan's power defying. The wheels go round without a sound The lights burn red and blue and green. What's this that's found upon the ground? Poor Charlotte Smith's a smithareen! John William Yope ** SOPHISTRY SOPHISTRY, n. The controversial method of an opponent, distinguished from one's own by superior insincerity and fooling. This method is that of the later Sophists, a Grecian sect of philosophers who began by teaching wisdom, prudence, science, art and, in brief, whatever men ought to know, but lost themselves in a maze of quibbles and a fog of words. His bad opponent's "facts" he sweeps away, And drags his sophistry to light of day; Then swears they're pushed to madness who resort To falsehood of so desperate a sort. Not so; like sods upon a dead man's breast, He lies most lightly who the least is pressed. Polydore Smith ** SORCERY SORCERY, n. The ancient prototype and forerunner of political influence. It was, however, deemed less respectable and sometimes was punished by torture and death. Augustine Nicholas relates that a poor peasant who had been accused of sorcery was put to the torture to compel a confession. After enduring a few gentle agonies the suffering simpleton admitted his guilt, but naively asked his tormentors if it were not possible to be a sorcerer without knowing it. ** SOUL SOUL, n. A spiritual entity concerning which there hath been brave disputation. Plato held that those souls which in a previous state of existence (antedating Athens) had obtained the clearest glimpses of eternal truth entered into the bodies of persons who became philosophers. Plato himself was a philosopher. The souls that had least contemplated divine truth animated the bodies of usurpers and despots. Dionysius I, who had threatened to decapitate the broad- browed philosopher, was a usurper and a despot. Plato, doubtless, was not the first to construct a system of philosophy that could be quoted against his enemies; certainly he was not the last. "Concerning the nature of the soul," saith the renowned author of _Diversiones Sanctorum_, "there hath been hardly more argument than that of its place in the body. Mine own belief is that the soul hath her seat in the abdomen -- in which faith we may discern and interpret a truth hitherto unintelligible, namely that the glutton is of all men most devout. He is said in the Scripture to 'make a god of his belly' -- why, then, should he not be pious, having ever his Deity with him to freshen his faith? Who so well as he can know the might and majesty that he shrines? Truly and soberly, the soul and the stomach are one Divine Entity; and such was the belief of Promasius, who nevertheless erred in denying it immortality. He had observed that its visible and material substance failed and decayed with the rest of the body after death, but of its immaterial essence he knew nothing. This is what we call the Appetite, and it survives the wreck and reek of mortality, to be rewarded or punished in another world, according to what it hath demanded in the flesh. The Appetite whose coarse clamoring was for the unwholesome viands of the general market and the public refectory shall be cast into eternal famine, whilst that which firmly through civilly insisted on ortolans, caviare, terrapin, anchovies, _pates de foie gras_ and all such Christian comestibles shall flesh its spiritual tooth in the souls of them forever and ever, and wreak its divine thirst upon the immortal parts of the rarest and richest wines ever quaffed here below. Such is my religious faith, though I grieve to confess that neither His Holiness the Pope nor His Grace the Archbishop of Canterbury (whom I equally and profoundly revere) will assent to its dissemination." ** SPOOKER SPOOKER, n. A writer whose imagination concerns itself with supernatural phenomena, especially in the doings of spooks. One of the most illustrious spookers of our time is Mr. William D. Howells, who introduces a well-credentialed reader to as respectable and mannerly a company of spooks as one could wish to meet. To the terror that invests the chairman of a district school board, the Howells ghost adds something of the mystery enveloping a farmer from another township. ** STORY STORY, n. A narrative, commonly untrue. The truth of the stories here following has, however, not been successfully impeached. One evening Mr. Rudolph Block, of New York, found himself seated at dinner alongside Mr. Percival Pollard, the distinguished critic. "Mr. Pollard," said he, "my book, _The Biography of a Dead Cow_, is published anonymously, but you can hardly be ignorant of its authorship. Yet in reviewing it you speak of it as the work of the Idiot of the Century. Do you think that fair criticism?" "I am very sorry, sir," replied the critic, amiably, "but it did not occur to me that you really might not wish the public to know who wrote it." Mr. W.C. Morrow, who used to live in San Jose, California, was addicted to writing ghost stories which made the reader feel as if a stream of lizards, fresh from the ice, were streaking it up his back and hiding in his hair. San Jose was at that time believed to be haunted by the visible spirit of a noted bandit named Vasquez, who had been hanged there. The town was not very well lighted, and it is putting it mildly to say that San Jose was reluctant to be out o' nights. One particularly dark night two gentlemen were abroad in the loneliest spot within the city limits, talking loudly to keep up their courage, when they came upon Mr. J.J. Owen, a well-known journalist. "Why, Owen," said one, "what brings you here on such a night as this? You told me that this is one of Vasquez' favorite haunts! And you are a believer. Aren't you afraid to be out?" "My dear fellow," the journalist replied with a drear autumnal cadence in his speech, like the moan of a leaf-laden wind, "I am afraid to be in. I have one of Will Morrow's stories in my pocket and I don't dare to go where there is light enough to read it." Rear-Admiral Schley and Representative Charles F. Joy were standing near the Peace Monument, in Washington, discussing the question, Is success a failure? Mr. Joy suddenly broke off in the middle of an eloquent sentence, exclaiming: "Hello! I've heard that band before. Santlemann's, I think." "I don't hear any band," said Schley. "Come to think, I don't either," said Joy; "but I see General Miles coming down the avenue, and that pageant always affects me in the same way as a brass band. One has to scrutinize one's impressions pretty closely, or one will mistake their origin." While the Admiral was digesting this hasty meal of philosophy General Miles passed in review, a spectacle of impressive dignity. When the tail of the seeming procession had passed and the two observers had recovered from the transient blindness caused by its effulgence -- "He seems to be enjoying himself," said the Admiral. "There is nothing," assented Joy, thoughtfully, "that he enjoys one-half so well." The illustrious statesman, Champ Clark, once lived about a mile from the village of Jebigue, in Missouri. One day he rode into town on a favorite mule, and, hitching the beast on the sunny side of a street, in front of a saloon, he went inside in his character of teetotaler, to apprise the barkeeper that wine is a mocker. It was a dreadfully hot day. Pretty soon a neighbor came in and seeing Clark, said: "Champ, it is not right to leave that mule out there in the sun. He'll roast, sure! -- he was smoking as I passed him." "O, he's all right," said Clark, lightly; "he's an inveterate smoker." The neighbor took a lemonade, but shook his head and repeated that it was not right. He was a conspirator. There had been a fire the night before: a stable just around the corner had burned and a number of horses had put on their immortality, among them a young colt, which was roasted to a rich nut-brown. Some of the boys had turned Mr. Clark's mule loose and substituted the mortal part of the colt. Presently another man entered the saloon. "For mercy's sake!" he said, taking it with sugar, "do remove that mule, barkeeper: it smells." "Yes," interposed Clark, "that animal has the best nose in Missouri. But if he doesn't mind, you shouldn't." In the course of human events Mr. Clark went out, and there, apparently, lay the incinerated and shrunken remains of his charger. The boys idd not have any fun out of Mr. Clarke, who looked at the body and, with the non-committal expression to which he owes so much of his political preferment, went away. But walking home late that night he saw his mule standing silent and solemn by the wayside in the misty moonlight. Mentioning the name of Helen Blazes with uncommon emphasis, Mr. Clark took the back track as hard as ever he could hook it, and passed the night in town. General H.H. Wotherspoon, president of the Army War College, has a pet rib-nosed baboon, an animal of uncommon intelligence but imperfectly beautiful. Returning to his apartment one evening, the General was surprised and pained to find Adam (for so the creature is named, the general being a Darwinian) sitting up for him and wearing his master's best uniform coat, epaulettes and all. "You confounded remote ancestor!" thundered the great strategist, "what do you mean by being out of bed after naps? -- and with my coat on!" Adam rose and with a reproachful look got down on all fours in the manner of his kind and, scuffling across the room to a table, returned with a visiting-card: General Barry had called and, judging by an empty champagne bottle and several cigar-stumps, had been hospitably entertained while waiting. The general apologized to his faithful progenitor and retired. The next day he met General Barry, who said: "Spoon, old man, when leaving you last evening I forgot to ask you about those excellent cigars. Where did you get them?" General Wotherspoon did not deign to reply, but walked away. "Pardon me, please," said Barry, moving after him; "I was joking of course. Why, I knew it was not you before I had been in the room fifteen minutes." ** SUCCESS SUCCESS, n. The one unpardonable sin against one's fellows. In literature, and particularly in poetry, the elements of success are exceedingly simple, and are admirably set forth in the following lines by the reverend Father Gassalasca Jape, entitled, for some mysterious reason, "John A. Joyce." The bard who would prosper must carry a book, Do his thinking in prose and wear A crimson cravat, a far-away look And a head of hexameter hair. Be thin in your thought and your body'll be fat; If you wear your hair long you needn't your hat. ** SUFFRAGE SUFFRAGE, n. Expression of opinion by means of a ballot. The right of suffrage (which is held to be both a privilege and a duty) means, as commonly interpreted, the right to vote for the man of another man's choice, and is highly prized. Refusal to do so has the bad name of "incivism." The incivilian, however, cannot be properly arraigned for his crime, for there is no legitimate accuser. If the accuser is himself guilty he has no standing in the court of opinion; if not, he profits by the crime, for A's abstention from voting gives greater weight to the vote of B. By female suffrage is meant the right of a woman to vote as some man tells her to. It is based on female responsibility, which is somewhat limited. The woman most eager to jump out of her petticoat to assert her rights is first to jump back into it when threatened with a switching for misusing them. ** SYCOPHANT SYCOPHANT, n. One who approaches Greatness on his belly so that he may not be commanded to turn and be kicked. He is sometimes an editor. As the lean leech, its victim found, is pleased To fix itself upon a part diseased Till, its black hide distended with bad blood, It drops to die of surfeit in the mud, So the base sycophant with joy descries His neighbor's weak spot and his mouth applies, Gorges and prospers like the leech, although, Unlike that reptile, he will not let go. Gelasma, if it paid you to devote Your talent to the service of a goat, Showing by forceful logic that its beard Is more than Aaron's fit to be revered; If to the task of honoring its smell Profit had prompted you, and love as well, The world would benefit at last by you And wealthy malefactors weep anew -- Your favor for a moment's space denied And to the nobler object turned aside. Is't not enough that thrifty millionaires Who loot in freight and spoliate in fares, Or, cursed with consciences that bid them fly To safer villainies of darker dye, Forswearing robbery and fain, instead, To steal (they call it "cornering") our bread May see you groveling their boots to lick And begging for the favor of a kick? Still must you follow to the bitter end Your sycophantic disposition's trend, And in your eagerness to please the rich Hunt hungry sinners to their final ditch? In Morgan's praise you smite the sounding wire, And sing hosannas to great Havemeyher! What's Satan done that him you should eschew? He too is reeking rich -- deducting _you_. ** SYLLOGISM SYLLOGISM, n. A logical formula consisting of a major and a minor assumption and an inconsequent. (See LOGIC.) ** SYLPH SYLPH, n. An immaterial but visible being that inhabited the air when the air was an element and before it was fatally polluted with factory smoke, sewer gas and similar products of civilization. Sylphs were allied to gnomes, nymphs and salamanders, which dwelt, respectively, in earth, water and fire, all now insalubrious. Sylphs, like fowls of the air, were male and female, to no purpose, apparently, for if they had progeny they must have nested in accessible places, none of the chicks having ever been seen. ** SYMBOL SYMBOL, n. Something that is supposed to typify or stand for something else. Many symbols are mere "survivals" -- things which having no longer any utility continue to exist because we have inherited the tendency to make them; as funereal urns carved on memorial monuments. They were once real urns holding the ashes of the dead. We cannot stop making them, but we can give them a name that conceals our helplessness. ** SYMBOLIC SYMBOLIC, adj. Pertaining to symbols and the use and interpretation of symbols. They say 'tis conscience feels compunction; I hold that that's the stomach's function, For of the sinner I have noted That when he's sinned he's somewhat bloated, Or ill some other ghastly fashion Within that bowel of compassion. True, I believe the only sinner Is he that eats a shabby dinner. You know how Adam with good reason, For eating apples out of season, Was "cursed." But that is all symbolic: The truth is, Adam had the colic. G.J. T ** T T, the twentieth letter of the English alphabet, was by the Greeks absurdly called _tau_. In the alphabet whence ours comes it had the form of the rude corkscrew of the period, and when it stood alone (which was more than the Phoenicians could always do) signified _Tallegal_, translated by the learned Dr. Brownrigg, "tanglefoot." ** TABLE D'HOTE TABLE D'HOTE, n. A caterer's thrifty concession to the universal passion for irresponsibility. Old Paunchinello, freshly wed, Took Madam P. to table, And there deliriously fed As fast as he was able. "I dote upon good grub," he cried, Intent upon its throatage. "Ah, yes," said the neglected bride, "You're in your _table d'hotage_." Associated Poets ** TAIL TAIL, n. The part of an animal's spine that has transcended its natural limitations to set up an independent existence in a world of its own. Excepting in its foetal state, Man is without a tail, a privation of which he attests an hereditary and uneasy consciousness by the coat-skirt of the male and the train of the female, and by a marked tendency to ornament that part of his attire where the tail should be, and indubitably once was. This tendency is most observable in the female of the species, in whom the ancestral sense is strong and persistent. The tailed men described by Lord Monboddo are now generally regarded as a product of an imagination unusually susceptible to influences generated in the golden age of our pithecan past. ** TAKE TAKE, v.t. To acquire, frequently by force but preferably by stealth. ** TALK TALK, v.t. To commit an indiscretion without temptation, from an impulse without purpose. ** TARIFF TARIFF, n. A scale of taxes on imports, designed to protect the domestic producer against the greed of his consumer. The Enemy of Human Souls Sat grieving at the cost of coals; For Hell had been annexed of late, And was a sovereign Southern State. "It were no more than right," said he, "That I should get my fuel free. The duty, neither just nor wise, Compels me to economize -- Whereby my broilers, every one, Are execrably underdone. What would they have? -- although I yearn To do them nicely to a turn, I can't afford an honest heat. This tariff makes even devils cheat! I'm ruined, and my humble trade All rascals may at will invade: Beneath my nose the public press Outdoes me in sulphureousness; The bar ingeniously applies To my undoing my own lies; My medicines the doctors use (Albeit vainly) to refuse To me my fair and rightful prey And keep their own in shape to pay; The preachers by example teach What, scorning to perform, I teach; And statesmen, aping me, all make More promises than they can break. Against such competition I Lift up a disregarded cry. Since all ignore my just complaint, By Hokey-Pokey! I'll turn saint!" Now, the Republicans, who all Are saints, began at once to bawl Against _his_ competition; so There was a devil of a go! They locked horns with him, tete-a-tete In acrimonious debate, Till Democrats, forlorn and lone, Had hopes of coming by their own. That evil to avert, in haste The two belligerents embraced; But since 'twere wicked to relax A tittle of the Sacred Tax, 'Twas finally agreed to grant The bold Insurgent-protestant A bounty on each soul that fell Into his ineffectual Hell. Edam Smith ** TECHNICALITY TECHNICALITY, n. In an English court a man named Home was tried for slander in having accused his neighbor of murder. His exact words were: "Sir Thomas Holt hath taken a cleaver and stricken his cook upon the head, so that one side of the head fell upon one shoulder and the other side upon the other shoulder." The defendant was acquitted by instruction of the court, the learned judges holding that the words did not charge murder, for they did not affirm the death of the cook, that being only an inference. ** TEDIUM TEDIUM, n. Ennui, the state or condition of one that is bored. Many fanciful derivations of the word have been affirmed, but so high an authority as Father Jape says that it comes from a very obvious source -- the first words of the ancient Latin hymn _Te Deum Laudamus_. In this apparently natural derivation there is something that saddens. ** TEETOTALER TEETOTALER, n. One who abstains from strong drink, sometimes totally, sometimes tolerably totally. ** TELEPHONE TELEPHONE, n. An invention of the devil which abrogates some of the advantages of making a disagreeable person keep his distance. ** TELESCOPE TELESCOPE, n. A device having a relation to the eye similar to that of the telephone to the ear, enabling distant objects to plague us with a multitude of needless details. Luckily it is unprovided with a bell summoning us to the sacrifice. ** TENACITY TENACITY, n. A certain quality of the human hand in its relation to the coin of the realm. It attains its highest development in the hand of authority and is considered a serviceable equipment for a career in politics. The following illustrative lines were written of a Californian gentleman in high political preferment, who has passed to his accounting: Of such tenacity his grip That nothing from his hand can slip. Well-buttered eels you may o'erwhelm In tubs of liquid slippery-elm In vain -- from his detaining pinch They cannot struggle half an inch! 'Tis lucky that he so is planned That breath he draws not with his hand, For if he did, so great his greed He'd draw his last with eager speed. Nay, that were well, you say. Not so He'd draw but never let it go! ** THEOSOPHY THEOSOPHY, n. An ancient faith having all the certitude of religion and all the mystery of science. The modern Theosophist holds, with the Buddhists, that we live an incalculable number of times on this earth, in as many several bodies, because one life is not long enough for our complete spiritual development; that is, a single lifetime does not suffice for us to become as wise and good as we choose to wish to become. To be absolutely wise and good -- that is perfection; and the Theosophist is so keen-sighted as to have observed that everything desirous of improvement eventually attains perfection. Less competent observers are disposed to except cats, which seem neither wiser nor better than they were last year. The greatest and fattest of recent Theosophists was the late Madame Blavatsky, who had no cat. ** TIGHTS TIGHTS, n. An habiliment of the stage designed to reinforce the general acclamation of the press agent with a particular publicity. Public attention was once somewhat diverted from this garment to Miss Lillian Russell's refusal to wear it, and many were the conjectures as to her motive, the guess of Miss Pauline Hall showing a high order of ingenuity and sustained reflection. It was Miss Hall's belief that nature had not endowed Miss Russell with beautiful legs. This theory was impossible of acceptance by the male understanding, but the conception of a faulty female leg was of so prodigious originality as to rank among the most brilliant feats of philosophical speculation! It is strange that in all the controversy regarding Miss Russell's aversion to tights no one seems to have thought to ascribe it to what was known among the ancients as "modesty." The nature of that sentiment is now imperfectly understood, and possibly incapable of exposition with the vocabulary that remains to us. The study of lost arts has, however, been recently revived and some of the arts themselves recovered. This is an epoch of _renaissances_, and there is ground for hope that the primitive "blush" may be dragged from its hiding-place amongst the tombs of antiquity and hissed on to the stage. ** TOMB TOMB, n. The House of Indifference. Tombs are now by common consent invested with a certain sanctity, but when they have been long tenanted it is considered no sin to break them open and rifle them, the famous Egyptologist, Dr. Huggyns, explaining that a tomb may be innocently "glened" as soon as its occupant is done "smellynge," the soul being then all exhaled. This reasonable view is now generally accepted by archaeologists, whereby the noble science of Curiosity has been greatly dignified. ** TOPE TOPE, v. To tipple, booze, swill, soak, guzzle, lush, bib, or swig. In the individual, toping is regarded with disesteem, but toping nations are in the forefront of civilization and power. When pitted against the hard-drinking Christians the absemious Mahometans go down like grass before the scythe. In India one hundred thousand beef- eating and brandy-and-soda guzzling Britons hold in subjection two hundred and fifty million vegetarian abstainers of the same Aryan race. With what an easy grace the whisky-loving American pushed the temperate Spaniard out of his possessions! From the time when the Berserkers ravaged all the coasts of western Europe and lay drunk in every conquered port it has been the same way: everywhere the nations that drink too much are observed to fight rather well and not too righteously. Wherefore the estimable old ladies who abolished the canteen from the American army may justly boast of having materially augmented the nation's military power. ** TORTOISE TORTOISE, n. A creature thoughtfully created to supply occasion for the following lines by the illustrious Ambat Delaso: TO MY PET TORTOISE My friend, you are not graceful -- not at all; Your gait's between a stagger and a sprawl. Nor are you beautiful: your head's a snake's To look at, and I do not doubt it aches. As to your feet, they'd make an angel weep. 'Tis true you take them in whene'er you sleep. No, you're not pretty, but you have, I own, A certain firmness -- mostly you're [sic] backbone. Firmness and strength (you have a giant's thews) Are virtues that the great know how to use -- I wish that they did not; yet, on the whole, You lack -- excuse my mentioning it -- Soul. So, to be candid, unreserved and true, I'd rather you were I than I were you. Perhaps, however, in a time to be, When Man's extinct, a better world may see Your progeny in power and control, Due to the genesis and growth of Soul. So I salute you as a reptile grand Predestined to regenerate the land. Father of Possibilities, O deign To accept the homage of a dying reign! In the far region of the unforeknown I dream a tortoise upon every throne. I see an Emperor his head withdraw Into his carapace for fear of Law; A King who carries something else than fat, Howe'er acceptably he carries that; A President not strenuously bent On punishment of audible dissent -- Who never shot (it were a vain attack) An armed or unarmed tortoise in the back; Subject and citizens that feel no need To make the March of Mind a wild stampede; All progress slow, contemplative, sedate, And "Take your time" the word, in Church and State. O Tortoise, 'tis a happy, happy dream, My glorious testudinous regime! I wish in Eden you'd brought this about By slouching in and chasing Adam out. ** TREE TREE, n. A tall vegetable intended by nature to serve as a penal apparatus, though through a miscarriage of justice most trees bear only a negligible fruit, or none at all. When naturally fruited, the tree is a beneficient agency of civilization and an important factor in public morals. In the stern West and the sensitive South its fruit (white and black respectively) though not eaten, is agreeable to the public taste and, though not exported, profitable to the general welfare. That the legitimate relation of the tree to justice was no discovery of Judge Lynch (who, indeed, conceded it no primacy over the lamp-post and the bridge-girder) is made plain by the following passage from Morryster, who antedated him by two centuries: While in yt londe I was carried to see ye Ghogo tree, whereof I had hearde moch talk; but sayynge yt I saw naught remarkabyll in it, ye hed manne of ye villayge where it grewe made answer as followeth: "Ye tree is not nowe in fruite, but in his seasonne you shall see dependynge fr. his braunches all soch as have affroynted ye King his Majesty." And I was furder tolde yt ye worde "Ghogo" sygnifyeth in yr tong ye same as "rapscal" in our owne. _Trauvells in ye Easte_ ** TRIAL TRIAL, n. A formal inquiry designed to prove and put upon record the blameless characters of judges, advocates and jurors. In order to effect this purpose it is necessary to supply a contrast in the person of one who is called the defendant, the prisoner, or the accused. If the contrast is made sufficiently clear this person is made to undergo such an affliction as will give the virtuous gentlemen a comfortable sense of their immunity, added to that of their worth. In our day the accused is usually a human being, or a socialist, but in mediaeval times, animals, fishes, reptiles and insects were brought to trial. A beast that had taken human life, or practiced sorcery, was duly arrested, tried and, if condemned, put to death by the public executioner. Insects ravaging grain fields, orchards or vineyards were cited to appeal by counsel before a civil tribunal, and after testimony, argument and condemnation, if they continued _in contumaciam_ the matter was taken to a high ecclesiastical court, where they were solemnly excommunicated and anathematized. In a street of Toledo, some pigs that had wickedly run between the viceroy's legs, upsetting him, were arrested on a warrant, tried and punished. In Naples and ass was condemned to be burned at the stake, but the sentence appears not to have been executed. D'Addosio relates from the court records many trials of pigs, bulls, horses, cocks, dogs, goats, etc., greatly, it is believed, to the betterment of their conduct and morals. In 1451 a suit was brought against the leeches infesting some ponds about Berne, and the Bishop of Lausanne, instructed by the faculty of Heidelberg University, directed that some of "the aquatic worms" be brought before the local magistracy. This was done and the leeches, both present and absent, were ordered to leave the places that they had infested within three days on pain of incurring "the malediction of God." In the voluminous records of this _cause celebre_ nothing is found to show whether the offenders braved the punishment, or departed forthwith out of that inhospitable jurisdiction. ** TRICHINOSIS TRICHINOSIS, n. The pig's reply to proponents of porcophagy. Moses Mendlessohn having fallen ill sent for a Christian physician, who at once diagnosed the philosopher's disorder as trichinosis, but tactfully gave it another name. "You need and immediate change of diet," he said; "you must eat six ounces of pork every other day." "Pork?" shrieked the patient -- "pork? Nothing shall induce me to touch it!" "Do you mean that?" the doctor gravely asked. "I swear it!" "Good! -- then I will undertake to cure you." ** TRINITY TRINITY, n. In the multiplex theism of certain Christian churches, three entirely distinct deities consistent with only one. Subordinate deities of the polytheistic faith, such as devils and angels, are not dowered with the power of combination, and must urge individually their clames to adoration and propitiation. The Trinity is one of the most sublime mysteries of our holy religion. In rejecting it because it is incomprehensible, Unitarians betray their inadequate sense of theological fundamentals. In religion we believe only what we do not understand, except in the instance of an intelligible doctrine that contradicts an incomprehensible one. In that case we believe the former as a part of the latter. ** TROGLODYTE TROGLODYTE, n. Specifically, a cave-dweller of the paleolithic period, after the Tree and before the Flat. A famous community of troglodytes dwelt with David in the Cave of Adullam. The colony consisted of "every one that was in distress, and every one that was in debt, and every one that was discontented" -- in brief, all the Socialists of Judah. ** TRUCE TRUCE, n. Friendship. ** TRUTH TRUTH, n. An ingenious compound of desirability and appearance. Discovery of truth is the sole purpose of philosophy, which is the most ancient occupation of the human mind and has a fair prospect of existing with increasing activity to the end of time. ** TRUTHFUL TRUTHFUL, adj. Dumb and illiterate. ** TRUST TRUST, n. In American politics, a large corporation composed in greater part of thrifty working men, widows of small means, orphans in the care of guardians and the courts, with many similar malefactors and public enemies. ** TURKEY TURKEY, n. A large bird whose flesh when eaten on certain religious anniversaries has the peculiar property of attesting piety and gratitude. Incidentally, it is pretty good eating. ** TWICE TWICE, adv. Once too often. ** TYPE TYPE, n. Pestilent bits of metal suspected of destroying civilization and enlightenment, despite their obvious agency in this incomparable dictionary. ** TZETZE TZETZE (or TSETSE) FLY, n. An African insect (_Glossina morsitans_) whose bite is commonly regarded as nature's most efficacious remedy for insomnia, though some patients prefer that of the American novelist (_Mendax interminabilis_). U ** UBIQUITY UBIQUITY, n. The gift or power of being in all places at one time, but not in all places at all times, which is omnipresence, an attribute of God and the luminiferous ether only. This important distinction between ubiquity and omnipresence was not clear to the mediaeval Church and there was much bloodshed about it. Certain Lutherans, who affirmed the presence everywhere of Christ's body were known as Ubiquitarians. For this error they were doubtless damned, for Christ's body is present only in the eucharist, though that sacrament may be performed in more than one place simultaneously. In recent times ubiquity has not always been understood -- not even by Sir Boyle Roche, for example, who held that a man cannot be in two places at once unless he is a bird. ** UGLINESS UGLINESS, n. A gift of the gods to certain women, entailing virtue without humility. ** ULTIMATUM ULTIMATUM, n. In diplomacy, a last demand before resorting to concessions. Having received an ultimatum from Austria, the Turkish Ministry met to consider it. "O servant of the Prophet," said the Sheik of the Imperial Chibouk to the Mamoosh of the Invincible Army, "how many unconquerable soldiers have we in arms?" "Upholder of the Faith," that dignitary replied after examining his memoranda, "they are in numbers as the leaves of the forest!" "And how many impenetrable battleships strike terror to the hearts of all Christian swine?" he asked the Imaum of the Ever Victorious Navy. "Uncle of the Full Moon," was the reply, "deign to know that they are as the waves of the ocean, the sands of the desert and the stars of Heaven!" For eight hours the broad brow of the Sheik of the Imperial Chibouk was corrugated with evidences of deep thought: he was calculating the chances of war. Then, "Sons of angels," he said, "the die is cast! I shall suggest to the Ulema of the Imperial Ear that he advise inaction. In the name of Allah, the council is adjourned." ** UN-AMERICAN UN-AMERICAN, adj. Wicked, intolerable, heathenish. ** UNCTION UNCTION, n. An oiling, or greasing. The rite of extreme unction consists in touching with oil consecrated by a bishop several parts of the body of one engaged in dying. Marbury relates that after the rite had been administered to a certain wicked English nobleman it was discovered that the oil had not been properly consecrated and no other could be obtained. When informed of this the sick man said in anger: "Then I'll be damned if I die!" "My son," said the priest, "this is what we fear." ** UNDERSTANDING UNDERSTANDING, n. A cerebral secretion that enables one having it to know a house from a horse by the roof on the house. Its nature and laws have been exhaustively expounded by Locke, who rode a house, and Kant, who lived in a horse. His understanding was so keen That all things which he'd felt, heard, seen, He could interpret without fail If he was in or out of jail. He wrote at Inspiration's call Deep disquisitions on them all, Then, pent at last in an asylum, Performed the service to compile 'em. So great a writer, all men swore, They never had not read before. Jorrock Wormley ** UNITARIAN UNITARIAN, n. One who denies the divinity of a Trinitarian. ** UNIVERSALIST UNIVERSALIST, n. One who forgoes the advantage of a Hell for persons of another faith. ** URBANITY URBANITY, n. The kind of civility that urban observers ascribe to dwellers in all cities but New York. Its commonest expression is heard in the words, "I beg your pardon," and it is not consistent with disregard of the rights of others. The owner of a powder mill Was musing on a distant hill -- Something his mind foreboded -- When from the cloudless sky there fell A deviled human kidney! Well, The man's mill had exploded. His hat he lifted from his head; "I beg your pardon, sir," he said; "I didn't know 'twas loaded." Swatkin ** USAGE USAGE, n. The First Person of the literary Trinity, the Second and Third being Custom and Conventionality. Imbued with a decent reverence for this Holy Triad an industrious writer may hope to produce books that will live as long as the fashion. ** UXORIOUSNESS UXORIOUSNESS, n. A perverted affection that has strayed to one's own wife. V ** VALOR VALOR, n. A soldierly compound of vanity, duty and the gambler's hope. "Why have you halted?" roared the commander of a division and Chickamauga, who had ordered a charge; "move forward, sir, at once." "General," said the commander of the delinquent brigade, "I am persuaded that any further display of valor by my troops will bring them into collision with the enemy." ** VANITY VANITY, n. The tribute of a fool to the worth of the nearest ass. They say that hens do cackle loudest when There's nothing vital in the eggs they've laid; And there are hens, professing to have made A study of mankind, who say that men Whose business 'tis to drive the tongue or pen Make the most clamorous fanfaronade O'er their most worthless work; and I'm afraid They're not entirely different from the hen. Lo! the drum-major in his coat of gold, His blazing breeches and high-towering cap -- Imperiously pompous, grandly bold, Grim, resolute, an awe-inspiring chap! Who'd think this gorgeous creature's only virtue Is that in battle he will never hurt you? Hannibal Hunsiker ** VIRTUES VIRTUES, n.pl. Certain abstentions. ** VITUPERATION VITUPERATION, n. Saite, as understood by dunces and all such as suffer from an impediment in their wit. ** VOTE VOTE, n. The instrument and symbol of a freeman's power to make a fool of himself and a wreck of his country. W ** W W (double U) has, of all the letters in our alphabet, the only cumbrous name, the names of the others being monosyllabic. This advantage of the Roman alphabet over the Grecian is the more valued after audibly spelling out some simple Greek word, like _epixoriambikos_. Still, it is now thought by the learned that other agencies than the difference of the two alphabets may have been concerned in the decline of "the glory that was Greece" and the rise of "the grandeur that was Rome." There can be no doubt, however, that by simplifying the name of W (calling it "wow," for example) our civilization could be, if not promoted, at least better endured. ** WALL STREET WALL STREET, n. A symbol for sin for every devil to rebuke. That Wall Street is a den of thieves is a belief that serves every unsuccessful thief in place of a hope in Heaven. Even the great and good Andrew Carnegie has made his profession of faith in the matter. Carnegie the dauntless has uttered his call To battle: "The brokers are parasites all!" Carnegie, Carnegie, you'll never prevail; Keep the wind of your slogan to belly your sail, Go back to your isle of perpetual brume, Silence your pibroch, doff tartan and plume: Ben Lomond is calling his son from the fray -- Fly, fly from the region of Wall Street away! While still you're possessed of a single baubee (I wish it were pledged to endowment of me) 'Twere wise to retreat from the wars of finance Lest its value decline ere your credit advance. For a man 'twixt a king of finance and the sea, Carnegie, Carnegie, your tongue is too free! Anonymus Bink ** WAR WAR, n. A by-product of the arts of peace. The most menacing political condition is a period of international amity. The student of history who has not been taught to expect the unexpected may justly boast himself inaccessible to the light. "In time of peace prepare for war" has a deeper meaning than is commonly discerned; it means, not merely that all things earthly have an end -- that change is the one immutable and eternal law -- but that the soil of peace is thickly sown with the seeds of war and singularly suited to their germination and growth. It was when Kubla Khan had decreed his "stately pleasure dome" -- when, that is to say, there were peace and fat feasting in Xanadu -- that he heard from afar Ancestral voices prophesying war. One of the greatest of poets, Coleridge was one of the wisest of men, and it was not for nothing that he read us this parable. Let us have a little less of "hands across the sea," and a little more of that elemental distrust that is the security of nations. War loves to come like a thief in the night; professions of eternal amity provide the night. ** WASHINGTONIAN WASHINGTONIAN, n. A Potomac tribesman who exchanged the privilege of governing himself for the advantage of good government. In justice to him it should be said that he did not want to. They took away his vote and gave instead The right, when he had earned, to _eat_ his bread. In vain -- he clamors for his "boss," pour soul, To come again and part him from his roll. Offenbach Stutz ** WEAKNESSES WEAKNESSES, n.pl. Certain primal powers of Tyrant Woman wherewith she holds dominion over the male of her species, binding him to the service of her will and paralyzing his rebellious energies. ** WEATHER WEATHER, n. The climate of the hour. A permanent topic of conversation among persons whom it does not interest, but who have inherited the tendency to chatter about it from naked arboreal ancestors whom it keenly concerned. The setting up official weather bureaus and their maintenance in mendacity prove that even governments are accessible to suasion by the rude forefathers of the jungle. Once I dipt into the future far as human eye could see, And I saw the Chief Forecaster, dead as any one can be -- Dead and damned and shut in Hades as a liar from his birth, With a record of unreason seldom paralleled on earth. While I looked he reared him solemnly, that incadescent youth, From the coals that he'd preferred to the advantages of truth. He cast his eyes about him and above him; then he wrote On a slab of thin asbestos what I venture here to quote -- For I read it in the rose-light of the everlasting glow: "Cloudy; variable winds, with local showers; cooler; snow." Halcyon Jones ** WEDDING WEDDING, n. A ceremony at which two persons undertake to become one, one undertakes to become nothing, and nothing undertakes to become supportable. ** WEREWOLF WEREWOLF, n. A wolf that was once, or is sometimes, a man. All werewolves are of evil disposition, having assumed a bestial form to gratify a beastial appetite, but some, transformed by sorcery, are as humane and is consistent with an acquired taste for human flesh. Some Bavarian peasants having caught a wolf one evening, tied it to a post by the tail and went to bed. The next morning nothing was there! Greatly perplexed, they consulted the local priest, who told them that their captive was undoubtedly a werewolf and had resumed its human for during the night. "The next time that you take a wolf," the good man said, "see that you chain it by the leg, and in the morning you will find a Lutheran." ** WHANGDEPOOTENAWAH WHANGDEPOOTENAWAH, n. In the Ojibwa tongue, disaster; an unexpected affliction that strikes hard. Should you ask me whence this laughter, Whence this audible big-smiling, With its labial extension, With its maxillar distortion And its diaphragmic rhythmus Like the billowing of an ocean, Like the shaking of a carpet, I should answer, I should tell you: From the great deeps of the spirit, From the unplummeted abysmus Of the soul this laughter welleth As the fountain, the gug-guggle, Like the river from the canon [sic], To entoken and give warning That my present mood is sunny. Should you ask me further question -- Why the great deeps of the spirit, Why the unplummeted abysmus Of the soule extrudes this laughter, This all audible big-smiling, I should answer, I should tell you With a white heart, tumpitumpy, With a true tongue, honest Injun: William Bryan, he has Caught It, Caught the Whangdepootenawah! Is't the sandhill crane, the shankank, Standing in the marsh, the kneedeep, Standing silent in the kneedeep With his wing-tips crossed behind him And his neck close-reefed before him, With his bill, his william, buried In the down upon his bosom, With his head retracted inly, While his shoulders overlook it? Does the sandhill crane, the shankank, Shiver grayly in the north wind, Wishing he had died when little, As the sparrow, the chipchip, does? No 'tis not the Shankank standing, Standing in the gray and dismal Marsh, the gray and dismal kneedeep. No, 'tis peerless William Bryan Realizing that he's Caught It, Caught the Whangdepootenawah! ** WHEAT WHEAT, n. A cereal from which a tolerably good whisky can with some difficulty be made, and which is used also for bread. The French are said to eat more bread _per capita_ of population than any other people, which is natural, for only they know how to make the stuff palatable. ** WHITE WHITE, adj. and n. Black. ** WIDOW WIDOW, n. A pathetic figure that the Christian world has agreed to take humorously, although Christ's tenderness towards widows was one of the most marked features of his character. ** WINE WINE, n. Fermented grape-juice known to the Women's Christian Union as "liquor," sometimes as "rum." Wine, madam, is God's next best gift to man. ** WIT WIT, n. The salt with which the American humorist spoils his intellectual cookery by leaving it out. ** WITCH WITCH, n. (1) Any ugly and repulsive old woman, in a wicked league with the devil. (2) A beautiful and attractive young woman, in wickedness a league beyond the devil. ** WITTICISM WITTICISM, n. A sharp and clever remark, usually quoted, and seldom noted; what the Philistine is pleased to call a "joke." ** WOMAN WOMAN, n. An animal usually living in the vicinity of Man, and having a rudimentary susceptibility to domestication. It is credited by many of the elder zoologists with a certain vestigial docility acquired in a former state of seclusion, but naturalists of the postsusananthony period, having no knowledge of the seclusion, deny the virtue and declare that such as creation's dawn beheld, it roareth now. The species is the most widely distributed of all beasts of prey, infesting all habitable parts of the globe, from Greeland's spicy mountains to India's moral strand. The popular name (wolfman) is incorrect, for the creature is of the cat kind. The woman is lithe and graceful in its movement, especially the American variety (_felis pugnans_), is omnivorous and can be taught not to talk. Balthasar Pober ** WORMS'-MEAT WORMS'-MEAT, n. The finished product of which we are the raw material. The contents of the Taj Mahal, the Tombeau Napoleon and the Granitarium. Worms'-meat is usually outlasted by the structure that houses it, but "this too must pass away." Probably the silliest work in which a human being can engage is construction of a tomb for himself. The solemn purpose cannot dignify, but only accentuates by contrast the foreknown futility. Ambitious fool! so mad to be a show! How profitless the labor you bestow Upon a dwelling whose magnificence The tenant neither can admire nor know. Build deep, build high, build massive as you can, The wanton grass-roots will defeat the plan By shouldering asunder all the stones In what to you would be a moment's span. Time to the dead so all unreckoned flies That when your marble is all dust, arise, If wakened, stretch your limbs and yawn -- You'll think you scarcely can have closed your eyes. What though of all man's works your tomb alone Should stand till Time himself be overthrown? Would it advantage you to dwell therein Forever as a stain upon a stone? Joel Huck ** WORSHIP WORSHIP, n. Homo Creator's testimony to the sound construction and fine finish of Deus Creatus. A popular form of abjection, having an element of pride. ** WRATH WRATH, n. Anger of a superior quality and degree, appropriate to exalted characters and momentous occasions; as, "the wrath of God," "the day of wrath," etc. Amongst the ancients the wrath of kings was deemed sacred, for it could usually command the agency of some god for its fit manifestation, as could also that of a priest. The Greeks before Troy were so harried by Apollo that they jumped out of the frying-pan of the wrath of Cryses into the fire of the wrath of Achilles, though Agamemnon, the sole offender, was neither fried nor roasted. A similar noted immunity was that of David when he incurred the wrath of Yahveh by numbering his people, seventy thousand of whom paid the penalty with their lives. God is now Love, and a director of the census performs his work without apprehension of disaster. X ** X X in our alphabet being a needless letter has an added invincibility to the attacks of the spelling reformers, and like them, will doubtless last as long as the language. X is the sacred symbol of ten dollars, and in such words as Xmas, Xn, etc., stands for Christ, not, as is popular supposed, because it represents a cross, but because the corresponding letter in the Greek alphabet is the initial of his name -- _Xristos_. If it represented a cross it would stand for St. Andrew, who "testified" upon one of that shape. In the algebra of psychology x stands for Woman's mind. Words beginning with X are Grecian and will not be defined in this standard English dictionary. Y ** YANKEE YANKEE, n. In Europe, an American. In the Northern States of our Union, a New Englander. In the Southern States the word is unknown. (See DAMNYANK.) ** YEAR YEAR, n. A period of three hundred and sixty-five disappointments. ** YESTERDAY YESTERDAY, n. The infancy of youth, the youth of manhood, the entire past of age. But yesterday I should have thought me blest To stand high-pinnacled upon the peak Of middle life and look adown the bleak And unfamiliar foreslope to the West, Where solemn shadows all the land invest And stilly voices, half-remembered, speak Unfinished prophecy, and witch-fires freak The haunted twilight of the Dark of Rest. Yea, yesterday my soul was all aflame To stay the shadow on the dial's face At manhood's noonmark! Now, in God His name I chide aloud the little interspace Disparting me from Certitude, and fain Would know the dream and vision ne'er again. Baruch Arnegriff It is said that in his last illness the poet Arnegriff was attended at different times by seven doctors. ** YOKE YOKE, n. An implement, madam, to whose Latin name, _jugum_, we owe one of the most illuminating words in our language -- a word that defines the matrimonial situation with precision, point and poignancy. A thousand apologies for withholding it. ** YOUTH YOUTH, n. The Period of Possibility, when Archimedes finds a fulcrum, Cassandra has a following and seven cities compete for the honor of endowing a living Homer. Youth is the true Saturnian Reign, the Golden Age on earth again, when figs are grown on thistles, and pigs betailed with whistles and, wearing silken bristles, live ever in clover, and clows fly over, delivering milk at every door, and Justice never is heard to snore, and every assassin is made a ghost and, howling, is cast into Baltimost! Polydore Smith Z ** ZANY ZANY, n. A popular character in old Italian plays, who imitated with ludicrous incompetence the _buffone_, or clown, and was therefore the ape of an ape; for the clown himself imitated the serious characters of the play. The zany was progenitor to the specialist in humor, as we to-day have the unhappiness to know him. In the zany we see an example of creation; in the humorist, of transmission. Another excellent specimen of the modern zany is the curate, who apes the rector, who apes the bishop, who apes the archbishop, who apes the devil. ** ZANZIBARI ZANZIBARI, n. An inhabitant of the Sultanate of Zanzibar, off the eastern coast of Africa. The Zanzibaris, a warlike people, are best known in this country through a threatening diplomatic incident that occurred a few years ago. The American consul at the capital occupied a dwelling that faced the sea, with a sandy beach between. Greatly to the scandal of this official's family, and against repeated remonstrances of the official himself, the people of the city persisted in using the beach for bathing. One day a woman came down to the edge of the water and was stooping to remove her attire (a pair of sandals) when the consul, incensed beyond restraint, fired a charge of bird-shot into the most conspicuous part of her person. Unfortunately for the existing _entente cordiale_ between two great nations, she was the Sultana. ** ZEAL ZEAL, n. A certain nervous disorder afflicting the young and inexperienced. A passion that goeth before a sprawl. When Zeal sought Gratitude for his reward He went away exclaiming: "O my Lord!" "What do you want?" the Lord asked, bending down. "An ointment for my cracked and bleeding crown." Jum Coople ** ZENITH ZENITH, n. The point in the heavens directly overhead to a man standing or a growing cabbage. A man in bed or a cabbage in the pot is not considered as having a zenith, though from this view of the matter there was once a considerably dissent among the learned, some holding that the posture of the body was immaterial. These were called Horizontalists, their opponents, Verticalists. The Horizontalist heresy was finally extinguished by Xanobus, the philosopher-king of Abara, a zealous Verticalist. Entering an assembly of philosophers who were debating the matter, he cast a severed human head at the feet of his opponents and asked them to determine its zenith, explaining that its body was hanging by the heels outside. Observing that it was the head of their leader, the Horizontalists hastened to profess themselves converted to whatever opinion the Crown might be pleased to hold, and Horizontalism took its place among _fides defuncti_. ** ZEUS ZEUS, n. The chief of Grecian gods, adored by the Romans as Jupiter and by the modern Americans as God, Gold, Mob and Dog. Some explorers who have touched upon the shores of America, and one who professes to have penetrated a considerable distance to the interior, have thought that these four names stand for as many distinct deities, but in his monumental work on Surviving Faiths, Frumpp insists that the natives are monotheists, each having no other god than himself, whom he worships under many sacred names. ** ZIGZAG ZIGZAG, v.t. To move forward uncertainly, from side to side, as one carrying the white man's burden. (From _zed_, _z_, and _jag_, an Icelandic word of unknown meaning.) He zedjagged so uncomen wyde Thet non coude pas on eyder syde; So, to com saufly thruh, I been Constreynet for to doodge betwene. Munwele ** ZOOLOGY ZOOLOGY, n. The science and history of the animal kingdom, including its king, the House Fly (_Musca maledicta_). The father of Zoology was Aristotle, as is universally conceded, but the name of its mother has not come down to us. Two of the science's most illustrious expounders were Buffon and Oliver Goldsmith, from both of whom we learn (_L'Histoire generale des animaux_ and _A History of Animated Nature_) that the domestic cow sheds its horn every two years. * END -)(- Local Variables: mode: outline paragraph-separate: "[ ]*$" version-control: never End: dico-2.2/examples/glossary.scm000066400000000000000000000167071172612674100165020ustar00rootroot00000000000000;;;; This file is part of GNU Dico ;;;; Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff ;;;; ;;;; GNU Dico 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 3, or (at your option) ;;;; any later version. ;;;; ;;;; GNU Dico 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 Dico. If not, see . (define-module (glossary) #:use-module (guile-user) #:use-module (srfi srfi-13) #:use-module (ice-9 getopt-long) #:use-module (ice-9 rdelim) #:use-module (ice-9 regex)) (define glossary-descr #f) (define (ndict-error err . rest) (with-output-to-port (current-error-port) (lambda () (display err) (for-each display rest) (newline)))) (define empty-line-re (make-regexp "^[ \t]*$" regexp/extended)) (define comment-re (make-regexp "#.*$" regexp/extended)) (define entry-re (make-regexp "([a-z][a-z])[ \t]*(.*)" regexp/extended)) (define (prep-line line) (cond ((not (string? line)) line) ((regexp-exec comment-re line) => (lambda (match) (regexp-substitute #f match 'pre))) (else line))) (define (empty-line? line) (regexp-exec empty-line-re line)) (define (skip-newlines) (call-with-current-continuation (lambda (return) (do ((line (prep-line (read-line)) (prep-line (read-line)))) ((eof-object? line) #f) (if (not (empty-line? line)) (return line)))))) (define (read-entry) (let ((x (skip-newlines))) (if x (let ((entry '())) (do ((line x (prep-line (read-line)))) ((or (eof-object? line) (empty-line? line)) entry) (cond ((regexp-exec entry-re line) => (lambda (match) (set! entry (cons (cons (match:substring match 1) (match:substring match 2)) entry)))) (else (ndict-error "bad entry: " line))))) '()))) (define (read-file file) (let ((lst (list))) (with-input-from-file file (lambda () (do ((entry (read-entry) (read-entry))) ((null? entry)) (set! lst (cons entry lst))))) lst)) ;; (define (mapcan fun list) (apply (lambda ( . slist) (let loop ((elt '()) (slist slist)) (cond ((null? slist) (reverse elt)) ((not (car slist)) (loop elt (cdr slist))) (else (loop (cons (car slist) elt) (cdr slist)))))) (map fun list))) (define (make-dict-article ent) (cond ((null? (cdr ent)) (car ent)) (else (let ((str "")) (do ((lst ent (cdr lst)) (n 1 (1+ n))) ((null? lst)) (set! str (string-append str "\n" (number->string n) ". " (car lst)))) str)))) (define (make-dict data from to) (let ((dict '())) (for-each (lambda (entry) (let ((src (mapcan (lambda (x) (if (string=? (car x) from) (cdr x) #f)) entry)) (dst (mapcan (lambda (x) (if (string=? (car x) to) (cdr x) #f)) entry))) (for-each (lambda (x) (if (not (null? dst)) (set! dict (cons (cons x (make-dict-article dst)) dict)) #f)) src))) data) dict)) ;; Callbacks (define glossary-dict '()) (define (open-module name . rest) (let ((from #f) (to #f)) (for-each (lambda (arg) (let ((av (string-split arg #\=))) (case (length av) ((2) (cond ((string=? (car av) "from") (set! from (cadr av))) ((string=? (car av) "to") (set! to (cadr av))) (else (glossary-error "Unknown option " (car av))))) (else (glossary-error "Unknown option " (car av)))))) (cdr rest)) (cond ((not from) (glossary-error "from option is not given") #f) ((not to) (glossary-error "to option is not given") #f) (else (let ((dict (make-dict glossary-dict from to))) (cond ((= (length dict) 0) (glossary-error "No dictionary for " from "-" to " pair") #f) (else ; (write dict) (list from to name dict)))))))) (defmacro glossary:src (dbh) `(list-ref ,dbh 0)) (defmacro glossary:dst (dbh) `(list-ref ,dbh 1)) (defmacro glossary:name (dbh) `(list-ref ,dbh 2)) (defmacro glossary:db (dbh) `(list-ref ,dbh 3)) (define (descr dbh) glossary-descr) (define (info dbh) (string-append (glossary:name dbh) "\n" (or (descr dbh) "") " Headwords: " (number->string (length (glossary:db dbh))) "." "\n" "Copyright © 2008 Sergey Poznyakoff\n\ \n\ Permission is granted to copy, distribute and/or modify this document\n\ under the terms of the GNU Free Documentation License, Version 1.2 or\n\ any later version published by the Free Software Foundation; with no\n\ Invariant Sections, no Front-Cover and Back-Cover Texts")) (defmacro rh:define? (rh) `(car ,rh)) (defmacro rh:key (rh) `(list-ref ,rh 1)) (defmacro rh:result (rh) `(list-ref ,rh 2)) (define (match-exact dbh strat key) (mapcan (lambda (word) (and (string-ci=? (car word) key) (car word))) (glossary:db dbh))) (define (match-prefix dbh strat key) (mapcan (lambda (word) (and (string-prefix-ci? key (car word)) (car word))) (glossary:db dbh))) (define (match-suffix dbh strat key) (mapcan (lambda (word) (and (string-suffix-ci? key (car word)) (car word))) (glossary:db dbh))) (define (match-selector dbh strat key) (mapcan (lambda (word) (and (dico-strat-select? strat (car word) key) (car word))) (glossary:db dbh))) (define strategy-list (list (cons "exact" match-exact) (cons "prefix" match-prefix) (cons "suffix" match-suffix))) (define (match-default dbh strat word) (match-prefix dbh strat word)) (define (match-word dbh strat key) (let ((sp (assoc (dico-strat-name strat) strategy-list))) (let ((res (cond (sp ((cdr sp) dbh strat key)) ((dico-strat-selector? strat) (match-selector dbh strat key)) (else (match-default dbh strat key))))) (if res (list #f key res) #f)))) (define (define-word dbh key) (let ((res (mapcan (lambda (word) (if (string-ci=? (car word) key) (cdr word) #f)) (glossary:db dbh)))) (if (null? res) #f (list #t key res)))) (define (output rh n) (let ((res (rh:result rh))) (cond ((rh:define? rh) (display (rh:key rh)) (newline) (display (list-ref (rh:result rh) n))) (else (display (list-ref (rh:result rh) n)))))) (define (result-count rh) (length (rh:result rh))) (define-public (glossary-init name) (list (cons "open" open-module) (cons "descr" descr) (cons "info" info) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count))) ;; Main (let ((grammar `((info (value #t))))) (for-each (lambda (x) (cond ((pair? x) (case (car x) ((info) (set! glossary-descr (cdr x))) ('() (let ((arglist (cdr x))) (cond ((null? (cdr arglist)) (set! glossary-dict (read-file (car arglist)))) (else (ndict-error "Not enough arguments") (exit 1))))))))) (getopt-long (command-line) grammar))) (dico-register-strat "suffix" "Match word suffixes") dico-2.2/examples/listdict.scm000066400000000000000000000100641172612674100164440ustar00rootroot00000000000000;;;; This file is part of GNU Dico. ;;;; Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff ;;;; ;;;; GNU Dico 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 3, or (at your option) ;;;; any later version. ;;;; ;;;; GNU Dico 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 Dico. If not, see . */ (define-module (listdict) #:use-module (guile-user) #:use-module (ice-9 syncase) #:use-module (ice-9 format) #:use-module (srfi srfi-1)) (define-syntax db:get (syntax-rules (info descr name lang corpus) ((db:get dbh name) (list-ref dbh 0)) ((db:get dbh descr) (list-ref dbh 1)) ((db:get dbh info) (list-ref dbh 2)) ((db:get dbh lang) (list-ref dbh 3)) ((db:get dbh corpus) (list-tail dbh 4)))) (define (open-module name . rest) (let ((args rest)) (cond ((null? args) (format (current-error-port) "open-module: not enough arguments\n") #f) ((not (null? (cdr args))) (format (current-error-port) "open-module: too many arguments ~A\n" rest) #f) (else (let ((db (with-input-from-file (car args) (lambda () (read))))) (cond ((list? db) (cons name db)) (else (format (current-error-port) "open-module: ~A: invalid format\n" (car args)) #f))))))) (define (descr dbh) (db:get dbh descr)) (define (info dbh) (db:get dbh info)) (define (lang dbh) (db:get dbh lang)) (define (define-word dbh word) (let ((res (filter-map (lambda (elt) (and (string-ci=? word (car elt)) elt)) (db:get dbh corpus)))) (and res (cons #t res)))) (define (match-exact dbh strat word) (filter-map (lambda (elt) (and (string-ci=? word (car elt)) (car elt))) (db:get dbh corpus))) (define (match-prefix dbh strat word) (filter-map (lambda (elt) (and (string-prefix-ci? word (car elt)) (car elt))) (db:get dbh corpus))) (define (match-suffix dbh strat word) (filter-map (lambda (elt) (and (string-suffix-ci? word (car elt)) (car elt))) (db:get dbh corpus))) (define (match-selector dbh strat key) (filter-map (lambda (elt) (and (dico-strat-select? strat (car elt) key) (car elt))) (db:get dbh corpus))) (define strategy-list (list (cons "exact" match-exact) (cons "prefix" match-prefix) (cons "suffix" match-suffix))) (define match-default match-prefix) (define (match-word dbh strat key) (let ((sp (assoc (dico-strat-name strat) strategy-list))) (let ((res (cond (sp ((cdr sp) dbh strat (dico-key->word key))) ((dico-strat-selector? strat) (match-selector dbh strat key)) (else (match-default dbh strat (dico-key->word key)))))) (if res (cons #f res) #f)))) (define (output rh n) (if (car rh) ;; Result comes from DEFINE command (let ((res (list-ref (cdr rh) n))) (cond ((string=? (dico-current-markup) "html") (format #t "
~A
~%
~A
" (car res) (cdr res))) (else (display (car res)) (newline) (display (cdr res))))) ;; Result comes from MATCH command (display (list-ref (cdr rh) n)))) (define (result-count rh) (length (cdr rh))) (define (result-headers rh hdr) (list (cons "Content-Type" "text/plain; charset=UTF-8") (cons "Content-Transfer-Encoding" "quoted-printable"))) (define-public (listdict-init arg) (list (cons "open" open-module) (cons "descr" descr) (cons "info" info) (cons "lang" lang) (cons "define" define-word) (cons "match" match-word) (cons "output" output) (cons "result-count" result-count) (cons "result-headers" result-headers))) ;; (dico-register-strat "suffix" "Match word suffixes") (dico-register-markup "html") dico-2.2/examples/numerals-cz.txt000066400000000000000000000023311172612674100171200ustar00rootroot00000000000000-- To handle this file use textdict.py from this directory. -- Format: -- Comments begin with double-dash. -- Empty lines are ignored. -- There may be at most one `descr:' entry. descr: Short English-Czech numerals dictionary -- Any number of `info:' entries are allowed. These are concatenated -- to make a single info statement. info: Short English-Czech dictionary of numerals (1 - 10) info: Hardly worth copyrighting, but just in case: info: info: This dictionary is public domain. You can do with it whatever you info: like to do, except changing the meaning of the words, of course. -- A single `lang:' statement is allowed, which informs about the languages -- this dictionary supports. Its arguments are two space-delimited lists of -- language abbreviations, separated by a colon. The list on the left gives -- `source' languages, i.e. the ones in which the headwords are written, -- and the list on the right gives `destination' languages, i.e. the ones to -- which the headwords are translated. lang: en : cz -- Anything having two fields is taken to be a word definition: one jeden two dva three tÅ™i four ÄtyÅ™i five pÄ›t six Å¡est seven sedm eight osm nine devÄ›t ten deset -- Errors are silently ignored: bye dico-2.2/examples/numerals-pl.ldb000066400000000000000000000013151172612674100170420ustar00rootroot00000000000000;; -*- scheme -*- ;; To handle this file use the listdict.scm module. (; Short info (for show db): "Short English-Polish numerals dictionary" ; Complete info (for show info): "Short English-Polish dictionary of numerals (1 - 10)\n\ Hardly worth copyrighting, but just in case:\n\ \n\ This dictionary is public domain. You can do with it whatever you\n\ info: like to do, except changing the meaning of the words, of course.\n" ; Supported languages (source . dest): ("en" . "pl") ; Dictionary corpus ("one" . "jeden") ("two" . "dwa") ("three" . "trzy") ("four" . "cztery") ("five" . "piÄ™c") ("six" . "sześć") ("seven" . "siedem") ("eight" . "osiem") ("nine" . "dziewięć") ("ten" . "dziesięć")) dico-2.2/examples/textdict.py000066400000000000000000000074151172612674100163310ustar00rootroot00000000000000#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008, 2010, 2012 Sergey Poznyakoff # Copyright (C) 2008, 2012 Wojciech Polak # # GNU Dico 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 3, or (at your option) # any later version. # # GNU Dico 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 Dico. If not, see . import dico import sys class DicoResult: result = {} compcount = 0 def __init__ (self, *argv): self.result = argv[0] if len (argv) == 2: self.compcount = argv[1] def count (self): return len (self.result) def output (self, n): pass def append (self, elt): self.result.append (elt) class DicoDefineResult (DicoResult): def output (self, n): print "%d. %s" % (n + 1, self.result[n]) print "---------", class DicoMatchResult (DicoResult): def output (self, n): sys.stdout.softspace = 0 print self.result[n], class DicoModule: adict = {} dbname = '' filename = '' mod_descr = '' mod_info = [] langlist = () def __init__ (self, *argv): self.filename = argv[0] pass def open (self, dbname): self.dbname = dbname file = open (self.filename, "r") for line in file: if line.startswith ('--'): continue if line.startswith ('descr: '): self.mod_descr = line[7:].strip (' \n') continue if line.startswith ('info: '): self.mod_info.append (line[6:].strip (' \n')) continue if line.startswith ('lang: '): s = line[6:].strip (' \n').split(':', 2) if (len(s) == 1): self.langlist = (s[0].split (), s[0].split ()) else: self.langlist = (s[0].split (), s[1].split ()) continue f = line.strip (' \n').split (' ', 1) if len (f) == 2: self.adict[f[0].lower()] = f[1].strip (' ') file.close() return True def close (self): return True def descr (self): return self.mod_descr def lang (self): return self.langlist def info (self): return '\n'.join (self.mod_info) def define_word (self, word): if self.adict.has_key (word): return DicoDefineResult ([self.adict[word]]) return False def match_word (self, strat, key): if strat.name == "exact": if self.adict.has_key (key.word.lower ()): return DicoMatchResult ([self.adict[key.word.lower()]]) elif strat.name == "prefix": res = [] for w in self.adict: if w.startswith (key.word): res.append (w) if len (res): return DicoMatchResult (res, len (self.adict)) elif strat.has_selector: res = DicoMatchResult ([], len (self.adict)) for k in self.adict: if strat.select (k, key): res.append (k) if res.count > 0: return res return False def output (self, rh, n): rh.output (n) return True def result_count (self, rh): return rh.count () def compare_count (self, rh): return rh.compcount dico-2.2/gint/000077500000000000000000000000001172612674100132435ustar00rootroot00000000000000dico-2.2/gint/Makefile.am000066400000000000000000000017251172612674100153040ustar00rootroot00000000000000# This file is part of Gint # Copyright (C) 2010 Sergey Poznyakoff # # 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 3, 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, see . EXTRA_DIST = \ clexer.l\ gint.m4\ gint.mk\ guile.m4\ snarf-doc-filter\ extract-exports if GINT_COND_DOC if GINT_COND_SNARF_DOC_FILTER noinst_SCRIPTS = snarf-doc-filter else noinst_PROGRAMS = clexer clexer_SOURCES = clexer.l INCLUDES = @GINT_INCLUDES@ LDADD = @GINT_LDADD@ endif endif dico-2.2/gint/Makefile.in000066400000000000000000001265041172612674100153200ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of Gint # Copyright (C) 2010 Sergey Poznyakoff # # 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 3, 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, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @GINT_COND_DOC_TRUE@@GINT_COND_SNARF_DOC_FILTER_FALSE@noinst_PROGRAMS = clexer$(EXEEXT) subdir = gint DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ clexer.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__clexer_SOURCES_DIST = clexer.l @GINT_COND_DOC_TRUE@@GINT_COND_SNARF_DOC_FILTER_FALSE@am_clexer_OBJECTS = clexer.$(OBJEXT) clexer_OBJECTS = $(am_clexer_OBJECTS) clexer_LDADD = $(LDADD) clexer_DEPENDENCIES = AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent SCRIPTS = $(noinst_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) AM_V_LEX = $(am__v_LEX_$(V)) am__v_LEX_ = $(am__v_LEX_$(AM_DEFAULT_VERBOSITY)) am__v_LEX_0 = @echo " LEX " $@; YLWRAP = $(top_srcdir)/build-aux/ylwrap AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(clexer_SOURCES) DIST_SOURCES = $(am__clexer_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ clexer.l\ gint.m4\ gint.mk\ guile.m4\ snarf-doc-filter\ extract-exports @GINT_COND_DOC_TRUE@@GINT_COND_SNARF_DOC_FILTER_TRUE@noinst_SCRIPTS = snarf-doc-filter @GINT_COND_DOC_TRUE@@GINT_COND_SNARF_DOC_FILTER_FALSE@clexer_SOURCES = clexer.l @GINT_COND_DOC_TRUE@@GINT_COND_SNARF_DOC_FILTER_FALSE@INCLUDES = @GINT_INCLUDES@ @GINT_COND_DOC_TRUE@@GINT_COND_SNARF_DOC_FILTER_FALSE@LDADD = @GINT_LDADD@ all: all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gint/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits gint/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clexer$(EXEEXT): $(clexer_OBJECTS) $(clexer_DEPENDENCIES) @rm -f clexer$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clexer_OBJECTS) $(clexer_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clexer.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f clexer.c clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # 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: dico-2.2/gint/README000066400000000000000000000520641172612674100141320ustar00rootroot00000000000000////////////////////////////////////////////////////////////// This file is in AsciiDoc format. Use the following command to convert it to HTML: asciidoc README See end of file for copyright statement. ////////////////////////////////////////////////////////////// GINT ==== Sergey Poznyakoff 2, May 11, 2010 NAME ---- GINT -- Guile Integration Framework DESCRIPTION ----------- Integrating *Guile* into a project consists of a set of routine steps, which, however trivial, require additional efforts from authors and impose on them an extra maintenance burden. These steps include, among others, checking for the presence of Guile, determining its version number, and creating additional Makefile rules. Authors maintaining several projects that use Guile as an extension language, soon find out that these steps differ only insigificantly between the projects. It is therefore natural to move their _common denominator_ into a separate module and share this module between the projects. *GINT* is an attempt to create such a module. It reduces the task of integrating Guile to importing a submodule and editing a couple of files. *GINT* is designed as a Git submodule easily embeddable into any project. The only requirement for this host project is that it must use GNU Automake and Autoconf. It is also recommended, but not required, that the host project use Git for its repository. INSTALLATION ------------ To illustrate how to use *GINT*, let's suppose your project has the following structure: .Sample project listing --------------------------------------------------------------------- -rw-r--r-- 1 gray users 2993 2010-04-05 00:15 Makefile.am <1> -rw-r--r-- 1 gray users 3026 2010-04-05 19:21 configure.ac <2> drwxr-xr-x 2 gray users 240 2010-04-05 02:27 m4/ <3> drwxr-xr-x 5 gray users 1992 2010-04-05 19:20 src/ <4> -rw-r--r-- 1 gray users 1286 2010-04-05 13:18 src/Makefile.am <5> -rw-r--r-- 1 gray users 1034 2010-04-05 13:18 src/iface.c --------------------------------------------------------------------- <1> Top-level +Makefile+ source. <2> Configuration script source. <3> Directory with macro definitions for *aclocal*. <4> Source directory. It contains actual _C_ and +scm+ sources, which define new *Guile* interfaces. <5> Source +Makefile.am+. The purpose of *GINT* is to provide the autotools magic necessary to check, at configure time, whether Guile is installed, determine its version number and location of its components on the local file system, then to compile and _snarf_ the _C_ sources, and finally, to produce the documentation files (+guile-procedures.texi+ and +guile-procedures.txt+). Installation of *GINT* consists of the following four steps: 1. Importing +gint+ submodule. 2. Editing the top-level +Makefile.am+ 3. Editing +configure.ac+ 4. Editing source +Makefile.am+. These steps are described in detail in the following subsections. Import GINT as a submodule ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This needs to be done only once: ---------------------------------------------------- git submodule add git://git.gnu.org.ua/gint.git gint git submodule init ---------------------------------------------------- [[gint-dir]] The *submodule add* command takes two arguments: the submodule repository, which should be exactly as shown above, and the pathname of the cloned submodule in your project. This latter is entirely at your option. Throughout this document we will suppose that the module pathname is +gint+. You will need to adjust the examples if you chose another name for it. Edit the toplevel +Makefile.am+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add +-I gint+ to the +ACLOCAL_AMFLAGS+ variable, and +gint+ to the +SUBDIRS+ variable. For example: ---------------------------------------- ACLOCAL_AMFLAGS = -I m4 -I gint SUBDIRS = gint src ---------------------------------------- Notice that in +SUBDIRS+, the +gint+ entry must precede the names of those directories that depend on it. Edit the +configure.ac+ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Obviously, you need to add the submodule's Makefile to the list of +AC_CONFIG_FILES+, e.g.: ---------------------------------------- AC_CONFIG_FILES(Makefile gint/Makefile src/Makefile) ---------------------------------------- Next, add a call to <> at an appropriate point. This macro serves two purposes. First, it informs the +gint+ submodule about its location relative to the top project directory and configures its features. Second, it checks for the presence of Guile's binaries and libraries, verifies if its version is modern enough, and runs a series of user-supplied commands, depending on the result of this check. In a simplest case, the following line will be enough: --------- GINT_INIT --------- For a detailed discussion, see the <>. Edit source `Makefile.am` ~~~~~~~~~~~~~~~~~~~~~~~~~ The source `Makefile.am` (or `Makefile.am`'s, if there are several of these, in separate directories) must include the file `gint/gint.mk`, which provides +Makefile+ rules necessary to properly build various files (e.g. +.x+ and +.doc+ files from corresponding +.c+ sources, etc) and to compute dependencies between them. Usually, it is OK to use a relative location. For example, in our sample project the `gint` and `src` directories have same parent directory, therefore we could add to `src/Makefile.am` the following line: ----------------------- include ../gint/gint.mk ----------------------- The rules in `gint.mk` make certain assumptions about some `Makefile` variables. Namely, the following variables must be defined before including the file: +INCLUDES+, +EXTRA_DIST+, +CLEANFILES+, +DISTCLEANFILES+, +SUFFIXES+, +BUILT_SOURCES+. See the http://sources.redhat.com/automake/automake.html[`Automake` documentation], for more info on these. If no special value is needed, define each of them to an empty string (see example below). Firthermore, the +MAKEINFO+ variable must contain the pathname (not necessarily an absolute one), of the +makeinfo+ binary. It is initialized by +Automake+ if your project contains a `Makefile.am` with the +info_TEXINFOS+ variable set. If not, you will have to initialize it manually. Finally, the following +GINT+-specific variables must be defined: sitedir:: The location where to install site-specific Guile modules. We advise to set it to: --------------------------------- sitedir = @GUILE_SITE@/$(PACKAGE) --------------------------------- See <>, for a detailed discussion of sitedir. site_DATA:: A list of modules to install to +sitedir+. DOT_X_FILES:: A list of +.x+ files to be generated. DOT_DOC_FILES:: A list of +.doc+ files to be generated. These two can be easily produced from the list of source +c+ files using http://www.gnu.org/software/make/manual/html_node/Substitution-Refs.html[+make+ substitution references]: ----------------------------------------------- lib_LTLIBRARIES = libproj.la libproj_la_SOURCES = iface.c var.c INCLUDES =-I$(top_builddir) -I$(srcdir) EXTRA_DIST= DOT_X_FILES=$(libproj_la_SOURCES:.c=.x) DOT_DOC_FILES=$(libproj_la_SOURCES:.c=.doc) sitedir = @GUILE_SITE@/$(PACKAGE) site_DATA = proj.scm SUFFIXES= CLEANFILES= DISTCLEANFILES= include ../gint/gint.mk ------------------------------------------------ [[GINT_INIT]] The +GINT_INIT+ macro --------------------- ------------------------------------------------------------- GINT_INIT(DIR, OPTIONS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) ------------------------------------------------------------- This macro configures +GINT+ submodule, located in subdirectory `DIR` according to the settings given in `OPTIONS`. It then verifies if Guile is installed on the system and if so executes commands supplied by `ACTION-IF-FOUND`. Additionaly, it sets a number of <> describing various details of Guile installation. Otherwise, if Guile is not installed or is found to be unusable, `ACTION-IF-NOT-FOUND` is executed. All parameters are optional: DIR:: +GINT+ <> (defaults to `gint`). OPTIONS:: A whitespace-separated list of options. ACTION-IF-FOUND:: Commands to execute if Guile is present. IF-NOT-FOUND:: Commands to execute if Guile is not found or its version is too old. If not given, the default action is to print a diagnostic message on the standard error and abort execution. The +OPTIONS+ parameter offers a way to control the functionality provided by +GINT_INIT+. Its value is a whitespace-separated list of words. Each word must be either the name of an option, or the minimum (i.e. the oldest) allowed version of Guile. For example, to check for Guile 1.8 or later one could write: ------------------------ GINT_INIT([gint], [1.8]) ------------------------ The following is a list of valid options: nodoc:: Disable generation of +.doc+ files (see <>). inc:: Enable generation of `.inc` files. Each such file contains a set of `export` statements, one for each `SCM_DEFINE` in the corresponding `.c` source file. Normally this option is not needed, because it is more appropriate to define public interfaces using `SCM_DEFINE_PUBLIC` macro. std-site-dir:: Set <> to the standard Guile site directory, as returned by the +%site-dir+ primitive. + This is one of the locations where Guile looks for its modules. However, this setting breaks standard `distcheck` rules and automated builds, because this directory is normally outside of the installation prefix. Therefore by default, +GINT+ does not use it. <>, for a description of the method used to determine site directory. snarf-doc-filter:: Use +snarf-doc-filter+ to extract docstrings from _C_ files. *GINT* offers two programs for extraction of Scheme docstrings from _C_ sources. By default, the _C_ implementation is used, mainly because it is much faster than its Scheme counterpart. By supplying the +snarf-doc-filter+ option, you instruct *GINT* to use Scheme implementation instead. See the section <> for a detailed discussion. [[option-generators]] By default, the generated +configure+ script always checks for Guile. The following options modify this behavior: with-guile:: Add a +--with-guile+ option to configure. Do not check for Guile if configure was called with +--with-guile=no+ (or +--without-guile+). without-guile:: Same as above, except that Guile checks are disabled by default. I.e. the configure script checks for Guile only if invoked with the +--with-guile+ option. enable-guile:: Add a +--enable-guile+ option to configure. Do not check for Guile if configure was called with +--enable-guile=no+ (or +--disable-guile+). disable-guile:: Same as above, except that Guile checks are disabled by default. I.e. the configure script checks for Guile only if invoked with the +--enable-guile+ option. Only one of these four options may be given to a +GINT_INIT+ invocation. If the check for Guile was disabled at configure time, either by default or by the user's request, the action of +GINT_INIT+ depends on whether it had been given the +ACTION-IF-NOT-FOUND+ argument. If not, +GINT_INIT+ does nothing. Otherwise, the +ACTION-IF-NOT-FOUND+ argument is executed just as if Guile has not been found. If you need to discern between various failure reasons (`check disabled` vs. `Guile not found` or vs. `Guile version too low`), use the <> variable. Here is a more complex example of +GINT_INIT+ usage: .+GINT_INIT+ macro ------------------------------------------------------- GINT_INIT([modules/gint], [1.8 with-guile std-site-dir], [use_guile=yes], [use_guile=no]) ------------------------------------------------------- This fragment initializes the +GINT+ module located in `modules/gint` and checks for Guile version 1.8 or newer. The resulting script understands the +--with-guile+ option and sets <> to the standard Guile site directory. The shell variable `use_guile` is set to `yes` or `no`, depending on whether Guile was found or not. Notice, that you may not use this macro within a shell conditional, or within any +Autoconf+ macro that generates such a conditional. In particular, the following invocation is wrong: .*Wrong usage* ----------------------------------------- AC_ARG_WITH([guile], [GINT_INIT([modules/gint])]) ----------------------------------------- Instead, use one of the <> options, described above. [[gint-subst-vars]] Substitution Variables ---------------------- Upon successful return, +GINT_INIT+ sets the following Automake substitution variables: [[GUILE_VERSION]] GUILE_VERSION:: The version of Guile, as a string, e.g. `1.9.9`. Additionally, a _C_ preprocessor macro with the same name is defined. [[GUILE_VERSION_NUMBER]] GUILE_VERSION_NUMBER:: The version of Guile packed into a decimal number using the following formula: + --------------------------------------- MAJOR * 1000 + MINOR * 100 + PATCHLEVEL --------------------------------------- + where `MAJOR`, `MINOR` and `PATCHLEVEL` are the three parts of a version number, separated by dots. For example, the version string `1.9.9` will produce the value `1909`, and the version `2.0` will yield `2000`. + A _C_ preprocessor macro with the same name is also defined. GUILE_INCLUDES:: _C_ compiler flags needed to compile with Guile, as returned by `guile-config compile`. GUILE_LIBS:: Loader flags and additional libraries needed to link with +libguile+, as returned by `guile-config link`. GUILE_SNARF:: The full pathname of the `guile-snarf` binary. GUILE_TOOLS:: The full pathname of the `guile-tools` binary. [[sitedir]] GUILE_SITE:: The full pathname of the Guile site-wide module directory. [[gint-shell-vars]] Shell Variables --------------- The +GINT_INIT+ macro sets the following shell variables: gint_enable_guile:: By default, set to `yes`. If an <> option was used, this variable is set to `no` if the *Guile* checks were disabled (either by default or by the user request) and to `yes` otherwise. [[gint_guile_status]] gint_guile_status:: This variable contains the status of the last check. It is `ok`, if the check has passed, `badversion` if the Guile version is older than the requested minimum and `cantlink` if Guile was found but the attempt to link a test program had failed. You may use this variable in the +ACTION-IF-NOT-FOUND+ argument to +GINT_INIT+ to discern between various reasons for failure. [[gint_guile_debug]] gint_guile_debug:: Set if guile supports the debugging macros (i.e. +SCM_DEVAL_P+, +SCM_BACKTRACE_P+, +SCM_RECORD_POSITIONS_P+ and SCM_RESET_DEBUG_MODE). [[config.h defines]] Config.h Defines ---------------- GUILE_DEBUG_MACROS:: Defined if guile supports the debugging macros (i.e. +SCM_DEVAL_P+, +SCM_BACKTRACE_P+, +SCM_RECORD_POSITIONS_P+ and SCM_RESET_DEBUG_MODE). See also the <> variable. GUILE_VERSION:: Same as the <> substitution variable. GUILE_VERSION_NUMBER:: Same as the <> substitution variable. [[doc-snarfing]] Doc Snarfing ~~~~~~~~~~~~ Guile interfaces are defined in _C_ files using +SCM_DEFINE+ or +SCM_DEFINE_PUBLIC+ macros. Among other parameters, these macros also allow to specify a _docstring_ for the interface being defined. _Doc snarfing_ is a process of extraction these docstrings from _C_ sources and combining them into two text files: +guile-procedures.texi+, a _Texinfo_ document suitable for inclusion in the project's documentation, and +guile-procedures.txt+, which is installed along with the rest of files and is used by Guile's +help+ function. Apart from this primary goal, doc snarfing also serves to catch some minor programming errors, such as using incorrect +SCM_ARG+_n_ macro in +SCM_ASSERT+, etc. Doc snarfing consists of two phases. _C_ preprocessor is used on the source file and its output is piped to a special program, called _snarf filter_. The purpose of the snarf filter is to extract Guile-related information from the preprocessed source. This information is stored in a file with the +.doc+ suffix. The +.doc+ files created in this phase are then used to produce final files: +guile-procedures.texi+ and +guile-procedures.txt+. The +guile-procedures.texi+ file is created by concatenating all +.doc+ files together and applying the +guile-tools snarf-check-and-output-texi+ command to the resulting document. This command is a part of Guile installation. The +guile-procedures.txt+ is created by invoking +makeinfo+ with the +guile-procedures.texi+ file as input. Unfortunately, Guile installation does not include any snarf filter program. *GINT* fixes this oversight and offers two filter implementations: clexer:: This is a default implementation. It is written in _C_ and is extremely efficient. During bootstrap it requires *flex* to convert the +clexer.l+ file into a _C_ source which is then distributed with the package. Of course, *flex* is needed only during the bootstrap, it is not required to compile from a packaged source. snarf-doc-filter:: A filter written entirely in Scheme. It does not require compilation, but is significantly slower than +clexer+ and therefore is not used by default. If you wish to use it, add the +snarf-doc-filter+ option to the invocation of +GINT_INIT+. It may be feasible only if you require Guile 1.9.8 or later. The +clexer.l+ source is written so as to not require any special attention from your part. The only two points that are worth mentioning are: 1. It includes ++ if the preprocessor symbol +HAVE_CONFIG_H+ is defined. 2. It uses +strerror+ function to convert _C_ error numbers to text. You may wish to supply additional command line options for compiling it, if your +config.h+ is placed in an unusual location or includes another file, not accessible within the normal include path and/or if you wish to supply a replacement for +strerror+ on systems that lack it (which is extremely rare nowadays). To do so, define variables +GINT_INCLUDES+ and/or +GINT_LDADD+ in the `ACTION-IF-FOUND` argument to +GINT_INIT+: GINT_INCLUDES:: Specifies additional command line options to be appended to the +INCLUDES+ statement in +gint/Makefile.am+. GINT_LDADD:: Specifies additional command line options to be appended to the +LDADD+ statement in +gint/Makefile.am+. Notice also that if your code does not require doc snarfing, you may disable it by supplying the +nodoc+ option to the invocation of +GINT_INIT+. [[guile-site-dir]] THE `SITE DIRECTORY' PROBLEM ---------------------------- Projects installing some Scheme sources would normally want to install them under Guile's 'site directory' (+%site-dir+ Guile primitive). This way, Guile will be able to find them without any additional configuration. However, such usage breaks the standard GNU practice of not installing files outside of project's install prefix, unless the user explicitly requires so. As a consequence, it also breaks the standard `make distcheck` rule. To avoid this, configuration code generated by +GINT+ macros determines the location of the site directory using the following algorithm: 1. Determine actual value of the default Guile site directory, by inspecting the value returned by the +%site-dir+ primitive. 2. If that value lies under the current installation prefix, it is accepted as the installation directory. 3. Otherwise, if the +--with-guile-site-dir+ option is supplied: a. If it is used without arguments, +%site-dir+ is enforced as the installation directory. b. Otherwise, the value of this option is taken as new site directory. Notice, that this value must be an absolute directory name. 4. Otherwise, a warning is issued and `$(datadir)/guile/site` is used as the site directory. The use if this algorithm is suppressed and Guile site directory is used instead, if the <> macro was invoked with the +std-site-dir+ option. FILES ----- The package consists of the following files: ------------------------------------------------------ Makefile.am <1> README <2> clexer.l <3> extract-exports <4> gint.m4 <5> gint.mk <6> guile.m4 <7> snarf-doc-filter <8> ------------------------------------------------------ <1> Makefile for building +GINT+ components. <2> The source file for this documentation. <3> Source of the +clexer+, a program for extracting docstrings and similar information from C files. <4> Auxiliary program for converting +.doc+ files into a series of Guile +export+ declarations. <5> Source of the +GINT_INIT+ macro. <6> Makefile to be included from the host project's +Makefile.am+. <7> Auxiliary defines for +GINT_INIT+. <8> Alternative implementation of +clexer+, written in Scheme. COPYRIGHT --------- [verse] Copyright (C) 2010 http://gray.gnu.org.ua[Sergey Poznyakoff] License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html[]. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. dico-2.2/gint/clexer.c000066400000000000000000001657411172612674100147070ustar00rootroot00000000000000#line 20 "clexer.l" #ifdef HAVE_CONFIG_H # include #endif #line 9 "clexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 66 #define YY_END_OF_BUFFER 67 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[123] = { 0, 0, 0, 67, 65, 4, 3, 32, 65, 65, 38, 28, 65, 24, 25, 36, 35, 21, 34, 41, 37, 9, 9, 22, 64, 61, 23, 58, 31, 6, 6, 26, 5, 27, 29, 19, 30, 20, 33, 4, 55, 0, 17, 0, 0, 2, 44, 53, 49, 0, 0, 42, 62, 45, 63, 46, 40, 0, 15, 0, 43, 16, 8, 9, 14, 9, 9, 0, 9, 60, 59, 54, 56, 57, 6, 0, 0, 0, 51, 18, 50, 52, 10, 0, 0, 0, 0, 39, 0, 15, 0, 0, 0, 15, 0, 16, 8, 8, 8, 14, 7, 47, 48, 11, 12, 0, 11, 13, 0, 15, 1, 0, 15, 0, 16, 7, 7, 7, 0, 13, 0, 15, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 21, 22, 23, 24, 25, 26, 1, 27, 27, 27, 27, 28, 29, 30, 30, 30, 30, 30, 31, 30, 30, 30, 30, 30, 30, 30, 30, 32, 30, 30, 33, 30, 30, 34, 35, 36, 37, 30, 1, 27, 27, 27, 27, 38, 29, 30, 30, 30, 30, 30, 39, 30, 30, 30, 30, 30, 30, 30, 30, 40, 30, 30, 33, 30, 30, 41, 42, 43, 44, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[45] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 4, 4, 4, 1, 1, 1, 1, 3, 4, 4, 1, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[132] = { 0, 0, 0, 200, 260, 191, 260, 162, 40, 182, 159, 38, 146, 260, 260, 156, 34, 260, 35, 33, 42, 60, 37, 260, 260, 40, 145, 43, 260, 0, 52, 260, 260, 260, 70, 260, 41, 260, 260, 163, 260, 66, 260, 0, 160, 260, 260, 260, 260, 144, 63, 260, 260, 260, 260, 260, 260, 133, 90, 74, 260, 112, 136, 0, 56, 58, 260, 0, 59, 112, 260, 260, 260, 99, 0, 68, 82, 67, 260, 260, 260, 260, 260, 107, 93, 96, 0, 260, 107, 260, 121, 132, 96, 159, 176, 260, 103, 260, 106, 260, 107, 260, 260, 260, 260, 139, 260, 0, 141, 153, 260, 186, 260, 189, 192, 131, 260, 135, 97, 260, 195, 198, 260, 237, 241, 245, 247, 251, 255, 81, 71, 45 } ; static yyconst flex_int16_t yy_def[132] = { 0, 122, 1, 122, 122, 122, 122, 122, 123, 124, 122, 122, 125, 122, 122, 122, 122, 122, 122, 122, 122, 122, 21, 122, 122, 122, 122, 122, 122, 126, 126, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 122, 123, 124, 122, 122, 122, 122, 122, 127, 122, 122, 122, 122, 122, 122, 122, 122, 128, 122, 122, 122, 22, 122, 122, 122, 129, 122, 122, 122, 122, 122, 122, 126, 123, 125, 122, 122, 122, 122, 122, 122, 122, 122, 122, 130, 122, 122, 122, 128, 128, 128, 122, 122, 122, 122, 122, 122, 122, 129, 122, 122, 122, 122, 122, 122, 131, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 0, 122, 122, 122, 122, 122, 122, 122, 122, 122 } ; static yyconst flex_int16_t yy_nxt[305] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 29, 30, 29, 29, 31, 32, 33, 34, 29, 29, 29, 35, 36, 37, 38, 42, 47, 52, 119, 57, 54, 58, 58, 58, 59, 63, 63, 75, 53, 55, 56, 76, 48, 69, 70, 80, 60, 72, 73, 77, 122, 42, 77, 42, 107, 43, 61, 91, 62, 62, 63, 84, 85, 81, 100, 99, 92, 99, 64, 66, 66, 65, 66, 67, 78, 99, 86, 66, 66, 68, 66, 43, 104, 43, 79, 106, 104, 79, 58, 58, 58, 105, 105, 110, 105, 105, 103, 50, 88, 89, 108, 89, 108, 102, 91, 109, 109, 109, 88, 89, 93, 93, 93, 92, 97, 91, 101, 97, 115, 116, 94, 95, 97, 95, 92, 97, 117, 116, 104, 87, 94, 95, 61, 82, 62, 62, 63, 118, 118, 109, 109, 109, 116, 45, 64, 39, 116, 96, 97, 71, 116, 109, 109, 109, 116, 98, 97, 93, 93, 93, 51, 50, 89, 46, 89, 45, 40, 111, 112, 113, 112, 113, 89, 39, 114, 114, 114, 111, 112, 120, 122, 120, 122, 122, 121, 121, 121, 114, 114, 114, 114, 114, 114, 121, 121, 121, 121, 121, 121, 122, 122, 95, 122, 95, 122, 122, 122, 112, 122, 112, 122, 95, 122, 122, 122, 122, 122, 112, 41, 41, 41, 41, 44, 44, 44, 44, 49, 122, 49, 49, 74, 74, 83, 83, 83, 83, 90, 90, 90, 90, 3, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 } ; static yyconst flex_int16_t yy_chk[305] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 11, 16, 131, 19, 18, 19, 19, 19, 20, 22, 22, 30, 16, 18, 18, 30, 11, 25, 25, 36, 20, 27, 27, 77, 22, 41, 34, 75, 130, 8, 21, 59, 21, 21, 21, 50, 50, 36, 129, 64, 59, 64, 21, 65, 68, 21, 21, 21, 34, 64, 50, 65, 68, 21, 21, 41, 84, 75, 77, 85, 118, 34, 58, 58, 58, 84, 84, 92, 85, 85, 83, 76, 58, 58, 88, 58, 88, 73, 90, 88, 88, 88, 58, 58, 61, 61, 61, 90, 96, 91, 69, 98, 100, 100, 61, 61, 96, 61, 91, 98, 100, 100, 105, 57, 61, 61, 62, 49, 62, 62, 62, 105, 105, 108, 108, 108, 115, 44, 62, 39, 117, 62, 62, 26, 115, 109, 109, 109, 117, 62, 62, 93, 93, 93, 15, 12, 109, 10, 109, 9, 7, 93, 93, 94, 93, 94, 109, 5, 94, 94, 94, 93, 93, 111, 3, 111, 0, 0, 111, 111, 111, 113, 113, 113, 114, 114, 114, 120, 120, 120, 121, 121, 121, 0, 0, 114, 0, 114, 0, 0, 0, 121, 0, 121, 0, 114, 0, 0, 0, 0, 0, 121, 123, 123, 123, 123, 124, 124, 124, 124, 125, 0, 125, 125, 126, 126, 127, 127, 127, 127, 128, 128, 128, 128, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "clexer.l" /* clexer -- show lexical structure of a C file. Copyright (C) 2010 Sergey Poznyakoff 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 3, 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, see . */ #line 26 "clexer.l" #include #include #include #include enum state { s_init, s_multiline, s_cookie_multiline, s_cookie }; enum token { t_token = 256, t_open, t_close, t_cookie }; const char *progname; char *infilename; char *outfilename; int guile_snarfer_mode; enum state state; FILE *outfile; unsigned line_no = 1; static void advance_line (const char *text) { for (; *text; text++) if (*text == '\n') line_no++; } #define outstr(text) \ do \ if (state != s_init) \ fprintf (outfile, "%s\n", text); \ while (0) #define outtok(tname,tval) \ do \ if (state != s_init) \ fprintf (outfile, "(%s . \"%s\")\n", \ tname, tval); \ while (0) #define RETTOK(t) { outstr (#t); return t_token; } #define RETTXT(t,s) { outtok (#t, s); return t_token; } #line 639 "clexer.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy (void ); int yyget_debug (void ); void yyset_debug (int debug_flag ); YY_EXTRA_TYPE yyget_extra (void ); void yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *yyget_in (void ); void yyset_in (FILE * in_str ); FILE *yyget_out (void ); void yyset_out (FILE * out_str ); int yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 90 "clexer.l" #line 823 "clexer.c" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 123 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 260 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 91 "clexer.l" { advance_line (yytext); outtok ("comment", yytext); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 93 "clexer.l" { outstr ("hash"); line_no++; } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP #line 94 "clexer.l" { outstr ("eol"); line_no++; } YY_BREAK case 4: YY_RULE_SETUP #line 95 "clexer.l" ; YY_BREAK case 5: YY_RULE_SETUP #line 96 "clexer.l" ; YY_BREAK case 6: YY_RULE_SETUP #line 97 "clexer.l" RETTXT (id, yytext); YY_BREAK case 7: YY_RULE_SETUP #line 98 "clexer.l" RETTXT (int_hex, yytext + 2); YY_BREAK case 8: YY_RULE_SETUP #line 99 "clexer.l" RETTXT (int_oct, yytext + 1); YY_BREAK case 9: YY_RULE_SETUP #line 100 "clexer.l" RETTXT (int_dec, yytext); YY_BREAK case 10: /* rule 10 can match eol */ #line 102 "clexer.l" case 11: /* rule 11 can match eol */ #line 103 "clexer.l" case 12: /* rule 12 can match eol */ #line 104 "clexer.l" case 13: /* rule 13 can match eol */ YY_RULE_SETUP #line 104 "clexer.l" RETTXT (char, yytext); YY_BREAK case 14: #line 106 "clexer.l" case 15: #line 107 "clexer.l" case 16: YY_RULE_SETUP #line 107 "clexer.l" RETTXT (flo_dec, yytext); YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP #line 108 "clexer.l" { outstr (yytext); advance_line (yytext); } YY_BREAK case 18: YY_RULE_SETUP #line 110 "clexer.l" { fputs ("snarf_cookie\n", outfile); return t_cookie; } YY_BREAK case 19: YY_RULE_SETUP #line 112 "clexer.l" { outstr ("brace_open"); return t_open; } YY_BREAK case 20: YY_RULE_SETUP #line 113 "clexer.l" { outstr ("brace_close"); return t_close; } YY_BREAK case 21: YY_RULE_SETUP #line 114 "clexer.l" RETTOK (comma); YY_BREAK case 22: YY_RULE_SETUP #line 115 "clexer.l" RETTOK (colon); YY_BREAK case 23: YY_RULE_SETUP #line 116 "clexer.l" RETTOK (assign); YY_BREAK case 24: YY_RULE_SETUP #line 117 "clexer.l" RETTOK (paren_open); YY_BREAK case 25: YY_RULE_SETUP #line 118 "clexer.l" RETTOK (paren_close); YY_BREAK case 26: YY_RULE_SETUP #line 119 "clexer.l" RETTOK (bracket_open); YY_BREAK case 27: YY_RULE_SETUP #line 120 "clexer.l" RETTOK (bracket_close); YY_BREAK case 28: YY_RULE_SETUP #line 121 "clexer.l" RETTOK (amp); YY_BREAK case 29: YY_RULE_SETUP #line 122 "clexer.l" RETTOK (caret); YY_BREAK case 30: YY_RULE_SETUP #line 123 "clexer.l" RETTOK (pipe); YY_BREAK case 31: YY_RULE_SETUP #line 124 "clexer.l" RETTOK (question); YY_BREAK case 32: YY_RULE_SETUP #line 125 "clexer.l" RETTOK (bang); YY_BREAK case 33: YY_RULE_SETUP #line 126 "clexer.l" RETTOK (tilde); YY_BREAK case 34: YY_RULE_SETUP #line 127 "clexer.l" RETTOK (minus); YY_BREAK case 35: YY_RULE_SETUP #line 128 "clexer.l" RETTOK (plus); YY_BREAK case 36: YY_RULE_SETUP #line 129 "clexer.l" RETTOK (star); YY_BREAK case 37: YY_RULE_SETUP #line 130 "clexer.l" RETTOK (slash); YY_BREAK case 38: YY_RULE_SETUP #line 131 "clexer.l" RETTOK (percent); YY_BREAK case 39: YY_RULE_SETUP #line 132 "clexer.l" RETTOK (ellipsis); YY_BREAK case 40: YY_RULE_SETUP #line 133 "clexer.l" RETTOK (ptr); YY_BREAK case 41: YY_RULE_SETUP #line 134 "clexer.l" RETTOK (dot); YY_BREAK case 42: YY_RULE_SETUP #line 135 "clexer.l" RETTOK (mul_assign); YY_BREAK case 43: YY_RULE_SETUP #line 136 "clexer.l" RETTOK (div_assign); YY_BREAK case 44: YY_RULE_SETUP #line 137 "clexer.l" RETTOK (mod_assign); YY_BREAK case 45: YY_RULE_SETUP #line 138 "clexer.l" RETTOK (add_assign); YY_BREAK case 46: YY_RULE_SETUP #line 139 "clexer.l" RETTOK (sub_assign); YY_BREAK case 47: YY_RULE_SETUP #line 140 "clexer.l" RETTOK (shift_left_assign); YY_BREAK case 48: YY_RULE_SETUP #line 141 "clexer.l" RETTOK (shift_right_assign); YY_BREAK case 49: YY_RULE_SETUP #line 142 "clexer.l" RETTOK (logand_assign); YY_BREAK case 50: YY_RULE_SETUP #line 143 "clexer.l" RETTOK (logior_assign); YY_BREAK case 51: YY_RULE_SETUP #line 144 "clexer.l" RETTOK (logxor_assign); YY_BREAK case 52: YY_RULE_SETUP #line 145 "clexer.l" RETTOK (or); YY_BREAK case 53: YY_RULE_SETUP #line 146 "clexer.l" RETTOK (and); YY_BREAK case 54: YY_RULE_SETUP #line 147 "clexer.l" RETTOK (eq); YY_BREAK case 55: YY_RULE_SETUP #line 148 "clexer.l" RETTOK (neq); YY_BREAK case 56: YY_RULE_SETUP #line 149 "clexer.l" RETTOK (ge); YY_BREAK case 57: YY_RULE_SETUP #line 150 "clexer.l" RETTOK (right_shift); YY_BREAK case 58: YY_RULE_SETUP #line 151 "clexer.l" RETTOK (gt); YY_BREAK case 59: YY_RULE_SETUP #line 152 "clexer.l" RETTOK (le); YY_BREAK case 60: YY_RULE_SETUP #line 153 "clexer.l" RETTOK (left_shift); YY_BREAK case 61: YY_RULE_SETUP #line 154 "clexer.l" RETTOK (lt); YY_BREAK case 62: YY_RULE_SETUP #line 155 "clexer.l" RETTOK (inc); YY_BREAK case 63: YY_RULE_SETUP #line 156 "clexer.l" RETTOK (dec); YY_BREAK case 64: YY_RULE_SETUP #line 157 "clexer.l" RETTOK (semicolon); YY_BREAK case 65: YY_RULE_SETUP #line 158 "clexer.l" { fprintf (stderr, (isascii (yytext[0]) && isprint (yytext[0])) ? "%s:%u: stray character %c\n" : "%s:%u: stray character \\%03o", infilename, line_no, (unsigned char) yytext[0]); return t_token; } YY_BREAK case 66: YY_RULE_SETUP #line 167 "clexer.l" ECHO; YY_BREAK #line 1238 "clexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 123 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 123 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 122); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 167 "clexer.l" void usage() { printf ("\ usage: clexer [OPTIONS] [FILE]\n\ \n\ Show lexical structure of a C source. When given the --snarfer option,\n\ display only lexical tokens produced by Guile snarfer. The output may be\n\ piped to the `guile-tools snarf-check-and-output-texi' command.\n\ \n\ OPTIONS are:\n\ -s, --snarfer filter out Guile docstrings\n\ -o, --output=FILE write output to FILE\n\ -h, --help show this help summary\n\ \n"); printf ("Report bugs to \n"); } int main (int argc, char **argv) { int i; enum token tok, last_tok; progname = argv[0]; for (i = 1; i < argc; i++) { if (!strcmp (argv[i], "-s") || !strcmp (argv[i], "--snarfer") || !strcmp (argv[i], "--guile-snarfer")) { guile_snarfer_mode = 1; } else if (!strcmp (argv[i], "-h") || !strcmp (argv[i], "--help")) { usage (); exit (0); } #if 0 else if (!strcmp (argv[i], "-v") || !strcmp (argv[i], "--version")) { version (); exit (0); } #endif else if (!strncmp (argv[i], "-o", 2)) { if (argv[i][2]) outfilename = argv[i] + 2; else if (++i < argc) outfilename = argv[i]; else { fprintf (stderr, "%s: option '-o' requires an argument\n", progname); exit (1); } } else if (!strncmp (argv[i], "--output=", 9)) outfilename = argv[i] + 9; else if (!strcmp (argv[i], "--output")) { if (++i < argc) outfilename = argv[++i]; else { fprintf (stderr, "%s: option '--output' requires an argument\n", progname); exit (1); } } else if (!strcmp (argv[i], "--")) { if (++i < argc) infilename = argv[i]; break; } else if (argv[i][0] == '-') { fprintf (stderr, "%s: unknown option: %s\n", progname, argv[i]); exit (1); } else { infilename = argv[i]; } } if (infilename && strcmp (infilename, "-")) { FILE *fp = fopen (infilename, "r"); if (!fp) { fprintf (stderr, "%s: cannot open file `%s': %s\n", progname, infilename, strerror (errno)); exit (1); } yyrestart (fp); } else infilename = "stdin"; if (outfilename) { outfile = fopen (outfilename, "w"); if (!outfile) { fprintf (stderr, "%s: cannot open file `%s': %s\n", progname, outfilename, strerror (errno)); exit (1); } } else outfile = stdout; state = guile_snarfer_mode ? s_init : s_cookie; last_tok = t_token; while ((tok = yylex ()) > 0) { if (!guile_snarfer_mode) continue; switch (tok) { case t_token: break; case t_open: if (last_tok == t_cookie && state == s_cookie) state = s_multiline; break; case t_close: if (last_tok == t_cookie && state == s_cookie_multiline) state = s_init; break; case t_cookie: switch (state) { case s_init: state = s_cookie; break; case s_multiline: case s_cookie_multiline: state = s_cookie_multiline; break; case s_cookie: state = s_init; } } last_tok = tok; } fclose (outfile); exit (0); } dico-2.2/gint/clexer.l000066400000000000000000000206271172612674100147110ustar00rootroot00000000000000/* clexer -- show lexical structure of a C file. Copyright (C) 2010 Sergey Poznyakoff 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 3, 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, see . */ %option noyywrap %top { #ifdef HAVE_CONFIG_H # include #endif } %{ #include #include #include #include enum state { s_init, s_multiline, s_cookie_multiline, s_cookie }; enum token { t_token = 256, t_open, t_close, t_cookie }; const char *progname; char *infilename; char *outfilename; int guile_snarfer_mode; enum state state; FILE *outfile; unsigned line_no = 1; static void advance_line (const char *text) { for (; *text; text++) if (*text == '\n') line_no++; } #define outstr(text) \ do \ if (state != s_init) \ fprintf (outfile, "%s\n", text); \ while (0) #define outtok(tname,tval) \ do \ if (state != s_init) \ fprintf (outfile, "(%s . \"%s\")\n", \ tname, tval); \ while (0) #define RETTOK(t) { outstr (#t); return t_token; } #define RETTXT(t,s) { outtok (#t, s); return t_token; } %} N [0-9] X [0-9a-fA-F] O [0-7] ID [a-zA-Z_][a-zA-Z_0-9]* IQ (l|L|ll|LL|lL|Ll|u|U) FQ [fFlL] E [Ee][+-]?{N}+ WS [ \t\v\f] %% \/\*(\n|[^*]|\*[^/])*\*\/ { advance_line (yytext); outtok ("comment", yytext); } #.*\n { outstr ("hash"); line_no++; } \n { outstr ("eol"); line_no++; } {WS}+ ; \\ ; {ID} RETTXT (id, yytext); 0[xX]{X}+{IQ}? RETTXT (int_hex, yytext + 2); 0{O}+{IQ}? RETTXT (int_oct, yytext + 1); {N}+{IQ}? RETTXT (int_dec, yytext); L?\'[^\\']\' | L?\'\\[^0xX]\' | L?\'\\{O}{1,3}\' | L?\'\\[xX]{X}{1,2} RETTXT (char, yytext); {N}+E{FQ}? | {N}*"."{N}+({E})?{FQ}? | {N}+"."{N}*({E})?{FQ}? RETTXT (flo_dec, yytext); L?\"([^\\\"]|\\.|\\\n)*\" { outstr (yytext); advance_line (yytext); } "^"{WS}*"^" { fputs ("snarf_cookie\n", outfile); return t_cookie; } "{" { outstr ("brace_open"); return t_open; } "}" { outstr ("brace_close"); return t_close; } "," RETTOK (comma); ":" RETTOK (colon); "=" RETTOK (assign); "(" RETTOK (paren_open); ")" RETTOK (paren_close); "[" RETTOK (bracket_open); "]" RETTOK (bracket_close); "&" RETTOK (amp); "^" RETTOK (caret); "|" RETTOK (pipe); "?" RETTOK (question); "!" RETTOK (bang); "~" RETTOK (tilde); "-" RETTOK (minus); "+" RETTOK (plus); "*" RETTOK (star); "/" RETTOK (slash); "%" RETTOK (percent); "..." RETTOK (ellipsis); "->" RETTOK (ptr); "." RETTOK (dot); "*=" RETTOK (mul_assign); "/=" RETTOK (div_assign); "%=" RETTOK (mod_assign); "+=" RETTOK (add_assign); "-=" RETTOK (sub_assign); "<<=" RETTOK (shift_left_assign); ">>=" RETTOK (shift_right_assign); "&=" RETTOK (logand_assign); "|=" RETTOK (logior_assign); "^=" RETTOK (logxor_assign); "||" RETTOK (or); "&&" RETTOK (and); "==" RETTOK (eq); "!=" RETTOK (neq); ">=" RETTOK (ge); ">>" RETTOK (right_shift); ">" RETTOK (gt); "<=" RETTOK (le); "<<" RETTOK (left_shift); "<" RETTOK (lt); "++" RETTOK (inc); "--" RETTOK (dec); ";" RETTOK (semicolon); . { fprintf (stderr, (isascii (yytext[0]) && isprint (yytext[0])) ? "%s:%u: stray character %c\n" : "%s:%u: stray character \\%03o", infilename, line_no, (unsigned char) yytext[0]); return t_token; } %% void usage() { printf ("\ usage: clexer [OPTIONS] [FILE]\n\ \n\ Show lexical structure of a C source. When given the --snarfer option,\n\ display only lexical tokens produced by Guile snarfer. The output may be\n\ piped to the `guile-tools snarf-check-and-output-texi' command.\n\ \n\ OPTIONS are:\n\ -s, --snarfer filter out Guile docstrings\n\ -o, --output=FILE write output to FILE\n\ -h, --help show this help summary\n\ \n"); printf ("Report bugs to \n"); } int main (int argc, char **argv) { int i; enum token tok, last_tok; progname = argv[0]; for (i = 1; i < argc; i++) { if (!strcmp (argv[i], "-s") || !strcmp (argv[i], "--snarfer") || !strcmp (argv[i], "--guile-snarfer")) { guile_snarfer_mode = 1; } else if (!strcmp (argv[i], "-h") || !strcmp (argv[i], "--help")) { usage (); exit (0); } #if 0 else if (!strcmp (argv[i], "-v") || !strcmp (argv[i], "--version")) { version (); exit (0); } #endif else if (!strncmp (argv[i], "-o", 2)) { if (argv[i][2]) outfilename = argv[i] + 2; else if (++i < argc) outfilename = argv[i]; else { fprintf (stderr, "%s: option '-o' requires an argument\n", progname); exit (1); } } else if (!strncmp (argv[i], "--output=", 9)) outfilename = argv[i] + 9; else if (!strcmp (argv[i], "--output")) { if (++i < argc) outfilename = argv[++i]; else { fprintf (stderr, "%s: option '--output' requires an argument\n", progname); exit (1); } } else if (!strcmp (argv[i], "--")) { if (++i < argc) infilename = argv[i]; break; } else if (argv[i][0] == '-') { fprintf (stderr, "%s: unknown option: %s\n", progname, argv[i]); exit (1); } else { infilename = argv[i]; } } if (infilename && strcmp (infilename, "-")) { FILE *fp = fopen (infilename, "r"); if (!fp) { fprintf (stderr, "%s: cannot open file `%s': %s\n", progname, infilename, strerror (errno)); exit (1); } yyrestart (fp); } else infilename = "stdin"; if (outfilename) { outfile = fopen (outfilename, "w"); if (!outfile) { fprintf (stderr, "%s: cannot open file `%s': %s\n", progname, outfilename, strerror (errno)); exit (1); } } else outfile = stdout; state = guile_snarfer_mode ? s_init : s_cookie; last_tok = t_token; while ((tok = yylex ()) > 0) { if (!guile_snarfer_mode) continue; switch (tok) { case t_token: break; case t_open: if (last_tok == t_cookie && state == s_cookie) state = s_multiline; break; case t_close: if (last_tok == t_cookie && state == s_cookie_multiline) state = s_init; break; case t_cookie: switch (state) { case s_init: state = s_cookie; break; case s_multiline: case s_cookie_multiline: state = s_cookie_multiline; break; case s_cookie: state = s_init; } } last_tok = tok; } fclose (outfile); exit (0); } dico-2.2/gint/extract-exports000077500000000000000000000044051172612674100163500ustar00rootroot00000000000000#!/bin/sh # aside from this initial boilerplate, this is actually -*- scheme -*- code main="(module-ref (resolve-module '(gint extract-exports)) 'main) " exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@" !# ;;;; This file is part of Gint ;;;; Copyright (C) 2010 Sergey Poznyakoff ;;;; ;;;; 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 3, 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, see . (define-module (gint extract-exports) :use-module (ice-9 getopt-long)) (define (snarf-exports) (let loop ((elt (read))) (cond ((not (eof-object? elt)) (if (and (pair? elt) (eq? (car elt) 'id) (string? (cdr elt)) (string=? (cdr elt) "fname")) (let ((name (read))) (if (string? name) (format #t "(export ~A)~%" name)))) (loop (read)))))) (define output-file-name #f) (define input-file-list '()) (define (usage) (display "usage: extract-exports [OPTIONS] [FILE [FILE...]]\n") (display "\n") (display "OPTIONS are:\n") (display " -o, --output FILE set output file name\n") (display " -h, --help display this help summary\n")) (define (do-file-list) (if (null? input-file-list) (snarf-exports) (for-each (lambda (file) (with-input-from-file file snarf-exports)) input-file-list))) (define (main . cmdline) (let ((grammar `((output (single-char #\o) (value #t)) (help (single-char #\h))))) (for-each (lambda (x) (case (car x) ((output) (set! output-file-name (cdr x))) ((help) (usage) (exit 0)) ('() (set! input-file-list (cdr x))))) (getopt-long cmdline grammar))) (if output-file-name (with-output-to-file output-file-name do-file-list) (do-file-list))) dico-2.2/gint/gint.m4000066400000000000000000000066111172612674100144520ustar00rootroot00000000000000# gint.m4 serial 1 dnl This file is part of Gint dnl Copyright (C) 2010 Sergey Poznyakoff dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3, or (at your option) dnl any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl The option stuff below is based on the similar code from Automake # _GINT_MANGLE_OPTION(NAME) # ------------------------- # Convert NAME to a valid m4 identifier, by replacing invalid characters # with underscores, and prepend the _GINT_OPTION_ suffix to it. AC_DEFUN([_GINT_MANGLE_OPTION], [[_GINT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _GINT_SET_OPTION(NAME) # ---------------------- # Set option NAME. If NAME begins with a digit, treat it as a requested # Guile version number, and define _GINT_GUILE_VERSION to that number. # Otherwise, define the option using _GINT_MANGLE_OPTION. AC_DEFUN([_GINT_SET_OPTION], [m4_if(m4_bpatsubst($1,^[[0-9]].*,[]),,[m4_define([_GINT_GUILE_VERSION],[$1])],[m4_define(_GINT_MANGLE_OPTION([$1]), 1)])]) # _GINT_IF_OPTION_SET(NAME,IF-SET,IF-NOT-SET) # ------------------------------------------- # Check if option NAME is set. AC_DEFUN([_GINT_IF_OPTION_SET], [m4_ifset(_GINT_MANGLE_OPTION([$1]),[$2],[$3])]) # _GINT_OPTION_SWITCH(NAME1,IF-SET1,[NAME2,IF-SET2,[...]],[IF-NOT-SET]) # ------------------------------------------------------------------------ # If NAME1 is set, run IF-SET1. Otherwise, if NAME2 is set, run IF-SET2. # Continue the process for all name-if-set pairs within [...]. If none # of the options is set, run IF-NOT-SET. AC_DEFUN([_GINT_OPTION_SWITCH], [m4_if([$4],,[_GINT_IF_OPTION_SET($@)],dnl [$3],,[_GINT_IF_OPTION_SET($@)],dnl [_GINT_IF_OPTION_SET([$1],[$2],[_GINT_OPTION_SWITCH(m4_shift(m4_shift($@)))])])]) # _GINT_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Gint options. AC_DEFUN([_GINT_SET_OPTIONS], [m4_foreach_w([_GINT_Option], [$1], [_GINT_SET_OPTION(_GINT_Option)])]) AC_SUBST(GINT_INCLUDES) AC_SUBST(GINT_LDADD) dnl GINT_INIT([DIR], [OPTIONS], [IF-FOUND], [IF-NOT-FOUND]) dnl ------------------------------------------------------- dnl DIR Gint submodule directory (defaults to 'gint') dnl OPTIONS A whitespace-separated list of options. Currently recognized dnl options are: 'inc', 'std-site-dir','snarf-doc-filter', dnl 'nodoc', and version number. dnl IF-FOUND What to do if Guile is present. dnl IF-NOT-FOUND What to do otherwise. dnl AC_DEFUN([GINT_INIT],[ AM_PROG_LEX _GINT_SET_OPTIONS([$2]) AC_SUBST([GINT_MODULE_DIR],[m4_if([$1],,[gint],[$1])]) AM_CONDITIONAL([GINT_COND_INC],[_GINT_IF_OPTION_SET([inc],[true],[false])]) AM_CONDITIONAL([GINT_COND_DOC],[_GINT_IF_OPTION_SET([nodoc],[false],[true])]) AM_CONDITIONAL([GINT_COND_SNARF_DOC_FILTER],dnl [_GINT_IF_OPTION_SET([snarf-doc-filter],[true],[false])]) GINT_CHECK_GUILE(m4_ifdef([_GINT_GUILE_VERSION],_GINT_GUILE_VERSION),[$3],[$4]) ]) dico-2.2/gint/gint.mk000066400000000000000000000044021172612674100145350ustar00rootroot00000000000000# This file is part of Gint # Copyright (C) 2010 Sergey Poznyakoff # # 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 3, 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, see . INCLUDES += @GUILE_INCLUDES@ BUILT_SOURCES += $(DOT_X_FILES) DISTCLEANFILES += $(DOT_X_FILES) ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \ --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/' SUFFIXES += .x snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) if GINT_COND_DOC EXTRA_DIST += guile-procedures.texi guile-procedures.txt site_DATA += guile-procedures.txt BUILT_SOURCES += $(DOT_DOC_FILES) guile-procedures.texi DISTCLEANFILES += \ $(DOT_DOC_FILES)\ guile-procedures.texi\ guile-procedures.txt SUFFIXES += .doc if GINT_COND_SNARF_DOC_FILTER GUILE_DOC_SNARF=$(top_builddir)/$(GINT_MODULE_DIR)/snarf-doc-filter --snarfer else GUILE_DOC_SNARF=$(top_builddir)/$(GINT_MODULE_DIR)/clexer --snarfer endif .c.doc: $(AM_V_GEN)$(CC) -DSCM_MAGIC_SNARF_DOCS $(snarfcppopts) -E $< | \ $(GUILE_DOC_SNARF) -o $@ || { rm $@; false; } guile-procedures.texi: $(DOT_DOC_FILES) $(AM_V_GEN)cat $(DOT_DOC_FILES) | \ $(GUILE_TOOLS) snarf-check-and-output-texi > $@ guile-procedures.txt: guile-procedures.texi $(AM_V_GEN) rm -f $@; \ $(MAKEINFO) --force -o $@ guile-procedures.texi || test -f $@ endif .c.x: $(AM_V_GEN)AWK=$(AWK) \ $(GUILE_SNARF) -o $@ \ $< $(snarfcppopts) if GINT_COND_INC SUFFIXES += .inc CLEANFILES += *.inc .doc.inc: $(AM_V_GEN)$(top_srcdir)/$(GINT_MODULE_DIR)/extract-exports -o $@ $< endif ## Add -MG to make the .x magic work with auto-dep code. MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) dico-2.2/gint/guile.m4000066400000000000000000000133151172612674100146150ustar00rootroot00000000000000# guile.m4 serial 1 dnl This file is part of Gint dnl Copyright (C) 2010 Sergey Poznyakoff dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3, or (at your option) dnl any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . m4_define([_gint_eval_version], [m4_if([$2],,[m4_errprint([Version number without dots: $1 ])],[m4_eval([$1] * 1000 + [$2] * 100[]m4_if([$3],,,[ + $3]))])]) m4_define([_gint_mangle_version],[_gint_eval_version(m4_bpatsubst($1,\.,[,]))]) m4_define([_gint_site_dir],[`guile -c '(write (%site-dir)) (newline)'`]) dnl GINT_CHECK_GUILE(minversion, [act-if-found], [act-if-not-found]) dnl $1 $2 $3 AC_DEFUN([GINT_CHECK_GUILE], [ AC_SUBST(GUILE_INCLUDES) AC_SUBST(GUILE_LIBS) AC_SUBST(GUILE_VERSION) AC_SUBST(GUILE_VERSION_NUMBER) gint_guile_status=no _GINT_OPTION_SWITCH( [with-guile], [AC_ARG_WITH([guile], [AC_HELP_STRING([--with-guile], [compile with Guile support (default)])], [gint_enable_guile=$withval], [gint_enable_guile=yes])], [without-guile], [AC_ARG_WITH([guile], [AC_HELP_STRING([--with-guile], [compile with Guile support])], [gint_enable_guile=$withval], [gint_enable_guile=no])], [enable-guile], [AC_ARG_ENABLE([guile], [AC_HELP_STRING([--enable-guile], [enable Guile support (default)])], [gint_enable_guile=$enableval], [gint_enable_guile=yes])], [disable-guile], [AC_ARG_ENABLE([guile], [AC_HELP_STRING([--enable-guile], [enable Guile support])], [gint_enable_guile=$enableval], [gint_enable_guile=no])], [gint_enable_guile=yes]) if test "$gint_enable_guile" = yes; then AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH) if test "$GUILE_CONFIG" = no; then m4_if([$3],,[AC_MSG_ERROR(cannot find Guile)], [$3]) else AC_PATH_PROG(GUILE_SNARF, guile-snarf) AC_PATH_PROG(GUILE_TOOLS, guile-tools) GUILE_INCLUDES=`$GUILE_CONFIG compile` GUILE_LIBS=`$GUILE_CONFIG link` GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed 's/guile-config [[^0-9]]* \([[0-9]][[0-9.]]*\)$/\1/'` VEX=`echo $GUILE_VERSION | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'` GUILE_VERSION_NUMBER=`eval expr "$VEX"` gint_guile_status=ok m4_if([$1],,,[ if test $GUILE_VERSION_NUMBER -lt _gint_mangle_version($1); then m4_if([$3],, [AC_MSG_ERROR([Guile version too old; required at least ]$1)], [gint_guile_status=badversion]) fi]) if test $gint_guile_status = ok; then save_LIBS=$LIBS save_CFLAGS=$CFLAGS LIBS="$LIBS $GUILE_LIBS" CFLAGS="$CFLAGS $GUILE_INCLUDES" AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [scm_shell(0, NULL);])], [], [gint_guile_status=cantlink]) LIBS=$save_LIBS CFLAGS=$save_CFLAGS fi fi if test $gint_guile_status != ok; then GUILE_INCLUDES= GUILE_LIBS= GUILE_VERSION= GUILE_VERSION_NUMBER= m4_if([$3],,[AC_MSG_ERROR(required library libguile not found)], [$3]) else save_LIBS=$LIBS save_CFLAGS=$CFLAGS LIBS="$LIBS $GUILE_LIBS" CFLAGS="$CFLAGS $GUILE_INCLUDES" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [SCM_DEVAL_P = 1; SCM_BACKTRACE_P = 1; SCM_RECORD_POSITIONS_P = 1; SCM_RESET_DEBUG_MODE;])], [gint_guile_debug=yes], [gint_guile_debug=no]) if test $gint_guile_debug = yes; then AC_DEFINE_UNQUOTED(GUILE_DEBUG_MACROS, 1, [Define to 1 if SCM_DEVAL_P, SCM_BACKTRACE_P, SCM_RECORD_POSITIONS_P and SCM_RESET_DEBUG_MODE are defined]) fi AC_CHECK_TYPES([scm_t_off],[],[],[#include ]) LIBS=$save_LIBS CFLAGS=$save_CFLAGS AC_SUBST(GUILE_SITE) _GINT_IF_OPTION_SET([std-site-dir], [GUILE_SITE=_gint_site_dir], [AC_ARG_WITH([guile-site-dir], [AC_HELP_STRING([--with-guile-site-dir=DIR], [specify directory to install guile modules to])], [case $withval in /*) GUILE_SITE=$withval;; yes) GUILE_SITE=_gint_site_dir;; *) AC_MSG_ERROR([Argument to --with-guile-site-dir must be an absolute directory name]);; esac], [GUILE_SITE=_gint_site_dir pfx=$prefix test "x$pfx" = xNONE && pfx=$ac_default_prefix case $GUILE_SITE in $pfx/*) ;; # OK *) AC_MSG_WARN([guile site directory $GUILE_SITE lies outside your current prefix ($pfx).]) GUILE_SITE='$(datadir)/guile/site' AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guile-site-dir to force using site directory.]) ;; esac])]) AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION", [Guile version number]) AC_DEFINE_UNQUOTED(GUILE_VERSION_NUMBER, $GUILE_VERSION_NUMBER, [Guile version number: MAX*10 + MIN]) m4_if([$2],,,[$2]) fi m4_if([$3],,,[else $3]) fi ]) dico-2.2/gint/snarf-doc-filter000077500000000000000000000306211172612674100163320ustar00rootroot00000000000000#! /bin/sh # aside from this initial boilerplate, this is actually -*- scheme -*- code main='(module-ref (resolve-module '\''(gint snarf-doc-filter)) '\'main')' exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))" "$@" !# ;;;; This file is part of Gint ;;;; Copyright (C) 2010 Sergey Poznyakoff ;;;; ;;;; 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 3, 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, see . (define-module (gint snarf-doc-filter) :use-module (ice-9 getopt-long) :use-module (ice-9 regex) :use-module (ice-9 rdelim)) (define debug-option #f) (define print-option #f) (define snarfer-option #f) (define state 'skip) (define last-token '()) (define string-collection '()) (define (init-collection . rest) (set! string-collection rest)) (define (collect-string . rest) (for-each (lambda (str) (set! string-collection (cons str string-collection))) rest)) (define (format-debug fmt . rest) (if debug-option (apply format (current-error-port) (string-append "~A:~A:DEBUG:" fmt) (cons (port-line (current-input-port)) (cons (port-column (current-input-port)) rest))))) (define (output sym) (set! last-token sym) (if print-option (begin (display sym) (newline)))) (define (output-x sym) (set! last-token sym) (display sym) (newline)) (define (output-cons name rest) (set! last-token name) (if print-option (begin (format #t "(~A . \"" name) (for-each display (reverse rest)) (display "\")\n")))) (define (output-string) (set! last-token 'string) (if print-option (begin (for-each display (reverse string-collection)) (newline)))) (define char-set:c-delim (char-set-delete (char-set-union char-set:whitespace char-set:punctuation char-set:symbol) #\_)) (define char-set:not-c-delim (char-set-complement char-set:c-delim)) (define ident-rx (make-regexp "^[a-zA-Z_][a-zA-Z_0-9]*")) (define onum-rx (make-regexp "^0([0-7]+(l|L|ll|LL|lL|Ll|u|U)?)")) (define xnum-rx (make-regexp "^0[xX]([0-9a-fA-F]*(l|L|ll|LL|lL|Ll|u|U)?)")) (define dnum-rx (make-regexp "^(0|([1-9][0-9]*))(l|L|ll|LL|lL|Ll|u|U)?")) (define fnum-rx (make-regexp "^(([0-9]+[Ee][+-]?[0-9]+)|(([0-9]*\\.[0-9]+)|([0-9]+\\.[0-9]*))([Ee][+-]?[0-9]+)?)[fFlL]?")) (define snarf-cookie-rx (make-regexp "^\\^[ \\t\\v\\n\\f]*\\^")) (define (string-prefix-one-of str pfxdef) (call-with-current-continuation (lambda (return) (for-each (lambda (pfx) (if (string-prefix? (car pfx) str) (return pfx))) pfxdef) (return #f)))) (define (lexer) (let loop ((input (read-line))) (letrec ((find-char-end (lambda (str pfx) (init-collection pfx) (let find-char-end-loop ((str str) (ind (string-length pfx))) (cond ((>= ind (string-length str)) (format (current-error-port) "~A:~A: invalid character constant~%" (port-line (current-input-port)) (port-column (current-input-port))) (output "eol") (loop (read-line))) ; Try to continue anyway ((char=? (string-ref str ind) #\\) (format-debug "SKIP SC \\~A~%" (string-ref str (+ 1 ind))) (collect-string "\\") (find-char-end-loop str (+ ind 1))) ((char=? (string-ref str ind) #\') (collect-string "'") (output-cons 'char string-collection) (loop (substring str (+ 1 ind)))); Next iteration (else (let ((ch (string-ref str ind))) (format-debug "SKIP SC ~A~%" ch) (collect-string ch)) (find-char-end-loop str (+ ind 1))))))) (find-string-end (lambda (line pfx) (let ((pos (cons (port-line (current-input-port)) (port-column (current-input-port))))) (init-collection pfx) (let find-string-end-loop ((str line) (start (string-length pfx))) ; (format-debug "FNE:~A~%" (substring str start)) (if (eof-object? str) (format (current-error-port) "EOF in string started in ~A:~A~%" (car pos) (cdr pos)) (let ((n (string-skip str (lambda (c) (not (or (char=? c #\") (char=? c #\\)))) start))) (cond (n (if (> n start) (let ((prefix (substring str start n))) (format-debug "SEGM ~A~%" prefix) (collect-string prefix))) (cond ((char=? (string-ref str n) #\") (collect-string "\"") (output-string) (loop (substring str (+ n 1)))) ; Next iteration ((= (1+ n) (string-length str)) (format-debug "ESCNL~%") (collect-string "\\\n") (find-string-end-loop (read-line) 0)) ((char=? (string-ref str (1+ n)) #\") (format-debug "ESCQUOTE~%") (collect-string "\\\"") (find-string-end-loop str (+ n 2))) (else (format-debug "ESCAPE~%") (collect-string "\\") (find-string-end-loop str (1+ n))))) (else (let ((segm (substring str start))) (format-debug "SEGM ~A~%" segm) (collect-string segm)) (find-string-end-loop (read-line) 0)))))))))) (format-debug "IN:~A / ~A / ~A / ~A~%" input print-option state last-token) (if (not (eof-object? input)) (let ((line (string-trim input))) ; (format-debug "LI:~A~%" line) (cond ((string-null? line) (output "eol") (loop (read-line))) ((string-prefix? "#" line) (output "hash") (loop (read-line))) ((string-prefix? "/*" line) (let ((pos (cons (port-line (current-input-port)) (port-column (current-input-port))))) (init-collection) (let find-comment-end ((str line)) ; (format-debug "FCE:~A~%" str) (cond ((eof-object? str) (format (current-error-port) "EOF in comment started in ~A:~A~%" (car pos) (cdr pos))) ((string-contains str "*/") => (lambda (n) (collect-string (substring str 0 (+ n 2))) (output-cons 'comment string-collection) (loop (substring str (+ n 2))))) (else (collect-string str "\n") (find-comment-end (read-line))))))) ((string-prefix? "\"" line) (find-string-end line "\"")) ((string-prefix? "L\"" line) (find-string-end line "L\"")) ((string-prefix? "L'" line) (find-char-end line "L'")) ((string-prefix? "{" line) (let ((lt last-token)) (output "brace_open") (if (and (eq? lt 'snarf_cookie) (eq? state 'cookie)) (set! state 'multiline)) (loop (substring line 1)))) ((string-prefix? "<%" line) (let ((lt last-token)) (output "brace_open") (if (and (eq? lt 'snarf_cookie) (eq? state 'cookie)) (set! state 'multiline)) (loop (substring line 2)))) ((string-prefix? "}" line) (let ((lt last-token)) (output "brace_close") (if (and (eq? lt 'snarf_cookie) (eq? state 'multiline-cookie)) (begin (set! state 'skip) (set! print-option #f))) (loop (substring line 1)))) ((string-prefix? "%>" line) (let ((lt last-token)) (output "brace_close") (if (and (eq? lt 'snarf_cookie) (eq? state 'multiline-cookie)) (begin (set! state 'skip) (set! print-option #f))) (loop (substring line 2)))) ((regexp-exec fnum-rx line) => (lambda (m) (format-debug "FNUM: ~S~%" m) (let ((pfx (match:substring m))) (output-cons 'flo_dec (list pfx)) (loop (substring line (string-length pfx)))))) ((regexp-exec snarf-cookie-rx line) => (lambda (m) (if snarfer-option (case state ((skip) (set! state 'cookie) (set! print-option #t)) ((multiline multiline-cookie) (set! state 'multiline-cookie)) ((cookie) (set! state 'skip) (set! print-option #f)))) (output-x 'snarf_cookie) (loop (substring line (- (match:end m) (match:start m)))))) ((string-prefix-one-of line '((">>=" . shift_right_assign) ("<<=" . shift_left_assign) ("+=" . add_assign) ("-=" . sub_assign) ("*=" . mul-assign) ("/=" . div_assign) ("%=" . mod_assign) ("&=" . logand_assign) ("^=" . logxor_assign) ("|=" . logior_assign) (">>" . right_shift) ("<<" . left_shift) ("++" . inc) ("--" . dec) ("->" . ptr) ("&&" . and) ("||" . or) ("<=" . le) (">=" . ge) ("==" . eq) ("!=" . neq) ("..." . ellipsis) ("," . comma) (":" . colon) ("=" . assign) ("(" . paren_open) (")" . paren_close) ("[" . bracket_open) ("]" . bracket_close) ("." . dot) ("&" . amp) ("!" . bang) ("~" . tilde) ("-" . minus) ("+" . plus) ("*" . star) ("/" . slash) ("%" . percent) ("<" . lt) (">" . gt) ("^" . caret) ("|" . pipe) ("?" . question) (";" . semicolon))) => (lambda (pfx) (output (symbol->string (cdr pfx))) (loop (substring line (string-length (car pfx)))))) ;; more... ((char-set-contains? char-set:c-delim (string-ref line 0)) ; (format-debug "special ~A~%" line) (cond ((string-prefix? "'" line) (find-char-end line "'")) (else (format-debug "SKIP #\\~A~%" (substring line 0 1)) (loop (substring line 1))))) ((regexp-exec ident-rx line) => (lambda (m) (format-debug "IDENT: ~S~%" m) (let ((pfx (match:substring m))) (output-cons 'id (list pfx)) (loop (substring line (string-length pfx)))))) ((regexp-exec onum-rx line) => (lambda (m) (format-debug "ONUM: ~S~%" m) (let ((pfx (match:substring m 1))) (output-cons 'int_oct (list pfx)) (loop (substring line (- (match:end m) (match:start m))))))) ((regexp-exec xnum-rx line) => (lambda (m) (format-debug "XNUM: ~S~%" m) (let ((pfx (match:substring m 1))) (output-cons 'int_hex (list pfx)) (loop (substring line (- (match:end m) (match:start m))))))) ((regexp-exec dnum-rx line) => (lambda (m) (format-debug "DNUM: ~S~%" m) (let ((pfx (match:substring m))) (output-cons 'int_dec (list pfx)) (loop (substring line (string-length pfx)))))) (else (let ((n (string-skip line char-set:not-c-delim))) (format-debug "N=~A~%" n) (cond (n (format-debug "SKIP '~A'~%" (substring line 0 n)) (loop (substring line n))) (else (format-debug "SKIP '~A'~%" line) (output "eol") (loop (read-line)))))))))))) (define grammar `((debug (single-char #\d)) (snarfer (single-char #\s)) (output (single-char #\o) (value #t)) (help (single-char #\h)))) (define (usage) (display "usage: snarf-doc-filter [OPTIONS] [FILE]\n") (display "\n") (display "OPTIONS are:\n") (display " -d, --debug debugging output\n") (display " -s, --snarfer filter snarfed contents\n") (display " -o, --output FILE set output file name\n") (display " -h, --help display this help summary\n")) (define output-file-name #f) (define input-file-name #f) (define (main . args) (for-each (lambda (x) (case (car x) ((debug) (set! debug-option #t)) ((snarfer) (set! snarfer-option #t)) ((output) (set! output-file-name (cdr x))) ((help) (usage) (exit 0)) ('() (if (not (null? (cdr x))) (set! input-file-name (cadr x)))))) (getopt-long args grammar)) (if (and (not print-option) (not snarfer-option)) (set! print-option #t)) (letrec ((lex-out (lambda () (if output-file-name (with-output-to-file output-file-name lexer) (lexer))))) (if input-file-name (with-input-from-file input-file-name lex-out) (lex-out)))) ;; End of snarf-doc-filter.scm dico-2.2/gnu/000077500000000000000000000000001172612674100130735ustar00rootroot00000000000000dico-2.2/gnu/Makefile.am000066400000000000000000001745431172612674100151450ustar00rootroot00000000000000## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=gnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=xalloc-die --avoid=openat-die --no-libtool --macro-prefix=gl c-strcase crypto/des crypto/md5 crypto/sha1 fprintftime getline getopt getpass-gnu gettext-h gettimeofday hash inttostr inttypes malloc obstack quote quotearg realloc regex size_max snprintf strerror strtoimax strtoumax sysexits vasprintf xalloc xgetdomainname xgethostname AUTOMAKE_OPTIONS = 1.5 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = noinst_LIBRARIES += libgnu.a libgnu_a_SOURCES = libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = ## begin gnulib module alignof EXTRA_DIST += alignof.h ## end gnulib module alignof ## begin gnulib module alloca-opt BUILT_SOURCES += $(ALLOCA_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += alloca.h alloca.h-t EXTRA_DIST += alloca.in.h ## end gnulib module alloca-opt ## begin gnulib module arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h ## end gnulib module arg-nonnull ## begin gnulib module bitrotate libgnu_a_SOURCES += bitrotate.h ## end gnulib module bitrotate ## begin gnulib module btowc EXTRA_DIST += btowc.c EXTRA_libgnu_a_SOURCES += btowc.c ## end gnulib module btowc ## begin gnulib module c++defs # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += c++defs.h # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/c++defs.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += c++defs.h c++defs.h-t CXXDEFS_H=c++defs.h EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h ## end gnulib module c++defs ## begin gnulib module c-ctype libgnu_a_SOURCES += c-ctype.h c-ctype.c ## end gnulib module c-ctype ## begin gnulib module c-strcase libgnu_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c ## end gnulib module c-strcase ## begin gnulib module close-hook libgnu_a_SOURCES += close-hook.c EXTRA_DIST += close-hook.h ## end gnulib module close-hook ## begin gnulib module configmake # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t && \ if test -f $@ && cmp $@-t $@ > /dev/null; then \ rm -f $@-t; \ else \ rm -f $@; mv $@-t $@; \ fi BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t ## end gnulib module configmake ## begin gnulib module crypto/des EXTRA_DIST += des.c des.h EXTRA_libgnu_a_SOURCES += des.c ## end gnulib module crypto/des ## begin gnulib module crypto/md5 EXTRA_DIST += md5.c md5.h EXTRA_libgnu_a_SOURCES += md5.c ## end gnulib module crypto/md5 ## begin gnulib module crypto/sha1 EXTRA_DIST += sha1.c sha1.h EXTRA_libgnu_a_SOURCES += sha1.c ## end gnulib module crypto/sha1 ## begin gnulib module errno BUILT_SOURCES += $(ERRNO_H) # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += errno.h errno.h-t EXTRA_DIST += errno.in.h ## end gnulib module errno ## begin gnulib module exitfail libgnu_a_SOURCES += exitfail.c EXTRA_DIST += exitfail.h ## end gnulib module exitfail ## begin gnulib module float BUILT_SOURCES += $(FLOAT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. float.h: float.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += float.h float.h-t EXTRA_DIST += float.in.h ## end gnulib module float ## begin gnulib module fprintftime EXTRA_DIST += fprintftime.c fprintftime.h EXTRA_libgnu_a_SOURCES += fprintftime.c ## end gnulib module fprintftime ## begin gnulib module fseeko EXTRA_DIST += fseeko.c stdio-impl.h EXTRA_libgnu_a_SOURCES += fseeko.c ## end gnulib module fseeko ## begin gnulib module getdelim EXTRA_DIST += getdelim.c EXTRA_libgnu_a_SOURCES += getdelim.c ## end gnulib module getdelim ## begin gnulib module getdomainname EXTRA_DIST += getdomainname.c EXTRA_libgnu_a_SOURCES += getdomainname.c ## end gnulib module getdomainname ## begin gnulib module gethostname EXTRA_DIST += gethostname.c w32sock.h EXTRA_libgnu_a_SOURCES += gethostname.c ## end gnulib module gethostname ## begin gnulib module getline EXTRA_DIST += getline.c EXTRA_libgnu_a_SOURCES += getline.c ## end gnulib module getline ## begin gnulib module getopt-posix BUILT_SOURCES += $(GETOPT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += getopt.h getopt.h-t EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c ## end gnulib module getopt-posix ## begin gnulib module getpass-gnu EXTRA_DIST += getpass.c getpass.h EXTRA_libgnu_a_SOURCES += getpass.c ## end gnulib module getpass-gnu ## begin gnulib module gettext-h libgnu_a_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module gettimeofday EXTRA_DIST += gettimeofday.c EXTRA_libgnu_a_SOURCES += gettimeofday.c ## end gnulib module gettimeofday ## begin gnulib module hash EXTRA_DIST += hash.c hash.h EXTRA_libgnu_a_SOURCES += hash.c ## end gnulib module hash ## begin gnulib module ignore-value libgnu_a_SOURCES += ignore-value.h ## end gnulib module ignore-value ## begin gnulib module intprops EXTRA_DIST += intprops.h ## end gnulib module intprops ## begin gnulib module inttostr libgnu_a_SOURCES += \ imaxtostr.c \ inttostr.c \ offtostr.c \ uinttostr.c \ umaxtostr.c EXTRA_DIST += anytostr.c inttostr.h EXTRA_libgnu_a_SOURCES += anytostr.c ## end gnulib module inttostr ## begin gnulib module inttypes BUILT_SOURCES += inttypes.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h ## end gnulib module inttypes ## begin gnulib module langinfo BUILT_SOURCES += langinfo.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += langinfo.h langinfo.h-t EXTRA_DIST += langinfo.in.h ## end gnulib module langinfo ## begin gnulib module localcharset libgnu_a_SOURCES += localcharset.h localcharset.c # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ SUFFIXES += .sed .sin .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ CLEANFILES += charset.alias ref-add.sed ref-del.sed EXTRA_DIST += config.charset ref-add.sin ref-del.sin ## end gnulib module localcharset ## begin gnulib module lseek EXTRA_DIST += lseek.c EXTRA_libgnu_a_SOURCES += lseek.c ## end gnulib module lseek ## begin gnulib module malloc-gnu EXTRA_DIST += malloc.c EXTRA_libgnu_a_SOURCES += malloc.c ## end gnulib module malloc-gnu ## begin gnulib module malloc-posix EXTRA_DIST += malloc.c EXTRA_libgnu_a_SOURCES += malloc.c ## end gnulib module malloc-posix ## begin gnulib module mbrtowc EXTRA_DIST += mbrtowc.c EXTRA_libgnu_a_SOURCES += mbrtowc.c ## end gnulib module mbrtowc ## begin gnulib module mbsinit EXTRA_DIST += mbsinit.c EXTRA_libgnu_a_SOURCES += mbsinit.c ## end gnulib module mbsinit ## begin gnulib module mbtowc EXTRA_DIST += mbtowc-impl.h mbtowc.c EXTRA_libgnu_a_SOURCES += mbtowc.c ## end gnulib module mbtowc ## begin gnulib module memchr EXTRA_DIST += memchr.c memchr.valgrind EXTRA_libgnu_a_SOURCES += memchr.c ## end gnulib module memchr ## begin gnulib module netdb BUILT_SOURCES += netdb.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. netdb.h: netdb.in.h $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \ -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \ -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \ -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \ -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \ -e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \ -e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/netdb.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += netdb.h netdb.h-t EXTRA_DIST += netdb.in.h ## end gnulib module netdb ## begin gnulib module nl_langinfo EXTRA_DIST += nl_langinfo.c EXTRA_libgnu_a_SOURCES += nl_langinfo.c ## end gnulib module nl_langinfo ## begin gnulib module obstack EXTRA_DIST += obstack.c obstack.h EXTRA_libgnu_a_SOURCES += obstack.c ## end gnulib module obstack ## begin gnulib module quote EXTRA_DIST += quote.c quote.h EXTRA_libgnu_a_SOURCES += quote.c ## end gnulib module quote ## begin gnulib module quotearg EXTRA_DIST += quotearg.c quotearg.h EXTRA_libgnu_a_SOURCES += quotearg.c ## end gnulib module quotearg ## begin gnulib module realloc-gnu EXTRA_DIST += realloc.c EXTRA_libgnu_a_SOURCES += realloc.c ## end gnulib module realloc-gnu ## begin gnulib module realloc-posix EXTRA_DIST += realloc.c EXTRA_libgnu_a_SOURCES += realloc.c ## end gnulib module realloc-posix ## begin gnulib module regex EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c ## end gnulib module regex ## begin gnulib module size_max libgnu_a_SOURCES += size_max.h ## end gnulib module size_max ## begin gnulib module snprintf EXTRA_DIST += snprintf.c EXTRA_libgnu_a_SOURCES += snprintf.c ## end gnulib module snprintf ## begin gnulib module sockets libgnu_a_SOURCES += sockets.h sockets.c EXTRA_DIST += w32sock.h ## end gnulib module sockets ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create when the system # doesn't have one that works. stdbool.h: stdbool.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stddef.h: stddef.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdint BUILT_SOURCES += $(STDINT_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdint.h stdint.h-t EXTRA_DIST += stdint.in.h ## end gnulib module stdint ## begin gnulib module stdio BUILT_SOURCES += stdio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t EXTRA_DIST += stdio.in.h ## end gnulib module stdio ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module streq EXTRA_DIST += streq.h ## end gnulib module streq ## begin gnulib module strerror EXTRA_DIST += strerror.c EXTRA_libgnu_a_SOURCES += strerror.c ## end gnulib module strerror ## begin gnulib module strftime EXTRA_DIST += strftime.c strftime.h EXTRA_libgnu_a_SOURCES += strftime.c ## end gnulib module strftime ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module strtoimax EXTRA_DIST += strtoimax.c EXTRA_libgnu_a_SOURCES += strtoimax.c ## end gnulib module strtoimax ## begin gnulib module strtol EXTRA_DIST += strtol.c EXTRA_libgnu_a_SOURCES += strtol.c ## end gnulib module strtol ## begin gnulib module strtoll EXTRA_DIST += strtoll.c EXTRA_libgnu_a_SOURCES += strtoll.c ## end gnulib module strtoll ## begin gnulib module strtoul EXTRA_DIST += strtoul.c EXTRA_libgnu_a_SOURCES += strtoul.c ## end gnulib module strtoul ## begin gnulib module strtoull EXTRA_DIST += strtoull.c EXTRA_libgnu_a_SOURCES += strtoull.c ## end gnulib module strtoull ## begin gnulib module strtoumax EXTRA_DIST += strtoumax.c EXTRA_libgnu_a_SOURCES += strtoumax.c ## end gnulib module strtoumax ## begin gnulib module sys_socket BUILT_SOURCES += sys/socket.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''GNULIB_ACCEPT4''@|$(GNULIB_ACCEPT4)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_socket.in.h ## end gnulib module sys_socket ## begin gnulib module sys_time BUILT_SOURCES += sys/time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t EXTRA_DIST += sys_time.in.h ## end gnulib module sys_time ## begin gnulib module sysexits BUILT_SOURCES += $(SYSEXITS_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. sysexits.h: sysexits.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYSEXITS_H''@|$(NEXT_SYSEXITS_H)|g' \ < $(srcdir)/sysexits.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += sysexits.h sysexits.h-t EXTRA_DIST += sysexits.in.h ## end gnulib module sysexits ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module time_r EXTRA_DIST += time_r.c EXTRA_libgnu_a_SOURCES += time_r.c ## end gnulib module time_r ## begin gnulib module unistd BUILT_SOURCES += unistd.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd ## begin gnulib module vasnprintf EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h EXTRA_libgnu_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c ## end gnulib module vasnprintf ## begin gnulib module vasprintf EXTRA_DIST += asprintf.c vasprintf.c EXTRA_libgnu_a_SOURCES += asprintf.c vasprintf.c ## end gnulib module vasprintf ## begin gnulib module verify libgnu_a_SOURCES += verify.h ## end gnulib module verify ## begin gnulib module warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h ## end gnulib module warn-on-use ## begin gnulib module wchar BUILT_SOURCES += wchar.h # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \ -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \ -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \ -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \ -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \ -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \ -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \ -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \ -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \ -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \ -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \ -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \ -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \ -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \ -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \ -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \ -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \ -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \ -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \ -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \ -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \ -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \ -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \ -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \ -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \ -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \ -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \ -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h ## end gnulib module wchar ## begin gnulib module wcrtomb EXTRA_DIST += wcrtomb.c EXTRA_libgnu_a_SOURCES += wcrtomb.c ## end gnulib module wcrtomb ## begin gnulib module wctype-h BUILT_SOURCES += wctype.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t EXTRA_DIST += wctype.in.h ## end gnulib module wctype-h ## begin gnulib module xalloc EXTRA_DIST += xalloc.h xmalloc.c EXTRA_libgnu_a_SOURCES += xmalloc.c ## end gnulib module xalloc ## begin gnulib module xgetdomainname libgnu_a_SOURCES += xgetdomainname.h xgetdomainname.c ## end gnulib module xgetdomainname ## begin gnulib module xgethostname libgnu_a_SOURCES += xgethostname.h xgethostname.c ## end gnulib module xgethostname ## begin gnulib module xsize libgnu_a_SOURCES += xsize.h ## end gnulib module xsize mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : dico-2.2/gnu/Makefile.in000066400000000000000000003242461172612674100151530ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=gnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=xalloc-die --avoid=openat-die --no-libtool --macro-prefix=gl c-strcase crypto/des crypto/md5 crypto/sha1 fprintftime getline getopt getpass-gnu gettext-h gettimeofday hash inttostr inttypes malloc obstack quote quotearg realloc regex size_max snprintf strerror strtoimax strtoumax sysexits vasprintf xalloc xgetdomainname xgethostname VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gnu DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gettext.h ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_$(V)) am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) am__v_AR_0 = @echo " AR " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am_libgnu_a_OBJECTS = c-ctype.$(OBJEXT) c-strcasecmp.$(OBJEXT) \ c-strncasecmp.$(OBJEXT) close-hook.$(OBJEXT) \ exitfail.$(OBJEXT) imaxtostr.$(OBJEXT) inttostr.$(OBJEXT) \ offtostr.$(OBJEXT) uinttostr.$(OBJEXT) umaxtostr.$(OBJEXT) \ localcharset.$(OBJEXT) sockets.$(OBJEXT) \ xgetdomainname.$(OBJEXT) xgethostname.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) DIST_SOURCES = $(libgnu_a_SOURCES) $(EXTRA_libgnu_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = libgnu.a noinst_LTLIBRARIES = EXTRA_DIST = alignof.h alloca.in.h \ $(top_srcdir)/build-aux/arg-nonnull.h btowc.c \ $(top_srcdir)/build-aux/c++defs.h close-hook.h des.c des.h \ md5.c md5.h sha1.c sha1.h errno.in.h exitfail.h float.in.h \ fprintftime.c fprintftime.h fseeko.c stdio-impl.h getdelim.c \ getdomainname.c gethostname.c w32sock.h getline.c getopt.c \ getopt.in.h getopt1.c getopt_int.h getpass.c getpass.h \ gettimeofday.c hash.c hash.h intprops.h anytostr.c inttostr.h \ inttypes.in.h langinfo.in.h config.charset ref-add.sin \ ref-del.sin lseek.c malloc.c malloc.c mbrtowc.c mbsinit.c \ mbtowc-impl.h mbtowc.c memchr.c memchr.valgrind netdb.in.h \ nl_langinfo.c obstack.c obstack.h quote.c quote.h quotearg.c \ quotearg.h realloc.c realloc.c regcomp.c regex.c regex.h \ regex_internal.c regex_internal.h regexec.c snprintf.c \ w32sock.h stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \ stdlib.in.h streq.h strerror.c strftime.c strftime.h \ string.in.h strtoimax.c strtol.c strtoll.c strtoul.c \ strtoull.c strtoumax.c sys_socket.in.h sys_time.in.h \ sysexits.in.h time.in.h time_r.c unistd.in.h asnprintf.c \ float+.h printf-args.c printf-args.h printf-parse.c \ printf-parse.h vasnprintf.c vasnprintf.h asprintf.c \ vasprintf.c $(top_srcdir)/build-aux/warn-on-use.h wchar.in.h \ wcrtomb.c wctype.in.h xalloc.h xmalloc.c # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h configmake.h \ $(ERRNO_H) $(FLOAT_H) $(GETOPT_H) inttypes.h langinfo.h \ netdb.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h \ string.h sys/socket.h sys/time.h $(SYSEXITS_H) time.h unistd.h \ warn-on-use.h wchar.h wctype.h SUFFIXES = .sed .sin MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ arg-nonnull.h-t c++defs.h c++defs.h-t errno.h errno.h-t \ float.h float.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t \ langinfo.h langinfo.h-t netdb.h netdb.h-t stdbool.h \ stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ stdio.h-t stdlib.h stdlib.h-t string.h string.h-t sys/socket.h \ sys/socket.h-t sys/time.h sys/time.h-t sysexits.h sysexits.h-t \ time.h time.h-t unistd.h unistd.h-t warn-on-use.h \ warn-on-use.h-t wchar.h wchar.h-t wctype.h wctype.h-t MOSTLYCLEANDIRS = sys CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ ref-del.sed DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libgnu_a_SOURCES = bitrotate.h c-ctype.h c-ctype.c c-strcase.h \ c-strcasecmp.c c-strncasecmp.c close-hook.c exitfail.c \ gettext.h ignore-value.h imaxtostr.c inttostr.c offtostr.c \ uinttostr.c umaxtostr.c localcharset.h localcharset.c \ size_max.h sockets.h sockets.c verify.h xgetdomainname.h \ xgetdomainname.c xgethostname.h xgethostname.c xsize.h libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = btowc.c des.c md5.c sha1.c fprintftime.c \ fseeko.c getdelim.c getdomainname.c gethostname.c getline.c \ getopt.c getopt1.c getpass.c gettimeofday.c hash.c anytostr.c \ lseek.c malloc.c malloc.c mbrtowc.c mbsinit.c mbtowc.c \ memchr.c nl_langinfo.c obstack.c quote.c quotearg.c realloc.c \ realloc.c regcomp.c regex.c regex_internal.c regexec.c \ snprintf.c strerror.c strftime.c strtoimax.c strtol.c \ strtoll.c strtoul.c strtoull.c strtoumax.c time_r.c \ asnprintf.c printf-args.c printf-parse.c vasnprintf.c \ asprintf.c vasprintf.c wcrtomb.c xmalloc.c ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .sed .sin .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gnu/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits gnu/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(AM_V_at)-rm -f libgnu.a $(AM_V_AR)$(libgnu_a_AR) libgnu.a $(libgnu_a_OBJECTS) $(libgnu_a_LIBADD) $(AM_V_at)$(RANLIB) libgnu.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-hook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/des.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fprintftime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdomainname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umaxtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetdomainname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgethostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-local .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ ctags ctags-recursive distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am uninstall-local # We need the following in order to create when the system # doesn't have one that works with the given compiler. alloca.h: alloca.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/alloca.in.h; \ } > $@-t && \ mv -f $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/arg-nonnull.h, except that it has the copyright header cut off. arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/c++defs.h \ > $@-t && \ mv $@-t $@ # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile $(AM_V_GEN)rm -f $@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ echo '#define SBINDIR "$(sbindir)"'; \ echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ echo '#define INFODIR "$(infodir)"'; \ echo '#define HTMLDIR "$(htmldir)"'; \ echo '#define DVIDIR "$(dvidir)"'; \ echo '#define PDFDIR "$(pdfdir)"'; \ echo '#define PSDIR "$(psdir)"'; \ echo '#define LIBDIR "$(libdir)"'; \ echo '#define LISPDIR "$(lispdir)"'; \ echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ echo '#define PKGDATADIR "$(pkgdatadir)"'; \ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ echo '#define PKGLIBDIR "$(pkglibdir)"'; \ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ } | sed '/""/d' > $@-t && \ if test -f $@ && cmp $@-t $@ > /dev/null; then \ rm -f $@-t; \ else \ rm -f $@; mv $@-t $@; \ fi # We need the following in order to create when the system # doesn't have one that is POSIX compliant. errno.h: errno.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ < $(srcdir)/errno.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. float.h: float.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ < $(srcdir)/float.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/langinfo.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to install a simple file in $(libdir) # which is shared with other installed packages. We use a list of referencing # packages so that "make uninstall" will remove the file if and only if it # is not used by another installed package. # On systems with glibc-2.1 or newer, the file is redundant, therefore we # avoid installing it. all-local: charset.alias ref-add.sed ref-del.sed install-exec-local: install-exec-localcharset install-exec-localcharset: all-local if test $(GLIBC21) = no; then \ case '$(host_os)' in \ darwin[56]*) \ need_charset_alias=true ;; \ darwin* | cygwin* | mingw* | pw32* | cegcc*) \ need_charset_alias=false ;; \ *) \ need_charset_alias=true ;; \ esac ; \ else \ need_charset_alias=false ; \ fi ; \ if $$need_charset_alias; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ fi ; \ if test -f $(charset_alias); then \ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ else \ if $$need_charset_alias; then \ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ rm -f $(charset_tmp) ; \ fi ; \ fi uninstall-local: uninstall-localcharset uninstall-localcharset: all-local if test -f $(charset_alias); then \ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ if grep '^# Packages using this file: $$' $(charset_tmp) \ > /dev/null; then \ rm -f $(charset_alias); \ else \ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ fi; \ rm -f $(charset_tmp); \ fi charset.alias: config.charset $(AM_V_GEN)rm -f t-$@ $@ && \ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ mv t-$@ $@ .sin.sed: $(AM_V_GEN)rm -f t-$@ $@ && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ mv t-$@ $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. netdb.h: netdb.in.h $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \ -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \ -e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \ -e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \ -e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \ -e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \ -e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/netdb.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. stdbool.h: stdbool.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stddef.h: stddef.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdint.h: stdint.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \ -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \ -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \ -e 's|@''GNULIB_ACCEPT4''@|$(GNULIB_ACCEPT4)|g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_socket.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. sysexits.h: sysexits.in.h $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_SYSEXITS_H''@|$(HAVE_SYSEXITS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYSEXITS_H''@|$(NEXT_SYSEXITS_H)|g' \ < $(srcdir)/sysexits.in.h; \ } > $@-t && \ mv -f $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/warn-on-use.h, except that it has the copyright header cut off. warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/warn-on-use.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \ -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \ -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \ -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \ -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \ -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \ -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \ -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \ -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \ -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \ -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \ -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \ -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \ -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \ -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \ -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \ -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \ -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \ -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \ -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \ -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \ -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \ -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \ -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \ -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \ -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \ -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \ -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ } > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # 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: dico-2.2/gnu/alignof.h000066400000000000000000000044701172612674100146700ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Determine alignment of types. Copyright (C) 2003-2004, 2006, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _ALIGNOF_H #define _ALIGNOF_H #include /* Determine the alignment of a structure slot (field) of a given type, at compile time. Note that the result depends on the ABI. Note: The result cannot be used as a value for an 'enum' constant, due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ #if defined __cplusplus template struct alignof_helper { char __slot1; type __slot2; }; # define alignof_slot(type) offsetof (alignof_helper, __slot2) #else # define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) #endif /* Determine the good alignment of a object of the given type at compile time. Note that this is not necessarily the same as alignof_slot(type). For example, with GNU C on x86 platforms: alignof_type(double) = 8, but - when -malign-double is not specified: alignof_slot(double) = 4, - when -malign-double is specified: alignof_slot(double) = 8. Note: The result cannot be used as a value for an 'enum' constant, due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ #if defined __GNUC__ # define alignof_type __alignof__ #else # define alignof_type alignof_slot #endif /* alignof is an alias for alignof_slot semantics, since that's what most callers need. Note: The result cannot be used as a value for an 'enum' constant, due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ #define alignof alignof_slot #endif /* _ALIGNOF_H */ dico-2.2/gnu/alloca.in.h000066400000000000000000000037041172612674100151100ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Memory allocation on the stack. Copyright (C) 1995, 1999, 2001-2004, 2006-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ #ifndef _GL_ALLOCA_H #define _GL_ALLOCA_H /* alloca (N) returns a pointer to N bytes of memory allocated on the stack, which will last until the function returns. Use of alloca should be avoided: - inside arguments of function calls - undefined behaviour, - in inline functions - the allocation may actually last until the calling function returns, - for huge N (say, N >= 65536) - you never know how large (or small) the stack is, and when the stack cannot fulfill the memory allocation request, the program just crashes. */ #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA # else # include # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #endif /* _GL_ALLOCA_H */ dico-2.2/gnu/anytostr.c000066400000000000000000000031601172612674100151220ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* anytostr.c -- convert integers to printable strings Copyright (C) 2001, 2006, 2008-2011 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 3 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, see . */ /* Written by Paul Eggert */ /* Tell gcc not to warn about the (i < 0) test, below. */ #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wtype-limits" #endif #include #include "inttostr.h" /* Convert I to a printable string in BUF, which must be at least INT_BUFSIZE_BOUND (INTTYPE) bytes long. Return the address of the printable string, which need not start at BUF. */ char * __attribute_warn_unused_result__ anytostr (inttype i, char *buf) { char *p = buf + INT_STRLEN_BOUND (inttype); *p = 0; if (i < 0) { do *--p = '0' - i % 10; while ((i /= 10) != 0); *--p = '-'; } else { do *--p = '0' + i % 10; while ((i /= 10) != 0); } return p; } dico-2.2/gnu/asnprintf.c000066400000000000000000000023111172612674100152400ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Formatted output to strings. Copyright (C) 1999, 2002, 2006, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "vasnprintf.h" #include char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *result; va_start (args, format); result = vasnprintf (resultbuf, lengthp, format, args); va_end (args); return result; } dico-2.2/gnu/asprintf.c000066400000000000000000000023441172612674100150700ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Formatted output to strings. Copyright (C) 1999, 2002, 2006-2007, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #ifdef IN_LIBASPRINTF # include "vasprintf.h" #else # include #endif #include int asprintf (char **resultp, const char *format, ...) { va_list args; int result; va_start (args, format); result = vasprintf (resultp, format, args); va_end (args); return result; } dico-2.2/gnu/bitrotate.h000066400000000000000000000103631172612674100152440ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* bitrotate.h - Rotate bits in integers Copyright (C) 2008-2011 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 3 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, see . */ /* Written by Simon Josefsson , 2008. */ #ifndef _GL_BITROTATE_H #define _GL_BITROTATE_H #include #include #include #ifdef UINT64_MAX /* Given an unsigned 64-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 and 63 inclusive. */ static inline uint64_t rotl64 (uint64_t x, int n) { return ((x << n) | (x >> (64 - n))) & UINT64_MAX; } /* Given an unsigned 64-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be between 1 to 63 inclusive.*/ static inline uint64_t rotr64 (uint64_t x, int n) { return ((x >> n) | (x << (64 - n))) & UINT64_MAX; } #endif /* Given an unsigned 32-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 and 31 inclusive. */ static inline uint32_t rotl32 (uint32_t x, int n) { return ((x << n) | (x >> (32 - n))) & UINT32_MAX; } /* Given an unsigned 32-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be between 1 to 31 inclusive.*/ static inline uint32_t rotr32 (uint32_t x, int n) { return ((x >> n) | (x << (32 - n))) & UINT32_MAX; } /* Given a size_t argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 and (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ static inline size_t rotl_sz (size_t x, int n) { return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; } /* Given a size_t argument X, return the value corresponding to rotating the bits N steps to the right. N must be between 1 to (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ static inline size_t rotr_sz (size_t x, int n) { return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; } /* Given an unsigned 16-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 to 15 inclusive, but on most relevant targets N can also be 0 and 16 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint16_t rotl16 (uint16_t x, int n) { return ((x << n) | (x >> (16 - n))) & UINT16_MAX; } /* Given an unsigned 16-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be in 1 to 15 inclusive, but on most relevant targets N can also be 0 and 16 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint16_t rotr16 (uint16_t x, int n) { return ((x >> n) | (x << (16 - n))) & UINT16_MAX; } /* Given an unsigned 8-bit argument X, return the value corresponding to rotating the bits N steps to the left. N must be between 1 to 7 inclusive, but on most relevant targets N can also be 0 and 8 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint8_t rotl8 (uint8_t x, int n) { return ((x << n) | (x >> (8 - n))) & UINT8_MAX; } /* Given an unsigned 8-bit argument X, return the value corresponding to rotating the bits N steps to the right. N must be in 1 to 7 inclusive, but on most relevant targets N can also be 0 and 8 because 'int' is at least 32 bits and the arguments must widen before shifting. */ static inline uint8_t rotr8 (uint8_t x, int n) { return ((x >> n) | (x << (8 - n))) & UINT8_MAX; } #endif /* _GL_BITROTATE_H */ dico-2.2/gnu/btowc.c000066400000000000000000000022411172612674100143540ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert unibyte character to wide character. Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #include #include wint_t btowc (int c) { if (c != EOF) { char buf[1]; wchar_t wc; buf[0] = c; if (mbtowc (&wc, buf, 1) >= 0) return wc; } return WEOF; } dico-2.2/gnu/c-ctype.c000066400000000000000000000256011172612674100146070ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Character handling in C locale. Copyright 2000-2003, 2006, 2009-2011 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #define NO_C_CTYPE_MACROS #include "c-ctype.h" /* The function isascii is not locale dependent. Its use in EBCDIC is questionable. */ bool c_isascii (int c) { return (c >= 0x00 && c <= 0x7f); } bool c_isalnum (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); #else return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); #endif #else 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 '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': return 1; default: return 0; } #endif } bool c_isalpha (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); #else return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); #endif #else 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 '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': return 1; default: return 0; } #endif } bool c_isblank (int c) { return (c == ' ' || c == '\t'); } bool c_iscntrl (int c) { #if C_CTYPE_ASCII return ((c & ~0x1f) == 0 || c == 0x7f); #else switch (c) { case ' ': case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': 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 '[': case '\\': case ']': case '^': case '_': 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 '{': case '|': case '}': case '~': return 0; default: return 1; } #endif } bool c_isdigit (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS return (c >= '0' && c <= '9'); #else switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return 1; default: return 0; } #endif } bool c_islower (int c) { #if C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'a' && c <= 'z'); #else 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': return 1; default: return 0; } #endif } bool c_isgraph (int c) { #if C_CTYPE_ASCII return (c >= '!' && c <= '~'); #else switch (c) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': 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 '[': case '\\': case ']': case '^': case '_': 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 '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_isprint (int c) { #if C_CTYPE_ASCII return (c >= ' ' && c <= '~'); #else switch (c) { case ' ': case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': 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 '[': case '\\': case ']': case '^': case '_': 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 '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_ispunct (int c) { #if C_CTYPE_ASCII return ((c >= '!' && c <= '~') && !((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); #else switch (c) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': return 1; default: return 0; } #endif } bool c_isspace (int c) { return (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'); } bool c_isupper (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE return (c >= 'A' && c <= 'Z'); #else 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': return 1; default: return 0; } #endif } bool c_isxdigit (int c) { #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); #else return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f')); #endif #else 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': return 1; default: return 0; } #endif } int c_tolower (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); #else switch (c) { case 'A': return 'a'; case 'B': return 'b'; case 'C': return 'c'; case 'D': return 'd'; case 'E': return 'e'; case 'F': return 'f'; case 'G': return 'g'; case 'H': return 'h'; case 'I': return 'i'; case 'J': return 'j'; case 'K': return 'k'; case 'L': return 'l'; case 'M': return 'm'; case 'N': return 'n'; case 'O': return 'o'; case 'P': return 'p'; case 'Q': return 'q'; case 'R': return 'r'; case 'S': return 's'; case 'T': return 't'; case 'U': return 'u'; case 'V': return 'v'; case 'W': return 'w'; case 'X': return 'x'; case 'Y': return 'y'; case 'Z': return 'z'; default: return c; } #endif } int c_toupper (int c) { #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); #else switch (c) { case 'a': return 'A'; case 'b': return 'B'; case 'c': return 'C'; case 'd': return 'D'; case 'e': return 'E'; case 'f': return 'F'; case 'g': return 'G'; case 'h': return 'H'; case 'i': return 'I'; case 'j': return 'J'; case 'k': return 'K'; case 'l': return 'L'; case 'm': return 'M'; case 'n': return 'N'; case 'o': return 'O'; case 'p': return 'P'; case 'q': return 'Q'; case 'r': return 'R'; case 's': return 'S'; case 't': return 'T'; case 'u': return 'U'; case 'v': return 'V'; case 'w': return 'W'; case 'x': return 'X'; case 'y': return 'Y'; case 'z': return 'Z'; default: return c; } #endif } dico-2.2/gnu/c-ctype.h000066400000000000000000000216121172612674100146120ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Character handling in C locale. These functions work like the corresponding functions in , except that they have the C (POSIX) locale hardwired, whereas the functions' behaviour depends on the current locale set via setlocale. Copyright (C) 2000-2003, 2006, 2008-2011 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef C_CTYPE_H #define C_CTYPE_H #include #ifdef __cplusplus extern "C" { #endif /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. */ /* Check whether the ASCII optimizations apply. */ /* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that '0', '1', ..., '9' have consecutive integer values. */ #define C_CTYPE_CONSECUTIVE_DIGITS 1 #if ('A' <= 'Z') \ && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ && ('Y' + 1 == 'Z') #define C_CTYPE_CONSECUTIVE_UPPERCASE 1 #endif #if ('a' <= 'z') \ && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ && ('y' + 1 == 'z') #define C_CTYPE_CONSECUTIVE_LOWERCASE 1 #endif #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ASCII or one of its variants or extensions, not EBCDIC. Testing the value of '\n' and '\r' is not relevant. */ #define C_CTYPE_ASCII 1 #endif /* Function declarations. */ /* Unlike the functions in , which require an argument in the range of the 'unsigned char' type, the functions here operate on values that are in the 'unsigned char' range or in the 'char' range. In other words, when you have a 'char' value, you need to cast it before using it as argument to a function: const char *s = ...; if (isalpha ((unsigned char) *s)) ... but you don't need to cast it for the functions defined in this file: const char *s = ...; if (c_isalpha (*s)) ... */ extern bool c_isascii (int c); /* not locale dependent */ extern bool c_isalnum (int c); extern bool c_isalpha (int c); extern bool c_isblank (int c); extern bool c_iscntrl (int c); extern bool c_isdigit (int c); extern bool c_islower (int c); extern bool c_isgraph (int c); extern bool c_isprint (int c); extern bool c_ispunct (int c); extern bool c_isspace (int c); extern bool c_isupper (int c); extern bool c_isxdigit (int c); extern int c_tolower (int c); extern int c_toupper (int c); #if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS /* ASCII optimizations. */ #undef c_isascii #define c_isascii(c) \ ({ int __c = (c); \ (__c >= 0x00 && __c <= 0x7f); \ }) #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isalnum #define c_isalnum(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ }) #else #undef c_isalnum #define c_isalnum(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || (__c >= 'A' && __c <= 'Z') \ || (__c >= 'a' && __c <= 'z')); \ }) #endif #endif #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isalpha #define c_isalpha(c) \ ({ int __c = (c); \ ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ }) #else #undef c_isalpha #define c_isalpha(c) \ ({ int __c = (c); \ ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ }) #endif #endif #undef c_isblank #define c_isblank(c) \ ({ int __c = (c); \ (__c == ' ' || __c == '\t'); \ }) #if C_CTYPE_ASCII #undef c_iscntrl #define c_iscntrl(c) \ ({ int __c = (c); \ ((__c & ~0x1f) == 0 || __c == 0x7f); \ }) #endif #if C_CTYPE_CONSECUTIVE_DIGITS #undef c_isdigit #define c_isdigit(c) \ ({ int __c = (c); \ (__c >= '0' && __c <= '9'); \ }) #endif #if C_CTYPE_CONSECUTIVE_LOWERCASE #undef c_islower #define c_islower(c) \ ({ int __c = (c); \ (__c >= 'a' && __c <= 'z'); \ }) #endif #if C_CTYPE_ASCII #undef c_isgraph #define c_isgraph(c) \ ({ int __c = (c); \ (__c >= '!' && __c <= '~'); \ }) #endif #if C_CTYPE_ASCII #undef c_isprint #define c_isprint(c) \ ({ int __c = (c); \ (__c >= ' ' && __c <= '~'); \ }) #endif #if C_CTYPE_ASCII #undef c_ispunct #define c_ispunct(c) \ ({ int _c = (c); \ (c_isgraph (_c) && ! c_isalnum (_c)); \ }) #endif #undef c_isspace #define c_isspace(c) \ ({ int __c = (c); \ (__c == ' ' || __c == '\t' \ || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ }) #if C_CTYPE_CONSECUTIVE_UPPERCASE #undef c_isupper #define c_isupper(c) \ ({ int __c = (c); \ (__c >= 'A' && __c <= 'Z'); \ }) #endif #if C_CTYPE_CONSECUTIVE_DIGITS \ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #if C_CTYPE_ASCII #undef c_isxdigit #define c_isxdigit(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ }) #else #undef c_isxdigit #define c_isxdigit(c) \ ({ int __c = (c); \ ((__c >= '0' && __c <= '9') \ || (__c >= 'A' && __c <= 'F') \ || (__c >= 'a' && __c <= 'f')); \ }) #endif #endif #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE #undef c_tolower #define c_tolower(c) \ ({ int __c = (c); \ (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ }) #undef c_toupper #define c_toupper(c) \ ({ int __c = (c); \ (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ }) #endif #endif /* optimizing for speed */ #ifdef __cplusplus } #endif #endif /* C_CTYPE_H */ dico-2.2/gnu/c-strcase.h000066400000000000000000000042071172612674100151330ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Case-insensitive string comparison functions in C locale. Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef C_STRCASE_H #define C_STRCASE_H #include /* The functions defined in this file assume the "C" locale and a character set without diacritics (ASCII-US or EBCDIC-US or something like that). Even if the "C" locale on a particular system is an extension of the ASCII character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it is ISO-8859-1), the functions in this file recognize only the ASCII characters. More precisely, one of the string arguments must be an ASCII string; the other one can also contain non-ASCII characters (but then the comparison result will be nonzero). */ #ifdef __cplusplus extern "C" { #endif /* Compare strings 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. */ extern int c_strcasecmp (const char *s1, const char *s2); /* Compare no more than N characters of strings 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. */ extern int c_strncasecmp (const char *s1, const char *s2, size_t n); #ifdef __cplusplus } #endif #endif /* C_STRCASE_H */ dico-2.2/gnu/c-strcasecmp.c000066400000000000000000000033071172612674100156260ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* c-strcasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "c-strcase.h" #include #include "c-ctype.h" int c_strcasecmp (const char *s1, const char *s2) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } dico-2.2/gnu/c-strncasecmp.c000066400000000000000000000033511172612674100160030ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* c-strncasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include "c-strcase.h" #include #include "c-ctype.h" int c_strncasecmp (const char *s1, const char *s2, size_t n) { register const unsigned char *p1 = (const unsigned char *) s1; register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) return 0; do { c1 = c_tolower (*p1); c2 = c_tolower (*p2); if (--n == 0 || c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); if (UCHAR_MAX <= INT_MAX) return c1 - c2; else /* On machines where 'char' and 'int' are types of the same size, the difference of two 'unsigned char' values - including the sign bit - doesn't fit in an 'int'. */ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); } dico-2.2/gnu/close-hook.c000066400000000000000000000051501172612674100153030ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Hook for making the close() function extensible. Copyright (C) 2009-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2009. 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 3 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, see . */ #include /* Specification. */ #include "close-hook.h" #include #include #undef close /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* The first and last link in the doubly linked list. Initially the list is empty. */ static struct close_hook anchor = { &anchor, &anchor, NULL }; int execute_close_hooks (int fd, const struct close_hook *remaining_list) { if (remaining_list == &anchor) /* End of list reached. */ return close (fd); else return remaining_list->private_fn (fd, remaining_list->private_next); } int execute_all_close_hooks (int fd) { return execute_close_hooks (fd, anchor.private_next); } void register_close_hook (close_hook_fn hook, struct close_hook *link) { if (link->private_next == NULL && link->private_prev == NULL) { /* Add the link to the doubly linked list. */ link->private_next = anchor.private_next; link->private_prev = &anchor; link->private_fn = hook; anchor.private_next->private_prev = link; anchor.private_next = link; } else { /* The link is already in use. */ if (link->private_fn != hook) abort (); } } void unregister_close_hook (struct close_hook *link) { struct close_hook *next = link->private_next; struct close_hook *prev = link->private_prev; if (next != NULL && prev != NULL) { /* The link is in use. Remove it from the doubly linked list. */ prev->private_next = next; next->private_prev = prev; /* Clear the link, to mark it unused. */ link->private_next = NULL; link->private_prev = NULL; link->private_fn = NULL; } } #endif dico-2.2/gnu/close-hook.h000066400000000000000000000047201172612674100153120ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Hook for making the close() function extensible. Copyright (C) 2009-2011 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 3 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, see . */ #ifndef CLOSE_HOOK_H #define CLOSE_HOOK_H #ifdef __cplusplus extern "C" { #endif /* Currently, this entire code is only needed for the handling of sockets on native Windows platforms. */ #if WINDOWS_SOCKETS /* An element of the list of close hooks. The fields of this structure are considered private. */ struct close_hook { /* Doubly linked list. */ struct close_hook *private_next; struct close_hook *private_prev; /* Function that treats the types of FD that it knows about and calls execute_close_hooks (FD, REMAINING_LIST) as a fallback. */ int (*private_fn) (int fd, const struct close_hook *remaining_list); }; /* This type of function closes FD, applying special knowledge for the FD types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST) for the other FD types. */ typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list); /* Execute the close hooks in REMAINING_LIST. Return 0 or -1, like close() would do. */ extern int execute_close_hooks (int fd, const struct close_hook *remaining_list); /* Execute all close hooks. Return 0 or -1, like close() would do. */ extern int execute_all_close_hooks (int fd); /* Add a function to the list of close hooks. The LINK variable points to a piece of memory which is guaranteed to be accessible until the corresponding call to unregister_close_hook. */ extern void register_close_hook (close_hook_fn hook, struct close_hook *link); /* Removes a function from the list of close hooks. */ extern void unregister_close_hook (struct close_hook *link); #endif #ifdef __cplusplus } #endif #endif /* CLOSE_HOOK_H */ dico-2.2/gnu/config.charset000066400000000000000000000551121172612674100157170ustar00rootroot00000000000000#! /bin/sh # Output a system dependent table of character encoding aliases. # # Copyright (C) 2000-2004, 2006-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # The table consists of lines of the form # ALIAS CANONICAL # # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". # ALIAS is compared in a case sensitive way. # # CANONICAL is the GNU canonical name for this character encoding. # It must be an encoding supported by libiconv. Support by GNU libc is # also desirable. CANONICAL is case insensitive. Usually an upper case # MIME charset name is preferred. # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-3 Y glibc solaris cygwin # ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-6 Y glibc aix hpux solaris cygwin # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin # ISO-8859-8 Y glibc aix hpux osf solaris cygwin # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin # ISO-8859-13 glibc netbsd openbsd darwin cygwin # ISO-8859-14 glibc cygwin # ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin # KOI8-R Y glibc solaris freebsd netbsd openbsd darwin # KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin # KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos # CP852 dos # CP855 dos # CP856 aix # CP857 dos # CP861 dos # CP862 dos # CP864 dos # CP865 dos # CP866 freebsd netbsd openbsd darwin dos # CP869 dos # CP874 woe32 dos # CP922 aix # CP932 aix cygwin woe32 dos # CP943 aix # CP949 osf darwin woe32 dos # CP950 woe32 dos # CP1046 aix # CP1124 aix # CP1125 dos # CP1129 aix # CP1131 darwin # CP1250 woe32 # CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 # CP1252 aix woe32 # CP1253 woe32 # CP1254 woe32 # CP1255 glibc woe32 # CP1256 woe32 # CP1257 woe32 # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin # EUC-TW glibc aix hpux irix osf solaris netbsd # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin # BIG5-HKSCS glibc solaris darwin # GBK glibc aix osf solaris darwin cygwin woe32 dos # GB18030 glibc solaris netbsd darwin # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin # JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris cygwin # VISCII Y glibc # TCVN5712-1 glibc # ARMSCII-8 glibc darwin # GEORGIAN-PS glibc cygwin # PT154 glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux # HP-HEBREW8 hpux # HP-TURKISH8 hpux # HP-KANA8 hpux # DEC-KANJI osf # DEC-HANYU osf # UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin # # Note: Names which are not marked as being a MIME name should not be used in # Internet protocols for information interchange (mail, news, etc.). # # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications # must understand both names and treat them as equivalent. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM host="$1" os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` echo "# This file contains a table of character encoding aliases," echo "# suitable for operating system '${os}'." echo "# It was automatically generated from config.charset." # List of references, updated during installation: echo "# Packages using this file: " case "$os" in linux-gnulibc1*) # Linux libc5 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" echo "POSIX ASCII" for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ sv_FI sv_SE; do echo "$l ISO-8859-1" echo "$l.iso-8859-1 ISO-8859-1" echo "$l.iso-8859-15 ISO-8859-15" echo "$l.iso-8859-15@euro ISO-8859-15" echo "$l@euro ISO-8859-15" echo "$l.cp-437 CP437" echo "$l.cp-850 CP850" echo "$l.cp-1252 CP1252" echo "$l.cp-1252@euro CP1252" #echo "$l.atari-st ATARI-ST" # not a commonly used encoding echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ sl_SI sr sr_CS sr_YU; do echo "$l ISO-8859-2" echo "$l.iso-8859-2 ISO-8859-2" echo "$l.cp-852 CP852" echo "$l.cp-1250 CP1250" echo "$l.utf-8 UTF-8" done for l in mk mk_MK ru ru_RU; do echo "$l ISO-8859-5" echo "$l.iso-8859-5 ISO-8859-5" echo "$l.koi8-r KOI8-R" echo "$l.cp-866 CP866" echo "$l.cp-1251 CP1251" echo "$l.utf-8 UTF-8" done for l in ar ar_SA; do echo "$l ISO-8859-6" echo "$l.iso-8859-6 ISO-8859-6" echo "$l.cp-864 CP864" #echo "$l.cp-868 CP868" # not a commonly used encoding echo "$l.cp-1256 CP1256" echo "$l.utf-8 UTF-8" done for l in el el_GR gr gr_GR; do echo "$l ISO-8859-7" echo "$l.iso-8859-7 ISO-8859-7" echo "$l.cp-869 CP869" echo "$l.cp-1253 CP1253" echo "$l.cp-1253@euro CP1253" echo "$l.utf-8 UTF-8" echo "$l.utf-8@euro UTF-8" done for l in he he_IL iw iw_IL; do echo "$l ISO-8859-8" echo "$l.iso-8859-8 ISO-8859-8" echo "$l.cp-862 CP862" echo "$l.cp-1255 CP1255" echo "$l.utf-8 UTF-8" done for l in tr tr_TR; do echo "$l ISO-8859-9" echo "$l.iso-8859-9 ISO-8859-9" echo "$l.cp-857 CP857" echo "$l.cp-1254 CP1254" echo "$l.utf-8 UTF-8" done for l in lt lt_LT lv lv_LV; do #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name echo "$l ISO-8859-13" done for l in ru_UA uk uk_UA; do echo "$l KOI8-U" done for l in zh zh_CN; do #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name echo "$l GB2312" done for l in ja ja_JP ja_JP.EUC; do echo "$l EUC-JP" done for l in ko ko_KR; do echo "$l EUC-KR" done for l in th th_TH; do echo "$l TIS-620" done for l in fa fa_IR; do #echo "$l ISIRI-3342" # a broken encoding echo "$l.utf-8 UTF-8" done ;; linux* | *-gnu*) # With glibc-2.1 or newer, we don't need any canonicalization, # because glibc has iconv and both glibc and libiconv support all # GNU canonical names directly. Therefore, the Makefile does not # need to install the alias file at all. # The following applies only to glibc-2.0.x and older libcs. echo "ISO_646.IRV:1983 ASCII" ;; aix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "IBM-850 CP850" echo "IBM-856 CP856" echo "IBM-921 ISO-8859-13" echo "IBM-922 CP922" echo "IBM-932 CP932" echo "IBM-943 CP943" echo "IBM-1046 CP1046" echo "IBM-1124 CP1124" echo "IBM-1129 CP1129" echo "IBM-1252 CP1252" echo "IBM-eucCN GB2312" echo "IBM-eucJP EUC-JP" echo "IBM-eucKR EUC-KR" echo "IBM-eucTW EUC-TW" echo "big5 BIG5" echo "GBK GBK" echo "TIS-620 TIS-620" echo "UTF-8 UTF-8" ;; hpux*) echo "iso88591 ISO-8859-1" echo "iso88592 ISO-8859-2" echo "iso88595 ISO-8859-5" echo "iso88596 ISO-8859-6" echo "iso88597 ISO-8859-7" echo "iso88598 ISO-8859-8" echo "iso88599 ISO-8859-9" echo "iso885915 ISO-8859-15" echo "roman8 HP-ROMAN8" echo "arabic8 HP-ARABIC8" echo "greek8 HP-GREEK8" echo "hebrew8 HP-HEBREW8" echo "turkish8 HP-TURKISH8" echo "kana8 HP-KANA8" echo "tis620 TIS-620" echo "big5 BIG5" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "hp15CN GB2312" #echo "ccdc ?" # what is this? echo "SJIS SHIFT_JIS" echo "utf8 UTF-8" ;; irix*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" ;; osf*) echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "cp850 CP850" echo "big5 BIG5" echo "dechanyu DEC-HANYU" echo "dechanzi GB2312" echo "deckanji DEC-KANJI" echo "deckorean EUC-KR" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "GBK GBK" echo "KSC5601 CP949" echo "sdeckanji EUC-JP" echo "SJIS SHIFT_JIS" echo "TACTIS TIS-620" echo "UTF-8 UTF-8" ;; solaris*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-8 ISO-8859-8" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "ansi-1251 CP1251" echo "BIG5 BIG5" echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" echo "GBK GBK" echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; freebsd* | os2*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do echo "$l.ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do echo "$l.ISO_8859-1 ISO-8859-1" echo "$l.DIS_8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do echo "$l.ISO_8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO_8859-4 ISO-8859-4" done for l in ru_RU ru_SU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO_8859-5 ISO-8859-5" echo "$l.CP866 CP866" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ja_JP.Shift_JIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; netbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "eucCN GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "eucTW EUC-TW" echo "BIG5 BIG5" echo "SJIS SHIFT_JIS" ;; openbsd*) echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" ;; darwin[56]*) # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "C ASCII" for l in en_AU en_CA en_GB en_US la_LN; do echo "$l.US-ASCII ASCII" done for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ nl_NL no_NO pt_PT sv_SE; do echo "$l ISO-8859-1" echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in la_LN; do echo "$l.ISO8859-1 ISO-8859-1" echo "$l.ISO8859-15 ISO-8859-15" done for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do echo "$l.ISO8859-2 ISO-8859-2" done for l in la_LN lt_LT; do echo "$l.ISO8859-4 ISO-8859-4" done for l in ru_RU; do echo "$l.KOI8-R KOI8-R" echo "$l.ISO8859-5 ISO-8859-5" echo "$l.CP866 CP866" done for l in bg_BG; do echo "$l.CP1251 CP1251" done echo "uk_UA.KOI8-U KOI8-U" echo "zh_TW.BIG5 BIG5" echo "zh_TW.Big5 BIG5" echo "zh_CN.EUC GB2312" echo "ja_JP.EUC EUC-JP" echo "ja_JP.SJIS SHIFT_JIS" echo "ko_KR.EUC EUC-KR" ;; darwin*) # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is # useless: # - It returns the empty string when LANG is set to a locale of the # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 # LC_CTYPE file. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. # - The documentation says: # "... all code that calls BSD system routines should ensure # that the const *char parameters of these routines are in UTF-8 # encoding. All BSD system functions expect their string # parameters to be in UTF-8 encoding and nothing else." # It also says # "An additional caveat is that string parameters for files, # paths, and other file-system entities must be in canonical # UTF-8. In a canonical UTF-8 Unicode string, all decomposable # characters are decomposed ..." # but this is not true: You can pass non-decomposed UTF-8 strings # to file system functions, and it is the OS which will convert # them to decomposed UTF-8 before accessing the file system. # - The Apple Terminal application displays UTF-8 by default. # - However, other applications are free to use different encodings: # - xterm uses ISO-8859-1 by default. # - TextEdit uses MacRoman by default. # We prefer UTF-8 over decomposed UTF-8-MAC because one should # minimize the use of decomposed Unicode. Unfortunately, through the # Darwin file system, decomposed UTF-8 strings are leaked into user # space nevertheless. # Then there are also the locales with encodings other than US-ASCII # and UTF-8. These locales can be occasionally useful to users (e.g. # when grepping through ISO-8859-1 encoded text files), when all their # file names are in US-ASCII. echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-7 ISO-8859-7" echo "ISO8859-9 ISO-8859-9" echo "ISO8859-13 ISO-8859-13" echo "ISO8859-15 ISO-8859-15" echo "KOI8-R KOI8-R" echo "KOI8-U KOI8-U" echo "CP866 CP866" echo "CP949 CP949" echo "CP1131 CP1131" echo "CP1251 CP1251" echo "eucCN GB2312" echo "GB2312 GB2312" echo "eucJP EUC-JP" echo "eucKR EUC-KR" echo "Big5 BIG5" echo "Big5HKSCS BIG5-HKSCS" echo "GBK GBK" echo "GB18030 GB18030" echo "SJIS SHIFT_JIS" echo "ARMSCII-8 ARMSCII-8" echo "PT154 PT154" #echo "ISCII-DEV ?" echo "* UTF-8" ;; beos* | haiku*) # BeOS and Haiku have a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; msdosdjgpp*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. echo "#" echo "# The encodings given here may not all be correct." echo "# If you find that the encoding given for your language and" echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages echo "ca CP850" echo "ca_ES CP850" echo "da CP865" # not CP850 ?? echo "da_DK CP865" # not CP850 ?? echo "de CP850" echo "de_AT CP850" echo "de_CH CP850" echo "de_DE CP850" echo "en CP850" echo "en_AU CP850" # not CP437 ?? echo "en_CA CP850" echo "en_GB CP850" echo "en_NZ CP437" echo "en_US CP437" echo "en_ZA CP850" # not CP437 ?? echo "es CP850" echo "es_AR CP850" echo "es_BO CP850" echo "es_CL CP850" echo "es_CO CP850" echo "es_CR CP850" echo "es_CU CP850" echo "es_DO CP850" echo "es_EC CP850" echo "es_ES CP850" echo "es_GT CP850" echo "es_HN CP850" echo "es_MX CP850" echo "es_NI CP850" echo "es_PA CP850" echo "es_PY CP850" echo "es_PE CP850" echo "es_SV CP850" echo "es_UY CP850" echo "es_VE CP850" echo "et CP850" echo "et_EE CP850" echo "eu CP850" echo "eu_ES CP850" echo "fi CP850" echo "fi_FI CP850" echo "fr CP850" echo "fr_BE CP850" echo "fr_CA CP850" echo "fr_CH CP850" echo "fr_FR CP850" echo "ga CP850" echo "ga_IE CP850" echo "gd CP850" echo "gd_GB CP850" echo "gl CP850" echo "gl_ES CP850" echo "id CP850" # not CP437 ?? echo "id_ID CP850" # not CP437 ?? echo "is CP861" # not CP850 ?? echo "is_IS CP861" # not CP850 ?? echo "it CP850" echo "it_CH CP850" echo "it_IT CP850" echo "lt CP775" echo "lt_LT CP775" echo "lv CP775" echo "lv_LV CP775" echo "nb CP865" # not CP850 ?? echo "nb_NO CP865" # not CP850 ?? echo "nl CP850" echo "nl_BE CP850" echo "nl_NL CP850" echo "nn CP865" # not CP850 ?? echo "nn_NO CP865" # not CP850 ?? echo "no CP865" # not CP850 ?? echo "no_NO CP865" # not CP850 ?? echo "pt CP850" echo "pt_BR CP850" echo "pt_PT CP850" echo "sv CP850" echo "sv_SE CP850" # ISO-8859-2 languages echo "cs CP852" echo "cs_CZ CP852" echo "hr CP852" echo "hr_HR CP852" echo "hu CP852" echo "hu_HU CP852" echo "pl CP852" echo "pl_PL CP852" echo "ro CP852" echo "ro_RO CP852" echo "sk CP852" echo "sk_SK CP852" echo "sl CP852" echo "sl_SI CP852" echo "sq CP852" echo "sq_AL CP852" echo "sr CP852" # CP852 or CP866 or CP855 ?? echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? # ISO-8859-3 languages echo "mt CP850" echo "mt_MT CP850" # ISO-8859-5 languages echo "be CP866" echo "be_BE CP866" echo "bg CP866" # not CP855 ?? echo "bg_BG CP866" # not CP855 ?? echo "mk CP866" # not CP855 ?? echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" echo "uk CP1125" echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" echo "ar_DZ CP864" echo "ar_EG CP864" echo "ar_IQ CP864" echo "ar_IR CP864" echo "ar_JO CP864" echo "ar_KW CP864" echo "ar_MA CP864" echo "ar_OM CP864" echo "ar_QA CP864" echo "ar_SA CP864" echo "ar_SY CP864" # ISO-8859-7 languages echo "el CP869" echo "el_GR CP869" # ISO-8859-8 languages echo "he CP862" echo "he_IL CP862" # ISO-8859-9 languages echo "tr CP857" echo "tr_TR CP857" # Japanese echo "ja CP932" echo "ja_JP CP932" # Chinese echo "zh_CN GBK" echo "zh_TW CP950" # not CP938 ?? # Korean echo "kr CP949" # not CP934 ?? echo "kr_KR CP949" # not CP934 ?? # Thai echo "th CP874" echo "th_TH CP874" # Other echo "eo CP850" echo "eo_EO CP850" ;; esac dico-2.2/gnu/des.c000066400000000000000000000674331172612674100140270ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* des.c --- DES and Triple-DES encryption/decryption Algorithm * Copyright (C) 1998-1999, 2001-2007, 2009-2011 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 3, or (at your * option) any later version. * * This 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 file; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * */ /* Adapted for gnulib by Simon Josefsson, based on Libgcrypt. */ /* * For a description of triple encryption, see: * Bruce Schneier: Applied Cryptography. Second Edition. * John Wiley & Sons, 1996. ISBN 0-471-12845-7. Pages 358 ff. * This implementation is according to the definition of DES in FIPS * PUB 46-2 from December 1993. * * Written by Michael Roth , September 1998 */ /* * U S A G E * =========== * * For DES or Triple-DES encryption/decryption you must initialize a proper * encryption context with a key. * * A DES key is 64bit wide but only 56bits of the key are used. The remaining * bits are parity bits and they will _not_ checked in this implementation, but * simply ignored. * * For Triple-DES you could use either two 64bit keys or three 64bit keys. * The parity bits will _not_ checked, too. * * After initializing a context with a key you could use this context to * encrypt or decrypt data in 64bit blocks in Electronic Codebook Mode. * * DES Example * ----------- * unsigned char key[8]; * unsigned char plaintext[8]; * unsigned char ciphertext[8]; * unsigned char recoverd[8]; * gl_des_ctx context; * * // Fill 'key' and 'plaintext' with some data * .... * * // Set up the DES encryption context * gl_des_setkey(&context, key); * * // Encrypt the plaintext * des_ecb_encrypt(&context, plaintext, ciphertext); * * // To recover the orginal plaintext from ciphertext use: * des_ecb_decrypt(&context, ciphertext, recoverd); * * * Triple-DES Example * ------------------ * unsigned char key1[8]; * unsigned char key2[8]; * unsigned char key3[8]; * unsigned char plaintext[8]; * unsigned char ciphertext[8]; * unsigned char recoverd[8]; * gl_3des_ctx context; * * // If you would like to use two 64bit keys, fill 'key1' and'key2' * // then setup the encryption context: * gl_3des_set2keys(&context, key1, key2); * * // To use three 64bit keys with Triple-DES use: * gl_3des_set3keys(&context, key1, key2, key3); * * // Encrypting plaintext with Triple-DES * gl_3des_ecb_encrypt(&context, plaintext, ciphertext); * * // Decrypting ciphertext to recover the plaintext with Triple-DES * gl_3des_ecb_decrypt(&context, ciphertext, recoverd); */ #include #include "des.h" #include #include /* memcpy, memcmp */ /* * The s-box values are permuted according to the 'primitive function P' * and are rotated one bit to the left. */ static const uint32_t sbox1[64] = { 0x01010400, 0x00000000, 0x00010000, 0x01010404, 0x01010004, 0x00010404, 0x00000004, 0x00010000, 0x00000400, 0x01010400, 0x01010404, 0x00000400, 0x01000404, 0x01010004, 0x01000000, 0x00000004, 0x00000404, 0x01000400, 0x01000400, 0x00010400, 0x00010400, 0x01010000, 0x01010000, 0x01000404, 0x00010004, 0x01000004, 0x01000004, 0x00010004, 0x00000000, 0x00000404, 0x00010404, 0x01000000, 0x00010000, 0x01010404, 0x00000004, 0x01010000, 0x01010400, 0x01000000, 0x01000000, 0x00000400, 0x01010004, 0x00010000, 0x00010400, 0x01000004, 0x00000400, 0x00000004, 0x01000404, 0x00010404, 0x01010404, 0x00010004, 0x01010000, 0x01000404, 0x01000004, 0x00000404, 0x00010404, 0x01010400, 0x00000404, 0x01000400, 0x01000400, 0x00000000, 0x00010004, 0x00010400, 0x00000000, 0x01010004 }; static const uint32_t sbox2[64] = { 0x80108020, 0x80008000, 0x00008000, 0x00108020, 0x00100000, 0x00000020, 0x80100020, 0x80008020, 0x80000020, 0x80108020, 0x80108000, 0x80000000, 0x80008000, 0x00100000, 0x00000020, 0x80100020, 0x00108000, 0x00100020, 0x80008020, 0x00000000, 0x80000000, 0x00008000, 0x00108020, 0x80100000, 0x00100020, 0x80000020, 0x00000000, 0x00108000, 0x00008020, 0x80108000, 0x80100000, 0x00008020, 0x00000000, 0x00108020, 0x80100020, 0x00100000, 0x80008020, 0x80100000, 0x80108000, 0x00008000, 0x80100000, 0x80008000, 0x00000020, 0x80108020, 0x00108020, 0x00000020, 0x00008000, 0x80000000, 0x00008020, 0x80108000, 0x00100000, 0x80000020, 0x00100020, 0x80008020, 0x80000020, 0x00100020, 0x00108000, 0x00000000, 0x80008000, 0x00008020, 0x80000000, 0x80100020, 0x80108020, 0x00108000 }; static const uint32_t sbox3[64] = { 0x00000208, 0x08020200, 0x00000000, 0x08020008, 0x08000200, 0x00000000, 0x00020208, 0x08000200, 0x00020008, 0x08000008, 0x08000008, 0x00020000, 0x08020208, 0x00020008, 0x08020000, 0x00000208, 0x08000000, 0x00000008, 0x08020200, 0x00000200, 0x00020200, 0x08020000, 0x08020008, 0x00020208, 0x08000208, 0x00020200, 0x00020000, 0x08000208, 0x00000008, 0x08020208, 0x00000200, 0x08000000, 0x08020200, 0x08000000, 0x00020008, 0x00000208, 0x00020000, 0x08020200, 0x08000200, 0x00000000, 0x00000200, 0x00020008, 0x08020208, 0x08000200, 0x08000008, 0x00000200, 0x00000000, 0x08020008, 0x08000208, 0x00020000, 0x08000000, 0x08020208, 0x00000008, 0x00020208, 0x00020200, 0x08000008, 0x08020000, 0x08000208, 0x00000208, 0x08020000, 0x00020208, 0x00000008, 0x08020008, 0x00020200 }; static const uint32_t sbox4[64] = { 0x00802001, 0x00002081, 0x00002081, 0x00000080, 0x00802080, 0x00800081, 0x00800001, 0x00002001, 0x00000000, 0x00802000, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00800080, 0x00800001, 0x00000001, 0x00002000, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002001, 0x00002080, 0x00800081, 0x00000001, 0x00002080, 0x00800080, 0x00002000, 0x00802080, 0x00802081, 0x00000081, 0x00800080, 0x00800001, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00000000, 0x00802000, 0x00002080, 0x00800080, 0x00800081, 0x00000001, 0x00802001, 0x00002081, 0x00002081, 0x00000080, 0x00802081, 0x00000081, 0x00000001, 0x00002000, 0x00800001, 0x00002001, 0x00802080, 0x00800081, 0x00002001, 0x00002080, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002000, 0x00802080 }; static const uint32_t sbox5[64] = { 0x00000100, 0x02080100, 0x02080000, 0x42000100, 0x00080000, 0x00000100, 0x40000000, 0x02080000, 0x40080100, 0x00080000, 0x02000100, 0x40080100, 0x42000100, 0x42080000, 0x00080100, 0x40000000, 0x02000000, 0x40080000, 0x40080000, 0x00000000, 0x40000100, 0x42080100, 0x42080100, 0x02000100, 0x42080000, 0x40000100, 0x00000000, 0x42000000, 0x02080100, 0x02000000, 0x42000000, 0x00080100, 0x00080000, 0x42000100, 0x00000100, 0x02000000, 0x40000000, 0x02080000, 0x42000100, 0x40080100, 0x02000100, 0x40000000, 0x42080000, 0x02080100, 0x40080100, 0x00000100, 0x02000000, 0x42080000, 0x42080100, 0x00080100, 0x42000000, 0x42080100, 0x02080000, 0x00000000, 0x40080000, 0x42000000, 0x00080100, 0x02000100, 0x40000100, 0x00080000, 0x00000000, 0x40080000, 0x02080100, 0x40000100 }; static const uint32_t sbox6[64] = { 0x20000010, 0x20400000, 0x00004000, 0x20404010, 0x20400000, 0x00000010, 0x20404010, 0x00400000, 0x20004000, 0x00404010, 0x00400000, 0x20000010, 0x00400010, 0x20004000, 0x20000000, 0x00004010, 0x00000000, 0x00400010, 0x20004010, 0x00004000, 0x00404000, 0x20004010, 0x00000010, 0x20400010, 0x20400010, 0x00000000, 0x00404010, 0x20404000, 0x00004010, 0x00404000, 0x20404000, 0x20000000, 0x20004000, 0x00000010, 0x20400010, 0x00404000, 0x20404010, 0x00400000, 0x00004010, 0x20000010, 0x00400000, 0x20004000, 0x20000000, 0x00004010, 0x20000010, 0x20404010, 0x00404000, 0x20400000, 0x00404010, 0x20404000, 0x00000000, 0x20400010, 0x00000010, 0x00004000, 0x20400000, 0x00404010, 0x00004000, 0x00400010, 0x20004010, 0x00000000, 0x20404000, 0x20000000, 0x00400010, 0x20004010 }; static const uint32_t sbox7[64] = { 0x00200000, 0x04200002, 0x04000802, 0x00000000, 0x00000800, 0x04000802, 0x00200802, 0x04200800, 0x04200802, 0x00200000, 0x00000000, 0x04000002, 0x00000002, 0x04000000, 0x04200002, 0x00000802, 0x04000800, 0x00200802, 0x00200002, 0x04000800, 0x04000002, 0x04200000, 0x04200800, 0x00200002, 0x04200000, 0x00000800, 0x00000802, 0x04200802, 0x00200800, 0x00000002, 0x04000000, 0x00200800, 0x04000000, 0x00200800, 0x00200000, 0x04000802, 0x04000802, 0x04200002, 0x04200002, 0x00000002, 0x00200002, 0x04000000, 0x04000800, 0x00200000, 0x04200800, 0x00000802, 0x00200802, 0x04200800, 0x00000802, 0x04000002, 0x04200802, 0x04200000, 0x00200800, 0x00000000, 0x00000002, 0x04200802, 0x00000000, 0x00200802, 0x04200000, 0x00000800, 0x04000002, 0x04000800, 0x00000800, 0x00200002 }; static const uint32_t sbox8[64] = { 0x10001040, 0x00001000, 0x00040000, 0x10041040, 0x10000000, 0x10001040, 0x00000040, 0x10000000, 0x00040040, 0x10040000, 0x10041040, 0x00041000, 0x10041000, 0x00041040, 0x00001000, 0x00000040, 0x10040000, 0x10000040, 0x10001000, 0x00001040, 0x00041000, 0x00040040, 0x10040040, 0x10041000, 0x00001040, 0x00000000, 0x00000000, 0x10040040, 0x10000040, 0x10001000, 0x00041040, 0x00040000, 0x00041040, 0x00040000, 0x10041000, 0x00001000, 0x00000040, 0x10040040, 0x00001000, 0x00041040, 0x10001000, 0x00000040, 0x10000040, 0x10040000, 0x10040040, 0x10000000, 0x00040000, 0x10001040, 0x00000000, 0x10041040, 0x00040040, 0x10000040, 0x10040000, 0x10001000, 0x10001040, 0x00000000, 0x10041040, 0x00041000, 0x00041000, 0x00001040, 0x00001040, 0x00040040, 0x10000000, 0x10041000 }; /* * These two tables are part of the 'permuted choice 1' function. * In this implementation several speed improvements are done. */ static const uint32_t leftkey_swap[16] = { 0x00000000, 0x00000001, 0x00000100, 0x00000101, 0x00010000, 0x00010001, 0x00010100, 0x00010101, 0x01000000, 0x01000001, 0x01000100, 0x01000101, 0x01010000, 0x01010001, 0x01010100, 0x01010101 }; static const uint32_t rightkey_swap[16] = { 0x00000000, 0x01000000, 0x00010000, 0x01010000, 0x00000100, 0x01000100, 0x00010100, 0x01010100, 0x00000001, 0x01000001, 0x00010001, 0x01010001, 0x00000101, 0x01000101, 0x00010101, 0x01010101, }; /* * Numbers of left shifts per round for encryption subkeys. To * calculate the decryption subkeys we just reverse the ordering of * the calculated encryption subkeys, so there is no need for a * decryption rotate tab. */ static const unsigned char encrypt_rotate_tab[16] = { 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 }; /* * Table with weak DES keys sorted in ascending order. In DES there * are 64 known keys which are weak. They are weak because they * produce only one, two or four different subkeys in the subkey * scheduling process. The keys in this table have all their parity * bits cleared. */ static const unsigned char weak_keys[64][8] = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*w */ {0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e}, {0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0}, {0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe}, {0x00, 0x1e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0e}, /*sw */ {0x00, 0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e, 0x00}, {0x00, 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0, 0xfe}, {0x00, 0x1e, 0xfe, 0xe0, 0x00, 0x0e, 0xfe, 0xf0}, {0x00, 0xe0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0}, /*sw */ {0x00, 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e, 0xfe}, {0x00, 0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00}, {0x00, 0xe0, 0xfe, 0x1e, 0x00, 0xf0, 0xfe, 0x0e}, {0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe}, /*sw */ {0x00, 0xfe, 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0}, {0x00, 0xfe, 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e}, {0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00}, {0x1e, 0x00, 0x00, 0x1e, 0x0e, 0x00, 0x00, 0x0e}, {0x1e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0e, 0x00}, /*sw */ {0x1e, 0x00, 0xe0, 0xfe, 0x0e, 0x00, 0xf0, 0xfe}, {0x1e, 0x00, 0xfe, 0xe0, 0x0e, 0x00, 0xfe, 0xf0}, {0x1e, 0x1e, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00}, {0x1e, 0x1e, 0x1e, 0x1e, 0x0e, 0x0e, 0x0e, 0x0e}, /*w */ {0x1e, 0x1e, 0xe0, 0xe0, 0x0e, 0x0e, 0xf0, 0xf0}, {0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e, 0xfe, 0xfe}, {0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0, 0x00, 0xfe}, {0x1e, 0xe0, 0x1e, 0xe0, 0x0e, 0xf0, 0x0e, 0xf0}, /*sw */ {0x1e, 0xe0, 0xe0, 0x1e, 0x0e, 0xf0, 0xf0, 0x0e}, {0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0, 0xfe, 0x00}, {0x1e, 0xfe, 0x00, 0xe0, 0x0e, 0xfe, 0x00, 0xf0}, {0x1e, 0xfe, 0x1e, 0xfe, 0x0e, 0xfe, 0x0e, 0xfe}, /*sw */ {0x1e, 0xfe, 0xe0, 0x00, 0x0e, 0xfe, 0xf0, 0x00}, {0x1e, 0xfe, 0xfe, 0x1e, 0x0e, 0xfe, 0xfe, 0x0e}, {0xe0, 0x00, 0x00, 0xe0, 0xf0, 0x00, 0x00, 0xf0}, {0xe0, 0x00, 0x1e, 0xfe, 0xf0, 0x00, 0x0e, 0xfe}, {0xe0, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0, 0x00}, /*sw */ {0xe0, 0x00, 0xfe, 0x1e, 0xf0, 0x00, 0xfe, 0x0e}, {0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e, 0x00, 0xfe}, {0xe0, 0x1e, 0x1e, 0xe0, 0xf0, 0x0e, 0x0e, 0xf0}, {0xe0, 0x1e, 0xe0, 0x1e, 0xf0, 0x0e, 0xf0, 0x0e}, /*sw */ {0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e, 0xfe, 0x00}, {0xe0, 0xe0, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00}, {0xe0, 0xe0, 0x1e, 0x1e, 0xf0, 0xf0, 0x0e, 0x0e}, {0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0}, /*w */ {0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0, 0xfe, 0xfe}, {0xe0, 0xfe, 0x00, 0x1e, 0xf0, 0xfe, 0x00, 0x0e}, {0xe0, 0xfe, 0x1e, 0x00, 0xf0, 0xfe, 0x0e, 0x00}, {0xe0, 0xfe, 0xe0, 0xfe, 0xf0, 0xfe, 0xf0, 0xfe}, /*sw */ {0xe0, 0xfe, 0xfe, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0}, {0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0xfe}, {0xfe, 0x00, 0x1e, 0xe0, 0xfe, 0x00, 0x0e, 0xf0}, {0xfe, 0x00, 0xe0, 0x1e, 0xfe, 0x00, 0xf0, 0x0e}, {0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00}, /*sw */ {0xfe, 0x1e, 0x00, 0xe0, 0xfe, 0x0e, 0x00, 0xf0}, {0xfe, 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e, 0xfe}, {0xfe, 0x1e, 0xe0, 0x00, 0xfe, 0x0e, 0xf0, 0x00}, {0xfe, 0x1e, 0xfe, 0x1e, 0xfe, 0x0e, 0xfe, 0x0e}, /*sw */ {0xfe, 0xe0, 0x00, 0x1e, 0xfe, 0xf0, 0x00, 0x0e}, {0xfe, 0xe0, 0x1e, 0x00, 0xfe, 0xf0, 0x0e, 0x00}, {0xfe, 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0, 0xfe}, {0xfe, 0xe0, 0xfe, 0xe0, 0xfe, 0xf0, 0xfe, 0xf0}, /*sw */ {0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00}, {0xfe, 0xfe, 0x1e, 0x1e, 0xfe, 0xfe, 0x0e, 0x0e}, {0xfe, 0xfe, 0xe0, 0xe0, 0xfe, 0xfe, 0xf0, 0xf0}, {0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe} /*w */ }; bool gl_des_is_weak_key (const char * key) { char work[8]; int i, left, right, middle, cmp_result; /* clear parity bits */ for (i = 0; i < 8; ++i) work[i] = ((unsigned char)key[i]) & 0xfe; /* binary search in the weak key table */ left = 0; right = 63; while (left <= right) { middle = (left + right) / 2; if (!(cmp_result = memcmp (work, weak_keys[middle], 8))) return -1; if (cmp_result > 0) left = middle + 1; else right = middle - 1; } return 0; } /* * Macro to swap bits across two words. */ #define DO_PERMUTATION(a, temp, b, offset, mask) \ temp = ((a>>offset) ^ b) & mask; \ b ^= temp; \ a ^= temp<> 31); \ temp = (left ^ right) & 0xaaaaaaaa; \ right ^= temp; \ left ^= temp; \ left = (left << 1) | (left >> 31); /* * The 'inverse initial permutation'. */ #define FINAL_PERMUTATION(left, temp, right) \ left = (left << 31) | (left >> 1); \ temp = (left ^ right) & 0xaaaaaaaa; \ left ^= temp; \ right ^= temp; \ right = (right << 31) | (right >> 1); \ DO_PERMUTATION(right, temp, left, 8, 0x00ff00ff) \ DO_PERMUTATION(right, temp, left, 2, 0x33333333) \ DO_PERMUTATION(left, temp, right, 16, 0x0000ffff) \ DO_PERMUTATION(left, temp, right, 4, 0x0f0f0f0f) /* * A full DES round including 'expansion function', 'sbox substitution' * and 'primitive function P' but without swapping the left and right word. * Please note: The data in 'from' and 'to' is already rotated one bit to * the left, done in the initial permutation. */ #define DES_ROUND(from, to, work, subkey) \ work = from ^ *subkey++; \ to ^= sbox8[ work & 0x3f ]; \ to ^= sbox6[ (work>>8) & 0x3f ]; \ to ^= sbox4[ (work>>16) & 0x3f ]; \ to ^= sbox2[ (work>>24) & 0x3f ]; \ work = ((from << 28) | (from >> 4)) ^ *subkey++; \ to ^= sbox7[ work & 0x3f ]; \ to ^= sbox5[ (work>>8) & 0x3f ]; \ to ^= sbox3[ (work>>16) & 0x3f ]; \ to ^= sbox1[ (work>>24) & 0x3f ]; /* * Macros to convert 8 bytes from/to 32bit words. */ #define READ_64BIT_DATA(data, left, right) \ left = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; \ right = (data[4] << 24) | (data[5] << 16) | (data[6] << 8) | data[7]; #define WRITE_64BIT_DATA(data, left, right) \ data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \ data[2] = (left >> 8) &0xff; data[3] = left &0xff; \ data[4] = (right >> 24) &0xff; data[5] = (right >> 16) &0xff; \ data[6] = (right >> 8) &0xff; data[7] = right &0xff; /* * des_key_schedule(): Calculate 16 subkeys pairs (even/odd) for * 16 encryption rounds. * To calculate subkeys for decryption the caller * have to reorder the generated subkeys. * * rawkey: 8 Bytes of key data * subkey: Array of at least 32 uint32_ts. Will be filled * with calculated subkeys. * */ static void des_key_schedule (const char * _rawkey, uint32_t * subkey) { const unsigned char *rawkey = (const unsigned char *) _rawkey; uint32_t left, right, work; int round; READ_64BIT_DATA (rawkey, left, right) DO_PERMUTATION (right, work, left, 4, 0x0f0f0f0f) DO_PERMUTATION (right, work, left, 0, 0x10101010) left = ((leftkey_swap[(left >> 0) & 0xf] << 3) | (leftkey_swap[(left >> 8) & 0xf] << 2) | (leftkey_swap[(left >> 16) & 0xf] << 1) | (leftkey_swap[(left >> 24) & 0xf]) | (leftkey_swap[(left >> 5) & 0xf] << 7) | (leftkey_swap[(left >> 13) & 0xf] << 6) | (leftkey_swap[(left >> 21) & 0xf] << 5) | (leftkey_swap[(left >> 29) & 0xf] << 4)); left &= 0x0fffffff; right = ((rightkey_swap[(right >> 1) & 0xf] << 3) | (rightkey_swap[(right >> 9) & 0xf] << 2) | (rightkey_swap[(right >> 17) & 0xf] << 1) | (rightkey_swap[(right >> 25) & 0xf]) | (rightkey_swap[(right >> 4) & 0xf] << 7) | (rightkey_swap[(right >> 12) & 0xf] << 6) | (rightkey_swap[(right >> 20) & 0xf] << 5) | (rightkey_swap[(right >> 28) & 0xf] << 4)); right &= 0x0fffffff; for (round = 0; round < 16; ++round) { left = ((left << encrypt_rotate_tab[round]) | (left >> (28 - encrypt_rotate_tab[round]))) & 0x0fffffff; right = ((right << encrypt_rotate_tab[round]) | (right >> (28 - encrypt_rotate_tab[round]))) & 0x0fffffff; *subkey++ = (((left << 4) & 0x24000000) | ((left << 28) & 0x10000000) | ((left << 14) & 0x08000000) | ((left << 18) & 0x02080000) | ((left << 6) & 0x01000000) | ((left << 9) & 0x00200000) | ((left >> 1) & 0x00100000) | ((left << 10) & 0x00040000) | ((left << 2) & 0x00020000) | ((left >> 10) & 0x00010000) | ((right >> 13) & 0x00002000) | ((right >> 4) & 0x00001000) | ((right << 6) & 0x00000800) | ((right >> 1) & 0x00000400) | ((right >> 14) & 0x00000200) | (right & 0x00000100) | ((right >> 5) & 0x00000020) | ((right >> 10) & 0x00000010) | ((right >> 3) & 0x00000008) | ((right >> 18) & 0x00000004) | ((right >> 26) & 0x00000002) | ((right >> 24) & 0x00000001)); *subkey++ = (((left << 15) & 0x20000000) | ((left << 17) & 0x10000000) | ((left << 10) & 0x08000000) | ((left << 22) & 0x04000000) | ((left >> 2) & 0x02000000) | ((left << 1) & 0x01000000) | ((left << 16) & 0x00200000) | ((left << 11) & 0x00100000) | ((left << 3) & 0x00080000) | ((left >> 6) & 0x00040000) | ((left << 15) & 0x00020000) | ((left >> 4) & 0x00010000) | ((right >> 2) & 0x00002000) | ((right << 8) & 0x00001000) | ((right >> 14) & 0x00000808) | ((right >> 9) & 0x00000400) | ((right) & 0x00000200) | ((right << 7) & 0x00000100) | ((right >> 7) & 0x00000020) | ((right >> 3) & 0x00000011) | ((right << 2) & 0x00000004) | ((right >> 21) & 0x00000002)); } } void gl_des_setkey (gl_des_ctx *ctx, const char * key) { int i; des_key_schedule (key, ctx->encrypt_subkeys); for (i = 0; i < 32; i += 2) { ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[30 - i]; ctx->decrypt_subkeys[i + 1] = ctx->encrypt_subkeys[31 - i]; } } bool gl_des_makekey (gl_des_ctx *ctx, const char * key, size_t keylen) { if (keylen != 8) return false; gl_des_setkey (ctx, key); return !gl_des_is_weak_key (key); } void gl_des_ecb_crypt (gl_des_ctx *ctx, const char * _from, char * _to, int mode) { const unsigned char *from = (const unsigned char *) _from; unsigned char *to = (unsigned char *) _to; uint32_t left, right, work; uint32_t *keys; keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys; READ_64BIT_DATA (from, left, right) INITIAL_PERMUTATION (left, work, right) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) FINAL_PERMUTATION (right, work, left) WRITE_64BIT_DATA (to, right, left) } void gl_3des_set2keys (gl_3des_ctx *ctx, const char * key1, const char * key2) { int i; des_key_schedule (key1, ctx->encrypt_subkeys); des_key_schedule (key2, &(ctx->decrypt_subkeys[32])); for (i = 0; i < 32; i += 2) { ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[30 - i]; ctx->decrypt_subkeys[i + 1] = ctx->encrypt_subkeys[31 - i]; ctx->encrypt_subkeys[i + 32] = ctx->decrypt_subkeys[62 - i]; ctx->encrypt_subkeys[i + 33] = ctx->decrypt_subkeys[63 - i]; ctx->encrypt_subkeys[i + 64] = ctx->encrypt_subkeys[i]; ctx->encrypt_subkeys[i + 65] = ctx->encrypt_subkeys[i + 1]; ctx->decrypt_subkeys[i + 64] = ctx->decrypt_subkeys[i]; ctx->decrypt_subkeys[i + 65] = ctx->decrypt_subkeys[i + 1]; } } void gl_3des_set3keys (gl_3des_ctx *ctx, const char * key1, const char * key2, const char * key3) { int i; des_key_schedule (key1, ctx->encrypt_subkeys); des_key_schedule (key2, &(ctx->decrypt_subkeys[32])); des_key_schedule (key3, &(ctx->encrypt_subkeys[64])); for (i = 0; i < 32; i += 2) { ctx->decrypt_subkeys[i] = ctx->encrypt_subkeys[94 - i]; ctx->decrypt_subkeys[i + 1] = ctx->encrypt_subkeys[95 - i]; ctx->encrypt_subkeys[i + 32] = ctx->decrypt_subkeys[62 - i]; ctx->encrypt_subkeys[i + 33] = ctx->decrypt_subkeys[63 - i]; ctx->decrypt_subkeys[i + 64] = ctx->encrypt_subkeys[30 - i]; ctx->decrypt_subkeys[i + 65] = ctx->encrypt_subkeys[31 - i]; } } void gl_3des_ecb_crypt (gl_3des_ctx *ctx, const char * _from, char * _to, int mode) { const unsigned char *from = (const unsigned char *) _from; unsigned char *to = (unsigned char *) _to; uint32_t left, right, work; uint32_t *keys; keys = mode ? ctx->decrypt_subkeys : ctx->encrypt_subkeys; READ_64BIT_DATA (from, left, right) INITIAL_PERMUTATION (left, work, right) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) DES_ROUND (right, left, work, keys) DES_ROUND (left, right, work, keys) FINAL_PERMUTATION (right, work, left) WRITE_64BIT_DATA (to, right, left) } bool gl_3des_makekey (gl_3des_ctx *ctx, const char * key, size_t keylen) { if (keylen != 24) return false; gl_3des_set3keys (ctx, key, key + 8, key + 16); return !(gl_des_is_weak_key (key) || gl_des_is_weak_key (key + 8) || gl_des_is_weak_key (key + 16)); } dico-2.2/gnu/des.h000066400000000000000000000074641172612674100140320ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* des.h --- DES cipher implementation. * Copyright (C) 2005, 2007, 2009-2011 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 3, or (at your * option) any later version. * * This 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 file; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * */ /* Adapted for gnulib by Simon Josefsson, based on Libgcrypt. */ #ifndef DES_H # define DES_H #include #include #include /* * Encryption/Decryption context of DES */ typedef struct { uint32_t encrypt_subkeys[32]; uint32_t decrypt_subkeys[32]; } gl_des_ctx; /* * Encryption/Decryption context of Triple-DES */ typedef struct { uint32_t encrypt_subkeys[96]; uint32_t decrypt_subkeys[96]; } gl_3des_ctx; /* Check whether the 8 byte key is weak. Does not check the parity * bits of the key but simple ignore them. */ extern bool gl_des_is_weak_key (const char * key); /* * DES * --- */ /* Fill a DES context CTX with subkeys calculated from 64bit KEY. * Does not check parity bits, but simply ignore them. Does not check * for weak keys. */ extern void gl_des_setkey (gl_des_ctx *ctx, const char * key); /* Fill a DES context CTX with subkeys calculated from 64bit KEY, with * weak key checking. Does not check parity bits, but simply ignore * them. */ extern bool gl_des_makekey (gl_des_ctx *ctx, const char * key, size_t keylen); /* Electronic Codebook Mode DES encryption/decryption of data * according to 'mode'. */ extern void gl_des_ecb_crypt (gl_des_ctx *ctx, const char * from, char * to, int mode); #define gl_des_ecb_encrypt(ctx, from, to) gl_des_ecb_crypt(ctx, from, to, 0) #define gl_des_ecb_decrypt(ctx, from, to) gl_des_ecb_crypt(ctx, from, to, 1) /* Triple-DES * ---------- */ /* Fill a Triple-DES context CTX with subkeys calculated from two * 64bit keys in KEY1 and KEY2. Does not check the parity bits of the * keys, but simply ignore them. Does not check for weak keys. */ extern void gl_3des_set2keys (gl_3des_ctx *ctx, const char * key1, const char * key2); /* * Fill a Triple-DES context CTX with subkeys calculated from three * 64bit keys in KEY1, KEY2 and KEY3. Does not check the parity bits * of the keys, but simply ignore them. Does not check for weak * keys. */ extern void gl_3des_set3keys (gl_3des_ctx *ctx, const char * key1, const char * key2, const char * key3); /* Fill a Triple-DES context CTX with subkeys calculated from three * concatenated 64bit keys in KEY, with weak key checking. Does not * check the parity bits of the keys, but simply ignore them. */ extern bool gl_3des_makekey (gl_3des_ctx *ctx, const char * key, size_t keylen); /* Electronic Codebook Mode Triple-DES encryption/decryption of data * according to 'mode'. Sometimes this mode is named 'EDE' mode * (Encryption-Decryption-Encryption). */ extern void gl_3des_ecb_crypt (gl_3des_ctx *ctx, const char * from, char * to, int mode); #define gl_3des_ecb_encrypt(ctx, from, to) gl_3des_ecb_crypt(ctx,from,to,0) #define gl_3des_ecb_decrypt(ctx, from, to) gl_3des_ecb_crypt(ctx,from,to,1) #endif /* DES_H */ dico-2.2/gnu/errno.in.h000066400000000000000000000114011172612674100147730ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . Copyright (C) 2008-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ #ifndef _GL_ERRNO_H #define _GL_ERRNO_H /* On native Windows platforms, many macros are not defined. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ # define EWOULDBLOCK EAGAIN /* Values >= 100 seem safe to use. */ # define ETXTBSY 100 # define GNULIB_defined_ETXTBSY 1 /* These are intentionally the same values as the WSA* error numbers, defined in . */ # define EINPROGRESS 10036 # define EALREADY 10037 # define ENOTSOCK 10038 # define EDESTADDRREQ 10039 # define EMSGSIZE 10040 # define EPROTOTYPE 10041 # define ENOPROTOOPT 10042 # define EPROTONOSUPPORT 10043 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ # define EOPNOTSUPP 10045 # define EPFNOSUPPORT 10046 /* not required by POSIX */ # define EAFNOSUPPORT 10047 # define EADDRINUSE 10048 # define EADDRNOTAVAIL 10049 # define ENETDOWN 10050 # define ENETUNREACH 10051 # define ENETRESET 10052 # define ECONNABORTED 10053 # define ECONNRESET 10054 # define ENOBUFS 10055 # define EISCONN 10056 # define ENOTCONN 10057 # define ESHUTDOWN 10058 /* not required by POSIX */ # define ETOOMANYREFS 10059 /* not required by POSIX */ # define ETIMEDOUT 10060 # define ECONNREFUSED 10061 # define ELOOP 10062 # define EHOSTDOWN 10064 /* not required by POSIX */ # define EHOSTUNREACH 10065 # define EPROCLIM 10067 /* not required by POSIX */ # define EUSERS 10068 /* not required by POSIX */ # define EDQUOT 10069 # define ESTALE 10070 # define EREMOTE 10071 /* not required by POSIX */ # define GNULIB_defined_ESOCK 1 # endif /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ # if @EMULTIHOP_HIDDEN@ # define EMULTIHOP @EMULTIHOP_VALUE@ # define GNULIB_defined_EMULTIHOP 1 # endif # if @ENOLINK_HIDDEN@ # define ENOLINK @ENOLINK_VALUE@ # define GNULIB_defined_ENOLINK 1 # endif # if @EOVERFLOW_HIDDEN@ # define EOVERFLOW @EOVERFLOW_VALUE@ # define GNULIB_defined_EOVERFLOW 1 # endif /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. Likewise, on NonStop Kernel, EDQUOT is not defined. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG # define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM # define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK # define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO # define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP # define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG # define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW # define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP # define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 # endif # ifndef EDQUOT # define EDQUOT 2010 # define GNULIB_defined_EDQUOT 1 # endif # ifndef ECANCELED # define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif #endif /* _GL_ERRNO_H */ #endif /* _GL_ERRNO_H */ dico-2.2/gnu/exitfail.c000066400000000000000000000016651172612674100150540ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Failure exit status Copyright (C) 2002-2003, 2005-2007, 2009-2011 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 3 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, see . */ #include #include "exitfail.h" #include int volatile exit_failure = EXIT_FAILURE; dico-2.2/gnu/exitfail.h000066400000000000000000000015341172612674100150540ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Failure exit status Copyright (C) 2002, 2009-2011 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 3 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, see . */ extern int volatile exit_failure; dico-2.2/gnu/float+.h000066400000000000000000000132101172612674100144210ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Supplemental information about the floating-point formats. Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2007. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H #include #include /* Number of bits in the mantissa of a floating-point number, including the "hidden bit". */ #if FLT_RADIX == 2 # define FLT_MANT_BIT FLT_MANT_DIG # define DBL_MANT_BIT DBL_MANT_DIG # define LDBL_MANT_BIT LDBL_MANT_DIG #elif FLT_RADIX == 4 # define FLT_MANT_BIT (FLT_MANT_DIG * 2) # define DBL_MANT_BIT (DBL_MANT_DIG * 2) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) #elif FLT_RADIX == 16 # define FLT_MANT_BIT (FLT_MANT_DIG * 4) # define DBL_MANT_BIT (DBL_MANT_DIG * 4) # define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) #endif /* Bit mask that can be used to mask the exponent, as an unsigned number. */ #define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) #define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) #define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) /* Number of bits used for the exponent of a floating-point number, including the exponent's sign. */ #define FLT_EXP_BIT \ (FLT_EXP_MASK < 0x100 ? 8 : \ FLT_EXP_MASK < 0x200 ? 9 : \ FLT_EXP_MASK < 0x400 ? 10 : \ FLT_EXP_MASK < 0x800 ? 11 : \ FLT_EXP_MASK < 0x1000 ? 12 : \ FLT_EXP_MASK < 0x2000 ? 13 : \ FLT_EXP_MASK < 0x4000 ? 14 : \ FLT_EXP_MASK < 0x8000 ? 15 : \ FLT_EXP_MASK < 0x10000 ? 16 : \ FLT_EXP_MASK < 0x20000 ? 17 : \ FLT_EXP_MASK < 0x40000 ? 18 : \ FLT_EXP_MASK < 0x80000 ? 19 : \ FLT_EXP_MASK < 0x100000 ? 20 : \ FLT_EXP_MASK < 0x200000 ? 21 : \ FLT_EXP_MASK < 0x400000 ? 22 : \ FLT_EXP_MASK < 0x800000 ? 23 : \ FLT_EXP_MASK < 0x1000000 ? 24 : \ FLT_EXP_MASK < 0x2000000 ? 25 : \ FLT_EXP_MASK < 0x4000000 ? 26 : \ FLT_EXP_MASK < 0x8000000 ? 27 : \ FLT_EXP_MASK < 0x10000000 ? 28 : \ FLT_EXP_MASK < 0x20000000 ? 29 : \ FLT_EXP_MASK < 0x40000000 ? 30 : \ FLT_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define DBL_EXP_BIT \ (DBL_EXP_MASK < 0x100 ? 8 : \ DBL_EXP_MASK < 0x200 ? 9 : \ DBL_EXP_MASK < 0x400 ? 10 : \ DBL_EXP_MASK < 0x800 ? 11 : \ DBL_EXP_MASK < 0x1000 ? 12 : \ DBL_EXP_MASK < 0x2000 ? 13 : \ DBL_EXP_MASK < 0x4000 ? 14 : \ DBL_EXP_MASK < 0x8000 ? 15 : \ DBL_EXP_MASK < 0x10000 ? 16 : \ DBL_EXP_MASK < 0x20000 ? 17 : \ DBL_EXP_MASK < 0x40000 ? 18 : \ DBL_EXP_MASK < 0x80000 ? 19 : \ DBL_EXP_MASK < 0x100000 ? 20 : \ DBL_EXP_MASK < 0x200000 ? 21 : \ DBL_EXP_MASK < 0x400000 ? 22 : \ DBL_EXP_MASK < 0x800000 ? 23 : \ DBL_EXP_MASK < 0x1000000 ? 24 : \ DBL_EXP_MASK < 0x2000000 ? 25 : \ DBL_EXP_MASK < 0x4000000 ? 26 : \ DBL_EXP_MASK < 0x8000000 ? 27 : \ DBL_EXP_MASK < 0x10000000 ? 28 : \ DBL_EXP_MASK < 0x20000000 ? 29 : \ DBL_EXP_MASK < 0x40000000 ? 30 : \ DBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) #define LDBL_EXP_BIT \ (LDBL_EXP_MASK < 0x100 ? 8 : \ LDBL_EXP_MASK < 0x200 ? 9 : \ LDBL_EXP_MASK < 0x400 ? 10 : \ LDBL_EXP_MASK < 0x800 ? 11 : \ LDBL_EXP_MASK < 0x1000 ? 12 : \ LDBL_EXP_MASK < 0x2000 ? 13 : \ LDBL_EXP_MASK < 0x4000 ? 14 : \ LDBL_EXP_MASK < 0x8000 ? 15 : \ LDBL_EXP_MASK < 0x10000 ? 16 : \ LDBL_EXP_MASK < 0x20000 ? 17 : \ LDBL_EXP_MASK < 0x40000 ? 18 : \ LDBL_EXP_MASK < 0x80000 ? 19 : \ LDBL_EXP_MASK < 0x100000 ? 20 : \ LDBL_EXP_MASK < 0x200000 ? 21 : \ LDBL_EXP_MASK < 0x400000 ? 22 : \ LDBL_EXP_MASK < 0x800000 ? 23 : \ LDBL_EXP_MASK < 0x1000000 ? 24 : \ LDBL_EXP_MASK < 0x2000000 ? 25 : \ LDBL_EXP_MASK < 0x4000000 ? 26 : \ LDBL_EXP_MASK < 0x8000000 ? 27 : \ LDBL_EXP_MASK < 0x10000000 ? 28 : \ LDBL_EXP_MASK < 0x20000000 ? 29 : \ LDBL_EXP_MASK < 0x40000000 ? 30 : \ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ 32) /* Number of bits used for a floating-point number: the mantissa (not counting the "hidden bit", since it may or may not be explicit), the exponent, and the sign. */ #define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) #define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) #define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) /* Number of bytes used for a floating-point number. This can be smaller than the 'sizeof'. For example, on i386 systems, 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but sizeof (long double) = 12 or = 16. */ #define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) #define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) /* Verify that SIZEOF_FLT <= sizeof (float) etc. */ typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; #endif /* _FLOATPLUS_H */ dico-2.2/gnu/float.in.h000066400000000000000000000044011172612674100147550ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A correct . Copyright (C) 2007-2011 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 3 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, see . */ #ifndef _GL_FLOAT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ #ifndef _GL_FLOAT_H #define _GL_FLOAT_H /* 'long double' properties. */ #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 /* Number of decimal digits that is sufficient for representing a number. */ # undef LDBL_DIG # define LDBL_DIG 18 /* x-1 where x is the smallest representable number > 1. */ # undef LDBL_EPSILON # define LDBL_EPSILON 1.0842021724855044340E-19L /* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) /* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ # undef LDBL_MAX_EXP # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN # define LDBL_MIN 3.3621031431120935063E-4932L /* Maximum representable finite number. */ # undef LDBL_MAX # define LDBL_MAX 1.1897314953572317650E+4932L /* Minimum e such that 10^e is in the range of normalized numbers. */ # undef LDBL_MIN_10_EXP # define LDBL_MIN_10_EXP (-4931) /* Maximum e such that 10^e is in the range of representable finite numbers. */ # undef LDBL_MAX_10_EXP # define LDBL_MAX_10_EXP 4932 #endif #endif /* _GL_FLOAT_H */ #endif /* _GL_FLOAT_H */ dico-2.2/gnu/fprintftime.c000066400000000000000000000002061172612674100155640ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define FPRINTFTIME 1 #include "strftime.c" dico-2.2/gnu/fprintftime.h000066400000000000000000000024771172612674100156050ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Generate time strings directly to the output. */ /* Copyright (C) 2005, 2009-2011 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 3 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, see . */ #include #include /* A cross between fprintf and nstrftime, that prints directly to the output stream, without the need for the potentially large buffer that nstrftime would require. Output to stream FP the result of formatting (according to the nstrftime format string, FMT) the time data, *TM, and the UTC and NANOSECONDS values. */ size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm, int utc, int nanoseconds); dico-2.2/gnu/fseeko.c000066400000000000000000000125121172612674100145140ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* An fseeko() function that, together with fflush(), is POSIX compliant. Copyright (C) 2007-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include /* Get off_t and lseek. */ #include #include "stdio-impl.h" int fseeko (FILE *fp, off_t offset, int whence) #undef fseeko #if !HAVE_FSEEKO # undef fseek # define fseeko fseek #endif { #if LSEEK_PIPE_BROKEN /* mingw gives bogus answers rather than failure on non-seekable files. */ if (lseek (fileno (fp), 0, SEEK_CUR) == -1) return EOF; #endif /* These tests are based on fpurge.c. */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ if (fp->_IO_read_end == fp->_IO_read_ptr && fp->_IO_write_ptr == fp->_IO_write_base && fp->_IO_save_base == NULL) #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __SL64 && defined __SCLE /* Cygwin */ if ((fp->_flags & __SL64) == 0) { /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit mode; but has an fseeko that requires 64-bit mode. */ FILE *tmp = fopen ("/dev/null", "r"); if (!tmp) return -1; fp->_flags |= __SL64; fp->_seek64 = tmp->_seek64; fclose (tmp); } # endif if (fp_->_p == fp_->_bf._base && fp_->_r == 0 && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ ? fp_->_bf._size : 0) && fp_ub._base == NULL) #elif defined __EMX__ /* emx+gcc */ if (fp->_ptr == fp->_buffer && fp->_rcount == 0 && fp->_wcount == 0 && fp->_ungetc_count == 0) #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ if (fp_->_ptr == fp_->_base && (fp_->_ptr == NULL || fp_->_cnt == 0)) #elif defined __UCLIBC__ /* uClibc */ if (((fp->__modeflags & __FLAG_WRITING) == 0 || fp->__bufpos == fp->__bufstart) && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 || fp->__bufpos == fp->__bufread)) #elif defined __QNX__ /* QNX */ if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) && fp->_Rback == fp->_Back + sizeof (fp->_Back) && fp->_Rsave == NULL) #elif defined __MINT__ /* Atari FreeMiNT */ if (fp->__bufp == fp->__buffer && fp->__get_limit == fp->__bufp && fp->__put_limit == fp->__bufp && !fp->__pushed_back) #else #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." #endif { /* We get here when an fflush() call immediately preceded this one. We know there are no buffers. POSIX requires us to modify the file descriptor's position. But we cannot position beyond end of file here. */ off_t pos = lseek (fileno (fp), whence == SEEK_END && offset > 0 ? 0 : offset, whence); if (pos == -1) { #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ fp_->_flags &= ~__SOFF; #endif return -1; } #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ fp->_flags &= ~_IO_EOF_SEEN; #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __CYGWIN__ /* fp_->_offset is typed as an integer. */ fp_->_offset = pos; # else /* fp_->_offset is an fpos_t. */ { /* Use a union, since on NetBSD, the compilation flags determine whether fpos_t is typedef'd to off_t or a struct containing a single off_t member. */ union { fpos_t f; off_t o; } u; u.o = pos; fp_->_offset = u.f; } # endif fp_->_flags |= __SOFF; fp_->_flags &= ~__SEOF; #elif defined __EMX__ /* emx+gcc */ fp->_flags &= ~_IOEOF; #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ fp->_flag &= ~_IOEOF; #elif defined __MINT__ /* Atari FreeMiNT */ fp->__offset = pos; fp->__eof = 0; #endif /* If we were not requested to position beyond end of file, we're done. */ if (!(whence == SEEK_END && offset > 0)) return 0; } return fseeko (fp, offset, whence); } dico-2.2/gnu/getdelim.c000066400000000000000000000073121172612674100150340ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getdelim.c --- Implementation of replacement getdelim function. Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Ported from glibc by Simon Josefsson. */ #include /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */ #define _GL_ARG_NONNULL(params) #include #include #include #include #include #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif #if USE_UNLOCKED_IO # include "unlocked-io.h" # define getc_maybe_unlocked(fp) getc(fp) #elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED # undef flockfile # undef funlockfile # define flockfile(x) ((void) 0) # define funlockfile(x) ((void) 0) # define getc_maybe_unlocked(fp) getc(fp) #else # define getc_maybe_unlocked(fp) getc_unlocked(fp) #endif /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'ed as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) { ssize_t result; size_t cur_len = 0; if (lineptr == NULL || n == NULL || fp == NULL) { errno = EINVAL; return -1; } flockfile (fp); if (*lineptr == NULL || *n == 0) { char *new_lineptr; *n = 120; new_lineptr = (char *) realloc (*lineptr, *n); if (new_lineptr == NULL) { result = -1; goto unlock_return; } *lineptr = new_lineptr; } for (;;) { int i; i = getc_maybe_unlocked (fp); if (i == EOF) { result = -1; break; } /* Make enough space for len+1 (for final NUL) bytes. */ if (cur_len + 1 >= *n) { size_t needed_max = SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; size_t needed = 2 * *n + 1; /* Be generous. */ char *new_lineptr; if (needed_max < needed) needed = needed_max; if (cur_len + 1 >= needed) { result = -1; errno = EOVERFLOW; goto unlock_return; } new_lineptr = (char *) realloc (*lineptr, needed); if (new_lineptr == NULL) { result = -1; goto unlock_return; } *lineptr = new_lineptr; *n = needed; } (*lineptr)[cur_len] = i; cur_len++; if (i == delimiter) break; } (*lineptr)[cur_len] = '\0'; result = cur_len ? cur_len : result; unlock_return: funlockfile (fp); /* doesn't set errno */ return result; } dico-2.2/gnu/getdomainname.c000066400000000000000000000054111172612674100160500ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getdomainname emulation for systems that doesn't have it. Copyright (C) 2003, 2006, 2008, 2010-2011 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 3 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, see . */ /* Written by Simon Josefsson. */ #include /* Specification. */ #include #include #include #include #if HAVE_SYSINFO && HAVE_SYS_SYSTEMINFO_H /* IRIX, OSF/1, Solaris */ # include #endif /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ int getdomainname (char *name, size_t len) #undef getdomainname { #if HAVE_GETDOMAINNAME /* MacOS X, FreeBSD, AIX, IRIX, OSF/1 */ extern int getdomainname (char *, int); if (len > INT_MAX) len = INT_MAX; return getdomainname (name, (int) len); #elif HAVE_SYSINFO && HAVE_SYS_SYSTEMINFO_H && defined SI_SRPC_DOMAIN /* Solaris */ int ret; /* The third argument is a 'long', but the return value must fit in an 'int', therefore it's better to avoid arguments > INT_MAX. */ ret = sysinfo (SI_SRPC_DOMAIN, name, len > INT_MAX ? INT_MAX : len); if (ret < 0) /* errno is set here. */ return -1; if (ret > len) { errno = EINVAL; return -1; } return 0; #else /* HP-UX, Cygwin, mingw */ const char *result = ""; /* Hardcode your domain name if you want. */ size_t result_len = strlen (result); if (result_len > len) { errno = EINVAL; return -1; } memcpy (name, result, result_len); if (result_len < len) name[result_len] = '\0'; return 0; #endif } dico-2.2/gnu/gethostname.c000066400000000000000000000055231172612674100155620ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* gethostname emulation for SysV and POSIX.1. Copyright (C) 1992, 2003, 2006, 2008-2011 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 3 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, see . */ /* David MacKenzie Windows port by Simon Josefsson */ #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) /* Unix API. */ /* Specification. */ #include #ifdef HAVE_UNAME # include #endif #include /* Put up to LEN chars of the host name into NAME. Null terminate it if the name is shorter than LEN. Return 0 if ok, -1 if error. */ #include int gethostname (char *name, size_t len) { #ifdef HAVE_UNAME struct utsname uts; if (uname (&uts) == -1) return -1; if (len > sizeof (uts.nodename)) { /* More space than we need is available. */ name[sizeof (uts.nodename)] = '\0'; len = sizeof (uts.nodename); } strncpy (name, uts.nodename, len); #else strcpy (name, ""); /* Hardcode your system name if you want. */ #endif return 0; } #else /* Native Windows API. Which primitive to choose? - gethostname() requires linking with -lws2_32. - GetComputerName() does not return the right kind of hostname. - GetComputerNameEx(ComputerNameDnsHostname,...) returns the right hostname, but it is hard to use portably: - It requires defining _WIN32_WINNT to at least 0x0500. - With mingw, it also requires "#define GetComputerNameEx GetComputerNameExA". - With older versions of mingw, none of the declarations are present at all, not even of the enum value ComputerNameDnsHostname. So we use gethostname(). Linking with -lws2_32 is the least evil. */ #define WIN32_LEAN_AND_MEAN /* Get winsock2.h. */ #include /* Get INT_MAX. */ #include /* Get set_winsock_errno. */ #include "w32sock.h" #include "sockets.h" #undef gethostname int rpl_gethostname (char *name, size_t len) { int r; if (len > INT_MAX) len = INT_MAX; gl_sockets_startup (SOCKETS_1_1); r = gethostname (name, (int) len); if (r < 0) set_winsock_errno (); return r; } #endif dico-2.2/gnu/getline.c000066400000000000000000000021341172612674100146660ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getline.c --- Implementation of replacement getline function. Copyright (C) 2005-2007, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Simon Josefsson. */ #include #include ssize_t getline (char **lineptr, size_t *n, FILE *stream) { return getdelim (lineptr, n, '\n', stream); } dico-2.2/gnu/getopt.c000066400000000000000000001146311172612674100145470ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Getopt for GNU. NOTE: getopt is 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-1996, 1998-2004, 2006, 2008-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _LIBC # include #endif #include "getopt.h" #include #include #include #include #ifdef _LIBC # include #else # include "gettext.h" # define _(msgid) gettext (msgid) #endif #if defined _LIBC && defined USE_IN_LIBIO # include #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_long' 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. Using `getopt' or 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_int.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; /* 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; /* 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 = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif #ifdef _LIBC /* Stored original parameters. 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). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #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. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->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. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* 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 (d->__nonoption_flags_len > 0 && top >= d->__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) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__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. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc _GL_UNUSED, char **argv _GL_UNUSED, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* 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. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__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_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); d->__initialized = 1; } else if (optstring[0] == '-' || optstring[0] == '+') optstring++; if (optstring[0] == ':') print_errors = 0; /* 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. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__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 (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->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 (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->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 (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__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 (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->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[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->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 = d->__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, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__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 if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '%s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; d->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) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '--%s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '--%s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__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[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; const char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':' || c == ';') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); #endif #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->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 (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->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, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__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 if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg); #endif } d->__nextchar += strlen (d->__nextchar); d->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) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } else d->optarg = NULL; d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } d->__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 (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if _LIBC enum { POSIXLY_CORRECT = 0 }; #else enum { POSIXLY_CORRECT = 1 }; #endif int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, (char **) argv, optstring, (const struct option *) 0, (int *) 0, 0, POSIXLY_CORRECT); } #ifdef _LIBC int __posix_getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 1); } #endif #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (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 */ dico-2.2/gnu/getopt.in.h000066400000000000000000000215461172612674100151630ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _GL_GETOPT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. We must also inform the replacement unistd.h to not recursively use ; our definitions will be present soon enough. */ #if @HAVE_GETOPT_H@ # define _GL_SYSTEM_GETOPT # @INCLUDE_NEXT@ @NEXT_GETOPT_H@ # undef _GL_SYSTEM_GETOPT #endif #ifndef _GL_GETOPT_H #ifndef __need_getopt # define _GL_GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in this header. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file (if the system had , we have already included it). Then systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # if !@HAVE_GETOPT_H@ # include # include # include # endif # undef __need_getopt # undef getopt # undef getopt_long # undef getopt_long_only # undef optarg # undef opterr # undef optind # undef optopt # undef option # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # define getopt __GETOPT_ID (getopt) # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) # define option __GETOPT_ID (option) # define _getopt_internal __GETOPT_ID (getopt_internal) #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". libc uses prototypes with "char *const *argv" that are incorrect because getopt_long and getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. The only place where __getopt_argv_const is used is in definitions of getopt_long and getopt_long_only below, but these are visible only if __need_getopt is not defined, so it is quite safe to rewrite the conditional as follows: */ #if !defined __need_getopt # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ #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; #ifndef __need_getopt /* 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. */ # if !GNULIB_defined_struct_option struct option { const char *name; /* 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; }; # define GNULIB_defined_struct_option 1 # endif /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW _GL_ARG_NONNULL ((2, 3)); #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ #endif /* getopt.h */ dico-2.2/gnu/getopt1.c000066400000000000000000000107041172612674100146240ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifdef _LIBC # include #else # include # include "getopt.h" #endif #include "getopt_int.h" #include /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 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 (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #ifdef TEST #include int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static const 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 */ dico-2.2/gnu/getopt_int.h000066400000000000000000000120741172612674100154240ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Internal declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 #include extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* 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, or by calling getopt. 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. */ enum __ord { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* 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. */ char *__nextchar; /* See __ord above. */ enum __ord __ordering; /* If the POSIXLY_CORRECT environment variable is set or getopt was called. */ int __posixly_correct; /* 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. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; #endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int __posixly_correct); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ dico-2.2/gnu/getpass.c000066400000000000000000000124031172612674100147050ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 1992-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include #endif #include "getpass.h" #include #if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) # include # if HAVE_DECL___FSETLOCKING && HAVE___FSETLOCKING # if HAVE_STDIO_EXT_H # include # endif # else # define __fsetlocking(stream, type) /* empty */ # endif # if HAVE_TERMIOS_H # include # endif # if USE_UNLOCKED_IO # include "unlocked-io.h" # else # if !HAVE_DECL_FFLUSH_UNLOCKED # undef fflush_unlocked # define fflush_unlocked(x) fflush (x) # endif # if !HAVE_DECL_FLOCKFILE # undef flockfile # define flockfile(x) ((void) 0) # endif # if !HAVE_DECL_FUNLOCKFILE # undef funlockfile # define funlockfile(x) ((void) 0) # endif # if !HAVE_DECL_FPUTS_UNLOCKED # undef fputs_unlocked # define fputs_unlocked(str,stream) fputs (str, stream) # endif # if !HAVE_DECL_PUTC_UNLOCKED # undef putc_unlocked # define putc_unlocked(c,stream) putc (c, stream) # endif # endif /* It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is done in software; there is no need to change the state of the terminal hardware. */ # ifndef TCSASOFT # define TCSASOFT 0 # endif static void call_fclose (void *arg) { if (arg != NULL) fclose (arg); } char * getpass (const char *prompt) { FILE *tty; FILE *in, *out; struct termios s, t; bool tty_changed = false; static char *buf; static size_t bufsize; ssize_t nread; /* Try to write to and read from the terminal if we can. If we can't open the terminal, use stderr and stdin. */ tty = fopen ("/dev/tty", "w+"); if (tty == NULL) { in = stdin; out = stderr; } else { /* We do the locking ourselves. */ __fsetlocking (tty, FSETLOCKING_BYCALLER); out = in = tty; } flockfile (out); /* Turn echoing off if it is on now. */ # if HAVE_TCGETATTR if (tcgetattr (fileno (in), &t) == 0) { /* Save the old one. */ s = t; /* Tricky, tricky. */ t.c_lflag &= ~(ECHO | ISIG); tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0); } # endif /* Write the prompt. */ fputs_unlocked (prompt, out); fflush_unlocked (out); /* Read the password. */ nread = getline (&buf, &bufsize, in); /* According to the C standard, input may not be followed by output on the same stream without an intervening call to a file positioning function. Suppose in == out; then without this fseek call, on Solaris, HP-UX, AIX, OSF/1, the previous input gets echoed, whereas on IRIX, the following newline is not output as it should be. POSIX imposes similar restrictions if fileno (in) == fileno (out). The POSIX restrictions are tricky and change from POSIX version to POSIX version, so play it safe and invoke fseek even if in != out. */ fseeko (out, 0, SEEK_CUR); if (buf != NULL) { if (nread < 0) buf[0] = '\0'; else if (buf[nread - 1] == '\n') { /* Remove the newline. */ buf[nread - 1] = '\0'; if (tty_changed) { /* Write the newline that was not echoed. */ putc_unlocked ('\n', out); } } } /* Restore the original setting. */ # if HAVE_TCSETATTR if (tty_changed) tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s); # endif funlockfile (out); call_fclose (tty); return buf; } #else /* W32 native */ /* Windows implementation by Martin Lambers , improved by Simon Josefsson. */ /* For PASS_MAX. */ # include /* For _getch(). */ # include /* For strdup(). */ # include # ifndef PASS_MAX # define PASS_MAX 512 # endif char * getpass (const char *prompt) { char getpassbuf[PASS_MAX + 1]; size_t i = 0; int c; if (prompt) { fputs (prompt, stderr); fflush (stderr); } for (;;) { c = _getch (); if (c == '\r') { getpassbuf[i] = '\0'; break; } else if (i < PASS_MAX) { getpassbuf[i++] = c; } if (i >= PASS_MAX) { getpassbuf[i] = '\0'; break; } } if (prompt) { fputs ("\r\n", stderr); fflush (stderr); } return strdup (getpassbuf); } #endif dico-2.2/gnu/getpass.h000066400000000000000000000024111172612674100147100ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin. Copyright (C) 2004, 2009-2011 Free Software Foundation, Inc. Contributed by Simon Josefsson , 2004. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GETPASS_H # define GETPASS_H /* Get getpass declaration, if available. */ # include # if defined HAVE_DECL_GETPASS && !HAVE_DECL_GETPASS /* Read a password of arbitrary length from /dev/tty or stdin. */ char *getpass (const char *prompt); # endif #endif /* GETPASS_H */ dico-2.2/gnu/gettext.h000066400000000000000000000235461172612674100147420ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ dico-2.2/gnu/gettimeofday.c000066400000000000000000000075701172612674100157310ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide gettimeofday for systems that don't have it or for which it's broken. Copyright (C) 2001-2003, 2005-2007, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering */ #include /* Specification. */ #include #include #if HAVE_SYS_TIMEB_H # include #endif #if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME /* Work around the bug in some systems whereby gettimeofday clobbers the static buffer that localtime uses for its return value. The gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has this problem. The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and 2.6. */ static struct tm tm_zero_buffer; static struct tm *localtime_buffer_addr = &tm_zero_buffer; # undef localtime extern struct tm *localtime (time_t const *); # undef gmtime extern struct tm *gmtime (time_t const *); /* This is a wrapper for localtime. It is used only on systems for which gettimeofday clobbers the static buffer used for localtime's result. On the first call, record the address of the static buffer that localtime uses for its result. */ struct tm * rpl_localtime (time_t const *timep) { struct tm *tm = localtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } /* Same as above, since gmtime and localtime use the same buffer. */ struct tm * rpl_gmtime (time_t const *timep) { struct tm *tm = gmtime (timep); if (localtime_buffer_addr == &tm_zero_buffer) localtime_buffer_addr = tm; return tm; } #endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ #if TZSET_CLOBBERS_LOCALTIME # undef tzset extern void tzset (void); /* This is a wrapper for tzset, for systems on which tzset may clobber the static buffer used for localtime's result. */ void rpl_tzset (void) { /* Save and restore the contents of the buffer used for localtime's result around the call to tzset. */ struct tm save = *localtime_buffer_addr; tzset (); *localtime_buffer_addr = save; } #endif /* This is a wrapper for gettimeofday. It is used only on systems that lack this function, or whose implementation of this function causes problems. */ int gettimeofday (struct timeval *restrict tv, void *restrict tz) { #undef gettimeofday #if HAVE_GETTIMEOFDAY # if GETTIMEOFDAY_CLOBBERS_LOCALTIME /* Save and restore the contents of the buffer used for localtime's result around the call to gettimeofday. */ struct tm save = *localtime_buffer_addr; # endif int result = gettimeofday (tv, (struct timezone *) tz); # if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; # endif return result; #else # if HAVE__FTIME struct _timeb timebuf; _ftime (&timebuf); tv->tv_sec = timebuf.time; tv->tv_usec = timebuf.millitm * 1000; # else # if !defined OK_TO_USE_1S_CLOCK # error "Only 1-second nominal clock resolution found. Is that intended?" \ "If so, compile with the -DOK_TO_USE_1S_CLOCK option." # endif tv->tv_sec = time (NULL); tv->tv_usec = 0; # endif return 0; #endif } dico-2.2/gnu/hash.c000066400000000000000000001144621172612674100141720ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* hash - hashing table processing. Copyright (C) 1998-2004, 2006-2007, 2009-2011 Free Software Foundation, Inc. Written by Jim Meyering, 1992. 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 3 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, see . */ /* A generic hash table package. */ /* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead of malloc. If you change USE_OBSTACK, you have to recompile! */ #include #include "hash.h" #include "bitrotate.h" #include "xalloc.h" #include #include #include #if USE_OBSTACK # include "obstack.h" # ifndef obstack_chunk_alloc # define obstack_chunk_alloc malloc # endif # ifndef obstack_chunk_free # define obstack_chunk_free free # endif #endif struct hash_entry { void *data; struct hash_entry *next; }; struct hash_table { /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1, for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets are not empty, there are N_ENTRIES active entries in the table. */ struct hash_entry *bucket; struct hash_entry const *bucket_limit; size_t n_buckets; size_t n_buckets_used; size_t n_entries; /* Tuning arguments, kept in a physically separate structure. */ const Hash_tuning *tuning; /* Three functions are given to `hash_initialize', see the documentation block for this function. In a word, HASHER randomizes a user entry into a number up from 0 up to some maximum minus 1; COMPARATOR returns true if two user entries compare equally; and DATA_FREER is the cleanup function for a user entry. */ Hash_hasher hasher; Hash_comparator comparator; Hash_data_freer data_freer; /* A linked list of freed struct hash_entry structs. */ struct hash_entry *free_entry_list; #if USE_OBSTACK /* Whenever obstacks are used, it is possible to allocate all overflowed entries into a single stack, so they all can be freed in a single operation. It is not clear if the speedup is worth the trouble. */ struct obstack entry_stack; #endif }; /* A hash table contains many internal entries, each holding a pointer to some user-provided data (also called a user entry). An entry indistinctly refers to both the internal entry and its associated user entry. A user entry contents may be hashed by a randomization function (the hashing function, or just `hasher' for short) into a number (or `slot') between 0 and the current table size. At each slot position in the hash table, starts a linked chain of entries for which the user data all hash to this slot. A bucket is the collection of all entries hashing to the same slot. A good `hasher' function will distribute entries rather evenly in buckets. In the ideal case, the length of each bucket is roughly the number of entries divided by the table size. Finding the slot for a data is usually done in constant time by the `hasher', and the later finding of a precise entry is linear in time with the size of the bucket. Consequently, a larger hash table size (that is, a larger number of buckets) is prone to yielding shorter chains, *given* the `hasher' function behaves properly. Long buckets slow down the lookup algorithm. One might use big hash table sizes in hope to reduce the average length of buckets, but this might become inordinate, as unused slots in the hash table take some space. The best bet is to make sure you are using a good `hasher' function (beware that those are not that easy to write! :-), and to use a table size larger than the actual number of entries. */ /* If an insertion makes the ratio of nonempty buckets to table size larger than the growth threshold (a number between 0.0 and 1.0), then increase the table size by multiplying by the growth factor (a number greater than 1.0). The growth threshold defaults to 0.8, and the growth factor defaults to 1.414, meaning that the table will have doubled its size every second time 80% of the buckets get used. */ #define DEFAULT_GROWTH_THRESHOLD 0.8 #define DEFAULT_GROWTH_FACTOR 1.414 /* If a deletion empties a bucket and causes the ratio of used buckets to table size to become smaller than the shrink threshold (a number between 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a number greater than the shrink threshold but smaller than 1.0). The shrink threshold and factor default to 0.0 and 1.0, meaning that the table never shrinks. */ #define DEFAULT_SHRINK_THRESHOLD 0.0 #define DEFAULT_SHRINK_FACTOR 1.0 /* Use this to initialize or reset a TUNING structure to some sensible values. */ static const Hash_tuning default_tuning = { DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR, DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR, false }; /* Information and lookup. */ /* The following few functions provide information about the overall hash table organization: the number of entries, number of buckets and maximum length of buckets. */ /* Return the number of buckets in the hash table. The table size, the total number of buckets (used plus unused), or the maximum number of slots, are the same quantity. */ size_t hash_get_n_buckets (const Hash_table *table) { return table->n_buckets; } /* Return the number of slots in use (non-empty buckets). */ size_t hash_get_n_buckets_used (const Hash_table *table) { return table->n_buckets_used; } /* Return the number of active entries. */ size_t hash_get_n_entries (const Hash_table *table) { return table->n_entries; } /* Return the length of the longest chain (bucket). */ size_t hash_get_max_bucket_length (const Hash_table *table) { struct hash_entry const *bucket; size_t max_bucket_length = 0; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry const *cursor = bucket; size_t bucket_length = 1; while (cursor = cursor->next, cursor) bucket_length++; if (bucket_length > max_bucket_length) max_bucket_length = bucket_length; } } return max_bucket_length; } /* Do a mild validation of a hash table, by traversing it and checking two statistics. */ bool hash_table_ok (const Hash_table *table) { struct hash_entry const *bucket; size_t n_buckets_used = 0; size_t n_entries = 0; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry const *cursor = bucket; /* Count bucket head. */ n_buckets_used++; n_entries++; /* Count bucket overflow. */ while (cursor = cursor->next, cursor) n_entries++; } } if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries) return true; return false; } void hash_print_statistics (const Hash_table *table, FILE *stream) { size_t n_entries = hash_get_n_entries (table); size_t n_buckets = hash_get_n_buckets (table); size_t n_buckets_used = hash_get_n_buckets_used (table); size_t max_bucket_length = hash_get_max_bucket_length (table); fprintf (stream, "# entries: %lu\n", (unsigned long int) n_entries); fprintf (stream, "# buckets: %lu\n", (unsigned long int) n_buckets); fprintf (stream, "# buckets used: %lu (%.2f%%)\n", (unsigned long int) n_buckets_used, (100.0 * n_buckets_used) / n_buckets); fprintf (stream, "max bucket length: %lu\n", (unsigned long int) max_bucket_length); } /* Hash KEY and return a pointer to the selected bucket. If TABLE->hasher misbehaves, abort. */ static struct hash_entry * safe_hasher (const Hash_table *table, const void *key) { size_t n = table->hasher (key, table->n_buckets); if (! (n < table->n_buckets)) abort (); return table->bucket + n; } /* If ENTRY matches an entry already in the hash table, return the entry from the table. Otherwise, return NULL. */ void * hash_lookup (const Hash_table *table, const void *entry) { struct hash_entry const *bucket = safe_hasher (table, entry); struct hash_entry const *cursor; if (bucket->data == NULL) return NULL; for (cursor = bucket; cursor; cursor = cursor->next) if (entry == cursor->data || table->comparator (entry, cursor->data)) return cursor->data; return NULL; } /* Walking. */ /* The functions in this page traverse the hash table and process the contained entries. For the traversal to work properly, the hash table should not be resized nor modified while any particular entry is being processed. In particular, entries should not be added, and an entry may be removed only if there is no shrink threshold and the entry being removed has already been passed to hash_get_next. */ /* Return the first data in the table, or NULL if the table is empty. */ void * hash_get_first (const Hash_table *table) { struct hash_entry const *bucket; if (table->n_entries == 0) return NULL; for (bucket = table->bucket; ; bucket++) if (! (bucket < table->bucket_limit)) abort (); else if (bucket->data) return bucket->data; } /* Return the user data for the entry following ENTRY, where ENTRY has been returned by a previous call to either `hash_get_first' or `hash_get_next'. Return NULL if there are no more entries. */ void * hash_get_next (const Hash_table *table, const void *entry) { struct hash_entry const *bucket = safe_hasher (table, entry); struct hash_entry const *cursor; /* Find next entry in the same bucket. */ cursor = bucket; do { if (cursor->data == entry && cursor->next) return cursor->next->data; cursor = cursor->next; } while (cursor != NULL); /* Find first entry in any subsequent bucket. */ while (++bucket < table->bucket_limit) if (bucket->data) return bucket->data; /* None found. */ return NULL; } /* Fill BUFFER with pointers to active user entries in the hash table, then return the number of pointers copied. Do not copy more than BUFFER_SIZE pointers. */ size_t hash_get_entries (const Hash_table *table, void **buffer, size_t buffer_size) { size_t counter = 0; struct hash_entry const *bucket; struct hash_entry const *cursor; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) { if (counter >= buffer_size) return counter; buffer[counter++] = cursor->data; } } } return counter; } /* Call a PROCESSOR function for each entry of a hash table, and return the number of entries for which the processor function returned success. A pointer to some PROCESSOR_DATA which will be made available to each call to the processor function. The PROCESSOR accepts two arguments: the first is the user entry being walked into, the second is the value of PROCESSOR_DATA as received. The walking continue for as long as the PROCESSOR function returns nonzero. When it returns zero, the walking is interrupted. */ size_t hash_do_for_each (const Hash_table *table, Hash_processor processor, void *processor_data) { size_t counter = 0; struct hash_entry const *bucket; struct hash_entry const *cursor; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) { if (! processor (cursor->data, processor_data)) return counter; counter++; } } } return counter; } /* Allocation and clean-up. */ /* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1. This is a convenience routine for constructing other hashing functions. */ #if USE_DIFF_HASH /* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm, Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash algorithms tend to be domain-specific, so what's good for [diffutils'] io.c may not be good for your application." */ size_t hash_string (const char *string, size_t n_buckets) { # define HASH_ONE_CHAR(Value, Byte) \ ((Byte) + rotl_sz (Value, 7)) size_t value = 0; unsigned char ch; for (; (ch = *string); string++) value = HASH_ONE_CHAR (value, ch); return value % n_buckets; # undef HASH_ONE_CHAR } #else /* not USE_DIFF_HASH */ /* This one comes from `recode', and performs a bit better than the above as per a few experiments. It is inspired from a hashing routine found in the very old Cyber `snoop', itself written in typical Greg Mansfield style. (By the way, what happened to this excellent man? Is he still alive?) */ size_t hash_string (const char *string, size_t n_buckets) { size_t value = 0; unsigned char ch; for (; (ch = *string); string++) value = (value * 31 + ch) % n_buckets; return value; } #endif /* not USE_DIFF_HASH */ /* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd number at least equal to 11. */ static bool is_prime (size_t candidate) { size_t divisor = 3; size_t square = divisor * divisor; while (square < candidate && (candidate % divisor)) { divisor++; square += 4 * divisor; divisor++; } return (candidate % divisor ? true : false); } /* Round a given CANDIDATE number up to the nearest prime, and return that prime. Primes lower than 10 are merely skipped. */ static size_t next_prime (size_t candidate) { /* Skip small primes. */ if (candidate < 10) candidate = 10; /* Make it definitely odd. */ candidate |= 1; while (SIZE_MAX != candidate && !is_prime (candidate)) candidate += 2; return candidate; } void hash_reset_tuning (Hash_tuning *tuning) { *tuning = default_tuning; } /* If the user passes a NULL hasher, we hash the raw pointer. */ static size_t raw_hasher (const void *data, size_t n) { /* When hashing unique pointers, it is often the case that they were generated by malloc and thus have the property that the low-order bits are 0. As this tends to give poorer performance with small tables, we rotate the pointer value before performing division, in an attempt to improve hash quality. */ size_t val = rotr_sz ((size_t) data, 3); return val % n; } /* If the user passes a NULL comparator, we use pointer comparison. */ static bool raw_comparator (const void *a, const void *b) { return a == b; } /* For the given hash TABLE, check the user supplied tuning structure for reasonable values, and return true if there is no gross error with it. Otherwise, definitively reset the TUNING field to some acceptable default in the hash table (that is, the user loses the right of further modifying tuning arguments), and return false. */ static bool check_tuning (Hash_table *table) { const Hash_tuning *tuning = table->tuning; float epsilon; if (tuning == &default_tuning) return true; /* Be a bit stricter than mathematics would require, so that rounding errors in size calculations do not cause allocations to fail to grow or shrink as they should. The smallest allocation is 11 (due to next_prime's algorithm), so an epsilon of 0.1 should be good enough. */ epsilon = 0.1f; if (epsilon < tuning->growth_threshold && tuning->growth_threshold < 1 - epsilon && 1 + epsilon < tuning->growth_factor && 0 <= tuning->shrink_threshold && tuning->shrink_threshold + epsilon < tuning->shrink_factor && tuning->shrink_factor <= 1 && tuning->shrink_threshold + epsilon < tuning->growth_threshold) return true; table->tuning = &default_tuning; return false; } /* Compute the size of the bucket array for the given CANDIDATE and TUNING, or return 0 if there is no possible way to allocate that many entries. */ static size_t compute_bucket_size (size_t candidate, const Hash_tuning *tuning) { if (!tuning->is_n_buckets) { float new_candidate = candidate / tuning->growth_threshold; if (SIZE_MAX <= new_candidate) return 0; candidate = new_candidate; } candidate = next_prime (candidate); if (xalloc_oversized (candidate, sizeof (struct hash_entry *))) return 0; return candidate; } /* Allocate and return a new hash table, or NULL upon failure. The initial number of buckets is automatically selected so as to _guarantee_ that you may insert at least CANDIDATE different user entries before any growth of the hash table size occurs. So, if have a reasonably tight a-priori upper bound on the number of entries you intend to insert in the hash table, you may save some table memory and insertion time, by specifying it here. If the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE argument has its meaning changed to the wanted number of buckets. TUNING points to a structure of user-supplied values, in case some fine tuning is wanted over the default behavior of the hasher. If TUNING is NULL, the default tuning parameters are used instead. If TUNING is provided but the values requested are out of bounds or might cause rounding errors, return NULL. The user-supplied HASHER function, when not NULL, accepts two arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a slot number for that entry which should be in the range 0..TABLE_SIZE-1. This slot number is then returned. The user-supplied COMPARATOR function, when not NULL, accepts two arguments pointing to user data, it then returns true for a pair of entries that compare equal, or false otherwise. This function is internally called on entries which are already known to hash to the same bucket index, but which are distinct pointers. The user-supplied DATA_FREER function, when not NULL, may be later called with the user data as an argument, just before the entry containing the data gets freed. This happens from within `hash_free' or `hash_clear'. You should specify this function only if you want these functions to free all of your `data' data. This is typically the case when your data is simply an auxiliary struct that you have malloc'd to aggregate several values. */ Hash_table * hash_initialize (size_t candidate, const Hash_tuning *tuning, Hash_hasher hasher, Hash_comparator comparator, Hash_data_freer data_freer) { Hash_table *table; if (hasher == NULL) hasher = raw_hasher; if (comparator == NULL) comparator = raw_comparator; table = malloc (sizeof *table); if (table == NULL) return NULL; if (!tuning) tuning = &default_tuning; table->tuning = tuning; if (!check_tuning (table)) { /* Fail if the tuning options are invalid. This is the only occasion when the user gets some feedback about it. Once the table is created, if the user provides invalid tuning options, we silently revert to using the defaults, and ignore further request to change the tuning options. */ goto fail; } table->n_buckets = compute_bucket_size (candidate, tuning); if (!table->n_buckets) goto fail; table->bucket = calloc (table->n_buckets, sizeof *table->bucket); if (table->bucket == NULL) goto fail; table->bucket_limit = table->bucket + table->n_buckets; table->n_buckets_used = 0; table->n_entries = 0; table->hasher = hasher; table->comparator = comparator; table->data_freer = data_freer; table->free_entry_list = NULL; #if USE_OBSTACK obstack_init (&table->entry_stack); #endif return table; fail: free (table); return NULL; } /* Make all buckets empty, placing any chained entries on the free list. Apply the user-specified function data_freer (if any) to the datas of any affected entries. */ void hash_clear (Hash_table *table) { struct hash_entry *bucket; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry *cursor; struct hash_entry *next; /* Free the bucket overflow. */ for (cursor = bucket->next; cursor; cursor = next) { if (table->data_freer) table->data_freer (cursor->data); cursor->data = NULL; next = cursor->next; /* Relinking is done one entry at a time, as it is to be expected that overflows are either rare or short. */ cursor->next = table->free_entry_list; table->free_entry_list = cursor; } /* Free the bucket head. */ if (table->data_freer) table->data_freer (bucket->data); bucket->data = NULL; bucket->next = NULL; } } table->n_buckets_used = 0; table->n_entries = 0; } /* Reclaim all storage associated with a hash table. If a data_freer function has been supplied by the user when the hash table was created, this function applies it to the data of each entry before freeing that entry. */ void hash_free (Hash_table *table) { struct hash_entry *bucket; struct hash_entry *cursor; struct hash_entry *next; /* Call the user data_freer function. */ if (table->data_freer && table->n_entries) { for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) table->data_freer (cursor->data); } } } #if USE_OBSTACK obstack_free (&table->entry_stack, NULL); #else /* Free all bucket overflowed entries. */ for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { for (cursor = bucket->next; cursor; cursor = next) { next = cursor->next; free (cursor); } } /* Also reclaim the internal list of previously freed entries. */ for (cursor = table->free_entry_list; cursor; cursor = next) { next = cursor->next; free (cursor); } #endif /* Free the remainder of the hash table structure. */ free (table->bucket); free (table); } /* Insertion and deletion. */ /* Get a new hash entry for a bucket overflow, possibly by recycling a previously freed one. If this is not possible, allocate a new one. */ static struct hash_entry * allocate_entry (Hash_table *table) { struct hash_entry *new; if (table->free_entry_list) { new = table->free_entry_list; table->free_entry_list = new->next; } else { #if USE_OBSTACK new = obstack_alloc (&table->entry_stack, sizeof *new); #else new = malloc (sizeof *new); #endif } return new; } /* Free a hash entry which was part of some bucket overflow, saving it for later recycling. */ static void free_entry (Hash_table *table, struct hash_entry *entry) { entry->data = NULL; entry->next = table->free_entry_list; table->free_entry_list = entry; } /* This private function is used to help with insertion and deletion. When ENTRY matches an entry in the table, return a pointer to the corresponding user data and set *BUCKET_HEAD to the head of the selected bucket. Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in the table, unlink the matching entry. */ static void * hash_find_entry (Hash_table *table, const void *entry, struct hash_entry **bucket_head, bool delete) { struct hash_entry *bucket = safe_hasher (table, entry); struct hash_entry *cursor; *bucket_head = bucket; /* Test for empty bucket. */ if (bucket->data == NULL) return NULL; /* See if the entry is the first in the bucket. */ if (entry == bucket->data || table->comparator (entry, bucket->data)) { void *data = bucket->data; if (delete) { if (bucket->next) { struct hash_entry *next = bucket->next; /* Bump the first overflow entry into the bucket head, then save the previous first overflow entry for later recycling. */ *bucket = *next; free_entry (table, next); } else { bucket->data = NULL; } } return data; } /* Scan the bucket overflow. */ for (cursor = bucket; cursor->next; cursor = cursor->next) { if (entry == cursor->next->data || table->comparator (entry, cursor->next->data)) { void *data = cursor->next->data; if (delete) { struct hash_entry *next = cursor->next; /* Unlink the entry to delete, then save the freed entry for later recycling. */ cursor->next = next->next; free_entry (table, next); } return data; } } /* No entry found. */ return NULL; } /* Internal helper, to move entries from SRC to DST. Both tables must share the same free entry list. If SAFE, only move overflow entries, saving bucket heads for later, so that no allocations will occur. Return false if the free entry list is exhausted and an allocation fails. */ static bool transfer_entries (Hash_table *dst, Hash_table *src, bool safe) { struct hash_entry *bucket; struct hash_entry *cursor; struct hash_entry *next; for (bucket = src->bucket; bucket < src->bucket_limit; bucket++) if (bucket->data) { void *data; struct hash_entry *new_bucket; /* Within each bucket, transfer overflow entries first and then the bucket head, to minimize memory pressure. After all, the only time we might allocate is when moving the bucket head, but moving overflow entries first may create free entries that can be recycled by the time we finally get to the bucket head. */ for (cursor = bucket->next; cursor; cursor = next) { data = cursor->data; new_bucket = safe_hasher (dst, data); next = cursor->next; if (new_bucket->data) { /* Merely relink an existing entry, when moving from a bucket overflow into a bucket overflow. */ cursor->next = new_bucket->next; new_bucket->next = cursor; } else { /* Free an existing entry, when moving from a bucket overflow into a bucket header. */ new_bucket->data = data; dst->n_buckets_used++; free_entry (dst, cursor); } } /* Now move the bucket head. Be sure that if we fail due to allocation failure that the src table is in a consistent state. */ data = bucket->data; bucket->next = NULL; if (safe) continue; new_bucket = safe_hasher (dst, data); if (new_bucket->data) { /* Allocate or recycle an entry, when moving from a bucket header into a bucket overflow. */ struct hash_entry *new_entry = allocate_entry (dst); if (new_entry == NULL) return false; new_entry->data = data; new_entry->next = new_bucket->next; new_bucket->next = new_entry; } else { /* Move from one bucket header to another. */ new_bucket->data = data; dst->n_buckets_used++; } bucket->data = NULL; src->n_buckets_used--; } return true; } /* For an already existing hash table, change the number of buckets through specifying CANDIDATE. The contents of the hash table are preserved. The new number of buckets is automatically selected so as to _guarantee_ that the table may receive at least CANDIDATE different user entries, including those already in the table, before any other growth of the hash table size occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the exact number of buckets desired. Return true iff the rehash succeeded. */ bool hash_rehash (Hash_table *table, size_t candidate) { Hash_table storage; Hash_table *new_table; size_t new_size = compute_bucket_size (candidate, table->tuning); if (!new_size) return false; if (new_size == table->n_buckets) return true; new_table = &storage; new_table->bucket = calloc (new_size, sizeof *new_table->bucket); if (new_table->bucket == NULL) return false; new_table->n_buckets = new_size; new_table->bucket_limit = new_table->bucket + new_size; new_table->n_buckets_used = 0; new_table->n_entries = 0; new_table->tuning = table->tuning; new_table->hasher = table->hasher; new_table->comparator = table->comparator; new_table->data_freer = table->data_freer; /* In order for the transfer to successfully complete, we need additional overflow entries when distinct buckets in the old table collide into a common bucket in the new table. The worst case possible is a hasher that gives a good spread with the old size, but returns a constant with the new size; if we were to guarantee table->n_buckets_used-1 free entries in advance, then the transfer would be guaranteed to not allocate memory. However, for large tables, a guarantee of no further allocation introduces a lot of extra memory pressure, all for an unlikely corner case (most rehashes reduce, rather than increase, the number of overflow entries needed). So, we instead ensure that the transfer process can be reversed if we hit a memory allocation failure mid-transfer. */ /* Merely reuse the extra old space into the new table. */ #if USE_OBSTACK new_table->entry_stack = table->entry_stack; #endif new_table->free_entry_list = table->free_entry_list; if (transfer_entries (new_table, table, false)) { /* Entries transferred successfully; tie up the loose ends. */ free (table->bucket); table->bucket = new_table->bucket; table->bucket_limit = new_table->bucket_limit; table->n_buckets = new_table->n_buckets; table->n_buckets_used = new_table->n_buckets_used; table->free_entry_list = new_table->free_entry_list; /* table->n_entries and table->entry_stack already hold their value. */ return true; } /* We've allocated new_table->bucket (and possibly some entries), exhausted the free list, and moved some but not all entries into new_table. We must undo the partial move before returning failure. The only way to get into this situation is if new_table uses fewer buckets than the old table, so we will reclaim some free entries as overflows in the new table are put back into distinct buckets in the old table. There are some pathological cases where a single pass through the table requires more intermediate overflow entries than using two passes. Two passes give worse cache performance and takes longer, but at this point, we're already out of memory, so slow and safe is better than failure. */ table->free_entry_list = new_table->free_entry_list; if (! (transfer_entries (table, new_table, true) && transfer_entries (table, new_table, false))) abort (); /* table->n_entries already holds its value. */ free (new_table->bucket); return false; } /* Return -1 upon memory allocation failure. Return 1 if insertion succeeded. Return 0 if there is already a matching entry in the table, and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT to that entry. This interface is easier to use than hash_insert when you must distinguish between the latter two cases. More importantly, hash_insert is unusable for some types of ENTRY values. When using hash_insert, the only way to distinguish those cases is to compare the return value and ENTRY. That works only when you can have two different ENTRY values that point to data that compares "equal". Thus, when the ENTRY value is a simple scalar, you must use hash_insert0. ENTRY must not be NULL. */ int hash_insert0 (Hash_table *table, void const *entry, void const **matched_ent) { void *data; struct hash_entry *bucket; /* The caller cannot insert a NULL entry, since hash_lookup returns NULL to indicate "not found", and hash_find_entry uses "bucket->data == NULL" to indicate an empty bucket. */ if (! entry) abort (); /* If there's a matching entry already in the table, return that. */ if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL) { if (matched_ent) *matched_ent = data; return 0; } /* If the growth threshold of the buckets in use has been reached, increase the table size and rehash. There's no point in checking the number of entries: if the hashing function is ill-conditioned, rehashing is not likely to improve it. */ if (table->n_buckets_used > table->tuning->growth_threshold * table->n_buckets) { /* Check more fully, before starting real work. If tuning arguments became invalid, the second check will rely on proper defaults. */ check_tuning (table); if (table->n_buckets_used > table->tuning->growth_threshold * table->n_buckets) { const Hash_tuning *tuning = table->tuning; float candidate = (tuning->is_n_buckets ? (table->n_buckets * tuning->growth_factor) : (table->n_buckets * tuning->growth_factor * tuning->growth_threshold)); if (SIZE_MAX <= candidate) return -1; /* If the rehash fails, arrange to return NULL. */ if (!hash_rehash (table, candidate)) return -1; /* Update the bucket we are interested in. */ if (hash_find_entry (table, entry, &bucket, false) != NULL) abort (); } } /* ENTRY is not matched, it should be inserted. */ if (bucket->data) { struct hash_entry *new_entry = allocate_entry (table); if (new_entry == NULL) return -1; /* Add ENTRY in the overflow of the bucket. */ new_entry->data = (void *) entry; new_entry->next = bucket->next; bucket->next = new_entry; table->n_entries++; return 1; } /* Add ENTRY right in the bucket head. */ bucket->data = (void *) entry; table->n_entries++; table->n_buckets_used++; return 1; } /* If ENTRY matches an entry already in the hash table, return the pointer to the entry from the table. Otherwise, insert ENTRY and return ENTRY. Return NULL if the storage required for insertion cannot be allocated. This implementation does not support duplicate entries or insertion of NULL. */ void * hash_insert (Hash_table *table, void const *entry) { void const *matched_ent; int err = hash_insert0 (table, entry, &matched_ent); return (err == -1 ? NULL : (void *) (err == 0 ? matched_ent : entry)); } /* If ENTRY is already in the table, remove it and return the just-deleted data (the user may want to deallocate its storage). If ENTRY is not in the table, don't modify the table and return NULL. */ void * hash_delete (Hash_table *table, const void *entry) { void *data; struct hash_entry *bucket; data = hash_find_entry (table, entry, &bucket, true); if (!data) return NULL; table->n_entries--; if (!bucket->data) { table->n_buckets_used--; /* If the shrink threshold of the buckets in use has been reached, rehash into a smaller table. */ if (table->n_buckets_used < table->tuning->shrink_threshold * table->n_buckets) { /* Check more fully, before starting real work. If tuning arguments became invalid, the second check will rely on proper defaults. */ check_tuning (table); if (table->n_buckets_used < table->tuning->shrink_threshold * table->n_buckets) { const Hash_tuning *tuning = table->tuning; size_t candidate = (tuning->is_n_buckets ? table->n_buckets * tuning->shrink_factor : (table->n_buckets * tuning->shrink_factor * tuning->growth_threshold)); if (!hash_rehash (table, candidate)) { /* Failure to allocate memory in an attempt to shrink the table is not fatal. But since memory is low, we can at least be kind and free any spare entries, rather than keeping them tied up in the free entry list. */ #if ! USE_OBSTACK struct hash_entry *cursor = table->free_entry_list; struct hash_entry *next; while (cursor) { next = cursor->next; free (cursor); cursor = next; } table->free_entry_list = NULL; #endif } } } } return data; } /* Testing. */ #if TESTING void hash_print (const Hash_table *table) { struct hash_entry *bucket = (struct hash_entry *) table->bucket; for ( ; bucket < table->bucket_limit; bucket++) { struct hash_entry *cursor; if (bucket) printf ("%lu:\n", (unsigned long int) (bucket - table->bucket)); for (cursor = bucket; cursor; cursor = cursor->next) { char const *s = cursor->data; /* FIXME */ if (s) printf (" %s\n", s); } } } #endif /* TESTING */ dico-2.2/gnu/hash.h000066400000000000000000000071701172612674100141740ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* hash - hashing table processing. Copyright (C) 1998-1999, 2001, 2003, 2009-2011 Free Software Foundation, Inc. Written by Jim Meyering , 1998. 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 3 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, see . */ /* A generic hash table package. */ /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use obstacks instead of malloc, and recompile `hash.c' with same setting. */ #ifndef HASH_H_ # define HASH_H_ # include # include /* The __attribute__ feature is available in gcc versions 2.5 and later. The warn_unused_result attribute appeared first in gcc-3.4.0. */ # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) # else # define _GL_ATTRIBUTE_WUR /* empty */ # endif typedef size_t (*Hash_hasher) (const void *, size_t); typedef bool (*Hash_comparator) (const void *, const void *); typedef void (*Hash_data_freer) (void *); typedef bool (*Hash_processor) (void *, void *); struct hash_tuning { /* This structure is mainly used for `hash_initialize', see the block documentation of `hash_reset_tuning' for more complete comments. */ float shrink_threshold; /* ratio of used buckets to trigger a shrink */ float shrink_factor; /* ratio of new smaller size to original size */ float growth_threshold; /* ratio of used buckets to trigger a growth */ float growth_factor; /* ratio of new bigger size to original size */ bool is_n_buckets; /* if CANDIDATE really means table size */ }; typedef struct hash_tuning Hash_tuning; struct hash_table; typedef struct hash_table Hash_table; /* Information and lookup. */ size_t hash_get_n_buckets (const Hash_table *); size_t hash_get_n_buckets_used (const Hash_table *); size_t hash_get_n_entries (const Hash_table *); size_t hash_get_max_bucket_length (const Hash_table *); bool hash_table_ok (const Hash_table *); void hash_print_statistics (const Hash_table *, FILE *); void *hash_lookup (const Hash_table *, const void *); /* Walking. */ void *hash_get_first (const Hash_table *); void *hash_get_next (const Hash_table *, const void *); size_t hash_get_entries (const Hash_table *, void **, size_t); size_t hash_do_for_each (const Hash_table *, Hash_processor, void *); /* Allocation and clean-up. */ size_t hash_string (const char *, size_t); void hash_reset_tuning (Hash_tuning *); Hash_table *hash_initialize (size_t, const Hash_tuning *, Hash_hasher, Hash_comparator, Hash_data_freer) _GL_ATTRIBUTE_WUR; void hash_clear (Hash_table *); void hash_free (Hash_table *); /* Insertion and deletion. */ bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR; void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR; int hash_insert0 (Hash_table *table, const void *entry, const void **matched_ent); void *hash_delete (Hash_table *, const void *); #endif dico-2.2/gnu/ignore-value.h000066400000000000000000000051641172612674100156470ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* ignore a function return without a compiler warning Copyright (C) 2008-2011 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 3 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, see . */ /* Written by Jim Meyering, Eric Blake and Pádraig Brady. */ /* Use "ignore_value" to avoid a warning when using a function declared with gcc's warn_unused_result attribute, but for which you really do want to ignore the result. Traditionally, people have used a "(void)" cast to indicate that a function's return value is deliberately unused. However, if the function is declared with __attribute__((warn_unused_result)), gcc issues a warning even with the cast. Caution: most of the time, you really should heed gcc's warning, and check the return value. However, in those exceptional cases in which you're sure you know what you're doing, use this function. For the record, here's one of the ignorable warnings: "copy.c:233: warning: ignoring return value of 'fchown', declared with attribute warn_unused_result". */ #ifndef _GL_IGNORE_VALUE_H # define _GL_IGNORE_VALUE_H # ifndef _GL_ATTRIBUTE_DEPRECATED /* The __attribute__((__deprecated__)) feature is available in gcc versions 3.1 and newer. */ # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) # define _GL_ATTRIBUTE_DEPRECATED /* empty */ # else # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) # endif # endif /* The __attribute__((__warn_unused_result__)) feature is available in gcc versions 3.4 and newer, while the typeof feature has been available since 2.7 at least. */ # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) # define ignore_value(x) ((void) (x)) # else # define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) # endif /* ignore_value works for scalars, pointers and aggregates; deprecate ignore_ptr. */ static inline void _GL_ATTRIBUTE_DEPRECATED ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */ #endif dico-2.2/gnu/imaxtostr.c000066400000000000000000000002441172612674100152710ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define anytostr imaxtostr #define inttype intmax_t #include "anytostr.c" dico-2.2/gnu/intprops.h000066400000000000000000000067031172612674100151300ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* intprops.h -- properties of integer types Copyright (C) 2001-2005, 2009-2011 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 3 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, see . */ /* Written by Paul Eggert. */ #ifndef GL_INTPROPS_H # define GL_INTPROPS_H # include /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if the arithmetic type T is an integer type. bool counts as an integer. */ # define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ # define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) # define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ # define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ TYPE_MAXIMUM (t))) # define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) /* Return zero if T can be determined to be an unsigned type. Otherwise, return 1. When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a tighter bound. Otherwise, it overestimates the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. The symbol signed_type_or_expr__ is private to this header file. */ # if __GNUC__ >= 2 # define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) # else # define signed_type_or_expr__(t) 1 # endif /* Bound on length of the string representing an unsigned integer value representable in B bits. log10 (2.0) < 146/485. The smallest value of B where this bound is not tight is 2621. */ # define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if T is signed, and then add 1 more for a minus sign if needed. */ # define INT_STRLEN_BOUND(t) \ (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \ + signed_type_or_expr__ (t)) /* Bound on buffer size needed to represent an integer type or expression T, including the terminating null. */ # define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) #endif /* GL_INTPROPS_H */ dico-2.2/gnu/inttostr.c000066400000000000000000000002361172612674100151260ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define anytostr inttostr #define inttype int #include "anytostr.c" dico-2.2/gnu/inttostr.h000066400000000000000000000033341172612674100151350ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* inttostr.h -- convert integers to printable strings Copyright (C) 2001-2006, 2009-2011 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 3 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, see . */ /* Written by Paul Eggert */ #include #include #include "intprops.h" #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif char *imaxtostr (intmax_t, char *) __attribute_warn_unused_result__; char *inttostr (int, char *) __attribute_warn_unused_result__; char *offtostr (off_t, char *) __attribute_warn_unused_result__; char *uinttostr (unsigned int, char *) __attribute_warn_unused_result__; char *umaxtostr (uintmax_t, char *) __attribute_warn_unused_result__; dico-2.2/gnu/inttypes.in.h000066400000000000000000000643351172612674100155430ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 2006-2011 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. 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 3 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, see . */ /* * ISO C 99 for platforms that lack it. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Include the original if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h which in turn includes this file. The include_next requires a split double-inclusion guard. */ #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H # if @HAVE_INTTYPES_H@ # @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ # endif #endif #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H /* Include or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif /* Get CHAR_BIT. */ #include #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." #endif /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* 7.8.1 Macros for format specifiers */ #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS # if defined _TNS_R_TARGET /* Tandem NonStop R series and compatible platforms released before July 2005 support %Ld but not %lld. */ # define _LONG_LONG_FORMAT_PREFIX "L" # else # define _LONG_LONG_FORMAT_PREFIX "ll" # endif # if !defined PRId8 || @PRI_MACROS_BROKEN@ # undef PRId8 # ifdef INT8_MAX # define PRId8 "d" # endif # endif # if !defined PRIi8 || @PRI_MACROS_BROKEN@ # undef PRIi8 # ifdef INT8_MAX # define PRIi8 "i" # endif # endif # if !defined PRIo8 || @PRI_MACROS_BROKEN@ # undef PRIo8 # ifdef UINT8_MAX # define PRIo8 "o" # endif # endif # if !defined PRIu8 || @PRI_MACROS_BROKEN@ # undef PRIu8 # ifdef UINT8_MAX # define PRIu8 "u" # endif # endif # if !defined PRIx8 || @PRI_MACROS_BROKEN@ # undef PRIx8 # ifdef UINT8_MAX # define PRIx8 "x" # endif # endif # if !defined PRIX8 || @PRI_MACROS_BROKEN@ # undef PRIX8 # ifdef UINT8_MAX # define PRIX8 "X" # endif # endif # if !defined PRId16 || @PRI_MACROS_BROKEN@ # undef PRId16 # ifdef INT16_MAX # define PRId16 "d" # endif # endif # if !defined PRIi16 || @PRI_MACROS_BROKEN@ # undef PRIi16 # ifdef INT16_MAX # define PRIi16 "i" # endif # endif # if !defined PRIo16 || @PRI_MACROS_BROKEN@ # undef PRIo16 # ifdef UINT16_MAX # define PRIo16 "o" # endif # endif # if !defined PRIu16 || @PRI_MACROS_BROKEN@ # undef PRIu16 # ifdef UINT16_MAX # define PRIu16 "u" # endif # endif # if !defined PRIx16 || @PRI_MACROS_BROKEN@ # undef PRIx16 # ifdef UINT16_MAX # define PRIx16 "x" # endif # endif # if !defined PRIX16 || @PRI_MACROS_BROKEN@ # undef PRIX16 # ifdef UINT16_MAX # define PRIX16 "X" # endif # endif # if !defined PRId32 || @PRI_MACROS_BROKEN@ # undef PRId32 # ifdef INT32_MAX # define PRId32 "d" # endif # endif # if !defined PRIi32 || @PRI_MACROS_BROKEN@ # undef PRIi32 # ifdef INT32_MAX # define PRIi32 "i" # endif # endif # if !defined PRIo32 || @PRI_MACROS_BROKEN@ # undef PRIo32 # ifdef UINT32_MAX # define PRIo32 "o" # endif # endif # if !defined PRIu32 || @PRI_MACROS_BROKEN@ # undef PRIu32 # ifdef UINT32_MAX # define PRIu32 "u" # endif # endif # if !defined PRIx32 || @PRI_MACROS_BROKEN@ # undef PRIx32 # ifdef UINT32_MAX # define PRIx32 "x" # endif # endif # if !defined PRIX32 || @PRI_MACROS_BROKEN@ # undef PRIX32 # ifdef UINT32_MAX # define PRIX32 "X" # endif # endif # ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _PRI64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRI64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRId64 || @PRI_MACROS_BROKEN@ # undef PRId64 # define PRId64 _PRI64_PREFIX "d" # endif # if !defined PRIi64 || @PRI_MACROS_BROKEN@ # undef PRIi64 # define PRIi64 _PRI64_PREFIX "i" # endif # endif # ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _PRIu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRIu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRIo64 || @PRI_MACROS_BROKEN@ # undef PRIo64 # define PRIo64 _PRIu64_PREFIX "o" # endif # if !defined PRIu64 || @PRI_MACROS_BROKEN@ # undef PRIu64 # define PRIu64 _PRIu64_PREFIX "u" # endif # if !defined PRIx64 || @PRI_MACROS_BROKEN@ # undef PRIx64 # define PRIx64 _PRIu64_PREFIX "x" # endif # if !defined PRIX64 || @PRI_MACROS_BROKEN@ # undef PRIX64 # define PRIX64 _PRIu64_PREFIX "X" # endif # endif # if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST8 # define PRIdLEAST8 "d" # endif # if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST8 # define PRIiLEAST8 "i" # endif # if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST8 # define PRIoLEAST8 "o" # endif # if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST8 # define PRIuLEAST8 "u" # endif # if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST8 # define PRIxLEAST8 "x" # endif # if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST8 # define PRIXLEAST8 "X" # endif # if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST16 # define PRIdLEAST16 "d" # endif # if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST16 # define PRIiLEAST16 "i" # endif # if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST16 # define PRIoLEAST16 "o" # endif # if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST16 # define PRIuLEAST16 "u" # endif # if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST16 # define PRIxLEAST16 "x" # endif # if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST16 # define PRIXLEAST16 "X" # endif # if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST32 # define PRIdLEAST32 "d" # endif # if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST32 # define PRIiLEAST32 "i" # endif # if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST32 # define PRIoLEAST32 "o" # endif # if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST32 # define PRIuLEAST32 "u" # endif # if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST32 # define PRIxLEAST32 "x" # endif # if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST32 # define PRIXLEAST32 "X" # endif # ifdef INT64_MAX # if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIdLEAST64 # define PRIdLEAST64 PRId64 # endif # if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIiLEAST64 # define PRIiLEAST64 PRIi64 # endif # endif # ifdef UINT64_MAX # if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIoLEAST64 # define PRIoLEAST64 PRIo64 # endif # if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIuLEAST64 # define PRIuLEAST64 PRIu64 # endif # if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIxLEAST64 # define PRIxLEAST64 PRIx64 # endif # if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ # undef PRIXLEAST64 # define PRIXLEAST64 PRIX64 # endif # endif # if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ # undef PRIdFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIdFAST8 PRId64 # else # define PRIdFAST8 "d" # endif # endif # if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ # undef PRIiFAST8 # if INT_FAST8_MAX > INT32_MAX # define PRIiFAST8 PRIi64 # else # define PRIiFAST8 "i" # endif # endif # if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ # undef PRIoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIoFAST8 PRIo64 # else # define PRIoFAST8 "o" # endif # endif # if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ # undef PRIuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIuFAST8 PRIu64 # else # define PRIuFAST8 "u" # endif # endif # if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ # undef PRIxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIxFAST8 PRIx64 # else # define PRIxFAST8 "x" # endif # endif # if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ # undef PRIXFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define PRIXFAST8 PRIX64 # else # define PRIXFAST8 "X" # endif # endif # if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ # undef PRIdFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIdFAST16 PRId64 # else # define PRIdFAST16 "d" # endif # endif # if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ # undef PRIiFAST16 # if INT_FAST16_MAX > INT32_MAX # define PRIiFAST16 PRIi64 # else # define PRIiFAST16 "i" # endif # endif # if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ # undef PRIoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIoFAST16 PRIo64 # else # define PRIoFAST16 "o" # endif # endif # if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ # undef PRIuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIuFAST16 PRIu64 # else # define PRIuFAST16 "u" # endif # endif # if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ # undef PRIxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIxFAST16 PRIx64 # else # define PRIxFAST16 "x" # endif # endif # if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ # undef PRIXFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define PRIXFAST16 PRIX64 # else # define PRIXFAST16 "X" # endif # endif # if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ # undef PRIdFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIdFAST32 PRId64 # else # define PRIdFAST32 "d" # endif # endif # if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ # undef PRIiFAST32 # if INT_FAST32_MAX > INT32_MAX # define PRIiFAST32 PRIi64 # else # define PRIiFAST32 "i" # endif # endif # if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ # undef PRIoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIoFAST32 PRIo64 # else # define PRIoFAST32 "o" # endif # endif # if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ # undef PRIuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIuFAST32 PRIu64 # else # define PRIuFAST32 "u" # endif # endif # if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ # undef PRIxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIxFAST32 PRIx64 # else # define PRIxFAST32 "x" # endif # endif # if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ # undef PRIXFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define PRIXFAST32 PRIX64 # else # define PRIXFAST32 "X" # endif # endif # ifdef INT64_MAX # if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ # undef PRIdFAST64 # define PRIdFAST64 PRId64 # endif # if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ # undef PRIiFAST64 # define PRIiFAST64 PRIi64 # endif # endif # ifdef UINT64_MAX # if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ # undef PRIoFAST64 # define PRIoFAST64 PRIo64 # endif # if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ # undef PRIuFAST64 # define PRIuFAST64 PRIu64 # endif # if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ # undef PRIxFAST64 # define PRIxFAST64 PRIx64 # endif # if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ # undef PRIXFAST64 # define PRIXFAST64 PRIX64 # endif # endif # if !defined PRIdMAX || @PRI_MACROS_BROKEN@ # undef PRIdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIdMAX PRId64 # else # define PRIdMAX "ld" # endif # endif # if !defined PRIiMAX || @PRI_MACROS_BROKEN@ # undef PRIiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define PRIiMAX PRIi64 # else # define PRIiMAX "li" # endif # endif # if !defined PRIoMAX || @PRI_MACROS_BROKEN@ # undef PRIoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIoMAX PRIo64 # else # define PRIoMAX "lo" # endif # endif # if !defined PRIuMAX || @PRI_MACROS_BROKEN@ # undef PRIuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIuMAX PRIu64 # else # define PRIuMAX "lu" # endif # endif # if !defined PRIxMAX || @PRI_MACROS_BROKEN@ # undef PRIxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIxMAX PRIx64 # else # define PRIxMAX "lx" # endif # endif # if !defined PRIXMAX || @PRI_MACROS_BROKEN@ # undef PRIXMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define PRIXMAX PRIX64 # else # define PRIXMAX "lX" # endif # endif # if !defined PRIdPTR || @PRI_MACROS_BROKEN@ # undef PRIdPTR # ifdef INTPTR_MAX # define PRIdPTR @PRIPTR_PREFIX@ "d" # endif # endif # if !defined PRIiPTR || @PRI_MACROS_BROKEN@ # undef PRIiPTR # ifdef INTPTR_MAX # define PRIiPTR @PRIPTR_PREFIX@ "i" # endif # endif # if !defined PRIoPTR || @PRI_MACROS_BROKEN@ # undef PRIoPTR # ifdef UINTPTR_MAX # define PRIoPTR @PRIPTR_PREFIX@ "o" # endif # endif # if !defined PRIuPTR || @PRI_MACROS_BROKEN@ # undef PRIuPTR # ifdef UINTPTR_MAX # define PRIuPTR @PRIPTR_PREFIX@ "u" # endif # endif # if !defined PRIxPTR || @PRI_MACROS_BROKEN@ # undef PRIxPTR # ifdef UINTPTR_MAX # define PRIxPTR @PRIPTR_PREFIX@ "x" # endif # endif # if !defined PRIXPTR || @PRI_MACROS_BROKEN@ # undef PRIXPTR # ifdef UINTPTR_MAX # define PRIXPTR @PRIPTR_PREFIX@ "X" # endif # endif # if !defined SCNd8 || @PRI_MACROS_BROKEN@ # undef SCNd8 # ifdef INT8_MAX # define SCNd8 "hhd" # endif # endif # if !defined SCNi8 || @PRI_MACROS_BROKEN@ # undef SCNi8 # ifdef INT8_MAX # define SCNi8 "hhi" # endif # endif # if !defined SCNo8 || @PRI_MACROS_BROKEN@ # undef SCNo8 # ifdef UINT8_MAX # define SCNo8 "hho" # endif # endif # if !defined SCNu8 || @PRI_MACROS_BROKEN@ # undef SCNu8 # ifdef UINT8_MAX # define SCNu8 "hhu" # endif # endif # if !defined SCNx8 || @PRI_MACROS_BROKEN@ # undef SCNx8 # ifdef UINT8_MAX # define SCNx8 "hhx" # endif # endif # if !defined SCNd16 || @PRI_MACROS_BROKEN@ # undef SCNd16 # ifdef INT16_MAX # define SCNd16 "hd" # endif # endif # if !defined SCNi16 || @PRI_MACROS_BROKEN@ # undef SCNi16 # ifdef INT16_MAX # define SCNi16 "hi" # endif # endif # if !defined SCNo16 || @PRI_MACROS_BROKEN@ # undef SCNo16 # ifdef UINT16_MAX # define SCNo16 "ho" # endif # endif # if !defined SCNu16 || @PRI_MACROS_BROKEN@ # undef SCNu16 # ifdef UINT16_MAX # define SCNu16 "hu" # endif # endif # if !defined SCNx16 || @PRI_MACROS_BROKEN@ # undef SCNx16 # ifdef UINT16_MAX # define SCNx16 "hx" # endif # endif # if !defined SCNd32 || @PRI_MACROS_BROKEN@ # undef SCNd32 # ifdef INT32_MAX # define SCNd32 "d" # endif # endif # if !defined SCNi32 || @PRI_MACROS_BROKEN@ # undef SCNi32 # ifdef INT32_MAX # define SCNi32 "i" # endif # endif # if !defined SCNo32 || @PRI_MACROS_BROKEN@ # undef SCNo32 # ifdef UINT32_MAX # define SCNo32 "o" # endif # endif # if !defined SCNu32 || @PRI_MACROS_BROKEN@ # undef SCNu32 # ifdef UINT32_MAX # define SCNu32 "u" # endif # endif # if !defined SCNx32 || @PRI_MACROS_BROKEN@ # undef SCNx32 # ifdef UINT32_MAX # define SCNx32 "x" # endif # endif # ifdef INT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) # define _SCN64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCN64_PREFIX "I64" # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNd64 || @PRI_MACROS_BROKEN@ # undef SCNd64 # define SCNd64 _SCN64_PREFIX "d" # endif # if !defined SCNi64 || @PRI_MACROS_BROKEN@ # undef SCNi64 # define SCNi64 _SCN64_PREFIX "i" # endif # endif # ifdef UINT64_MAX # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) # define _SCNu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCNu64_PREFIX "I64" # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNo64 || @PRI_MACROS_BROKEN@ # undef SCNo64 # define SCNo64 _SCNu64_PREFIX "o" # endif # if !defined SCNu64 || @PRI_MACROS_BROKEN@ # undef SCNu64 # define SCNu64 _SCNu64_PREFIX "u" # endif # if !defined SCNx64 || @PRI_MACROS_BROKEN@ # undef SCNx64 # define SCNx64 _SCNu64_PREFIX "x" # endif # endif # if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST8 # define SCNdLEAST8 "hhd" # endif # if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST8 # define SCNiLEAST8 "hhi" # endif # if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST8 # define SCNoLEAST8 "hho" # endif # if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST8 # define SCNuLEAST8 "hhu" # endif # if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST8 # define SCNxLEAST8 "hhx" # endif # if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST16 # define SCNdLEAST16 "hd" # endif # if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST16 # define SCNiLEAST16 "hi" # endif # if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST16 # define SCNoLEAST16 "ho" # endif # if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST16 # define SCNuLEAST16 "hu" # endif # if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST16 # define SCNxLEAST16 "hx" # endif # if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST32 # define SCNdLEAST32 "d" # endif # if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST32 # define SCNiLEAST32 "i" # endif # if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST32 # define SCNoLEAST32 "o" # endif # if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST32 # define SCNuLEAST32 "u" # endif # if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST32 # define SCNxLEAST32 "x" # endif # ifdef INT64_MAX # if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNdLEAST64 # define SCNdLEAST64 SCNd64 # endif # if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNiLEAST64 # define SCNiLEAST64 SCNi64 # endif # endif # ifdef UINT64_MAX # if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNoLEAST64 # define SCNoLEAST64 SCNo64 # endif # if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNuLEAST64 # define SCNuLEAST64 SCNu64 # endif # if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ # undef SCNxLEAST64 # define SCNxLEAST64 SCNx64 # endif # endif # if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ # undef SCNdFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNdFAST8 SCNd64 # elif INT_FAST8_MAX == 0x7fff # define SCNdFAST8 "hd" # elif INT_FAST8_MAX == 0x7f # define SCNdFAST8 "hhd" # else # define SCNdFAST8 "d" # endif # endif # if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ # undef SCNiFAST8 # if INT_FAST8_MAX > INT32_MAX # define SCNiFAST8 SCNi64 # elif INT_FAST8_MAX == 0x7fff # define SCNiFAST8 "hi" # elif INT_FAST8_MAX == 0x7f # define SCNiFAST8 "hhi" # else # define SCNiFAST8 "i" # endif # endif # if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ # undef SCNoFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNoFAST8 SCNo64 # elif UINT_FAST8_MAX == 0xffff # define SCNoFAST8 "ho" # elif UINT_FAST8_MAX == 0xff # define SCNoFAST8 "hho" # else # define SCNoFAST8 "o" # endif # endif # if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ # undef SCNuFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNuFAST8 SCNu64 # elif UINT_FAST8_MAX == 0xffff # define SCNuFAST8 "hu" # elif UINT_FAST8_MAX == 0xff # define SCNuFAST8 "hhu" # else # define SCNuFAST8 "u" # endif # endif # if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ # undef SCNxFAST8 # if UINT_FAST8_MAX > UINT32_MAX # define SCNxFAST8 SCNx64 # elif UINT_FAST8_MAX == 0xffff # define SCNxFAST8 "hx" # elif UINT_FAST8_MAX == 0xff # define SCNxFAST8 "hhx" # else # define SCNxFAST8 "x" # endif # endif # if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ # undef SCNdFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNdFAST16 SCNd64 # elif INT_FAST16_MAX == 0x7fff # define SCNdFAST16 "hd" # else # define SCNdFAST16 "d" # endif # endif # if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ # undef SCNiFAST16 # if INT_FAST16_MAX > INT32_MAX # define SCNiFAST16 SCNi64 # elif INT_FAST16_MAX == 0x7fff # define SCNiFAST16 "hi" # else # define SCNiFAST16 "i" # endif # endif # if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ # undef SCNoFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNoFAST16 SCNo64 # elif UINT_FAST16_MAX == 0xffff # define SCNoFAST16 "ho" # else # define SCNoFAST16 "o" # endif # endif # if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ # undef SCNuFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNuFAST16 SCNu64 # elif UINT_FAST16_MAX == 0xffff # define SCNuFAST16 "hu" # else # define SCNuFAST16 "u" # endif # endif # if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ # undef SCNxFAST16 # if UINT_FAST16_MAX > UINT32_MAX # define SCNxFAST16 SCNx64 # elif UINT_FAST16_MAX == 0xffff # define SCNxFAST16 "hx" # else # define SCNxFAST16 "x" # endif # endif # if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ # undef SCNdFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNdFAST32 SCNd64 # else # define SCNdFAST32 "d" # endif # endif # if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ # undef SCNiFAST32 # if INT_FAST32_MAX > INT32_MAX # define SCNiFAST32 SCNi64 # else # define SCNiFAST32 "i" # endif # endif # if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ # undef SCNoFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNoFAST32 SCNo64 # else # define SCNoFAST32 "o" # endif # endif # if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ # undef SCNuFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNuFAST32 SCNu64 # else # define SCNuFAST32 "u" # endif # endif # if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ # undef SCNxFAST32 # if UINT_FAST32_MAX > UINT32_MAX # define SCNxFAST32 SCNx64 # else # define SCNxFAST32 "x" # endif # endif # ifdef INT64_MAX # if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ # undef SCNdFAST64 # define SCNdFAST64 SCNd64 # endif # if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ # undef SCNiFAST64 # define SCNiFAST64 SCNi64 # endif # endif # ifdef UINT64_MAX # if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ # undef SCNoFAST64 # define SCNoFAST64 SCNo64 # endif # if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ # undef SCNuFAST64 # define SCNuFAST64 SCNu64 # endif # if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ # undef SCNxFAST64 # define SCNxFAST64 SCNx64 # endif # endif # if !defined SCNdMAX || @PRI_MACROS_BROKEN@ # undef SCNdMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNdMAX SCNd64 # else # define SCNdMAX "ld" # endif # endif # if !defined SCNiMAX || @PRI_MACROS_BROKEN@ # undef SCNiMAX # if @INT32_MAX_LT_INTMAX_MAX@ # define SCNiMAX SCNi64 # else # define SCNiMAX "li" # endif # endif # if !defined SCNoMAX || @PRI_MACROS_BROKEN@ # undef SCNoMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNoMAX SCNo64 # else # define SCNoMAX "lo" # endif # endif # if !defined SCNuMAX || @PRI_MACROS_BROKEN@ # undef SCNuMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNuMAX SCNu64 # else # define SCNuMAX "lu" # endif # endif # if !defined SCNxMAX || @PRI_MACROS_BROKEN@ # undef SCNxMAX # if @UINT32_MAX_LT_UINTMAX_MAX@ # define SCNxMAX SCNx64 # else # define SCNxMAX "lx" # endif # endif # if !defined SCNdPTR || @PRI_MACROS_BROKEN@ # undef SCNdPTR # ifdef INTPTR_MAX # define SCNdPTR @PRIPTR_PREFIX@ "d" # endif # endif # if !defined SCNiPTR || @PRI_MACROS_BROKEN@ # undef SCNiPTR # ifdef INTPTR_MAX # define SCNiPTR @PRIPTR_PREFIX@ "i" # endif # endif # if !defined SCNoPTR || @PRI_MACROS_BROKEN@ # undef SCNoPTR # ifdef UINTPTR_MAX # define SCNoPTR @PRIPTR_PREFIX@ "o" # endif # endif # if !defined SCNuPTR || @PRI_MACROS_BROKEN@ # undef SCNuPTR # ifdef UINTPTR_MAX # define SCNuPTR @PRIPTR_PREFIX@ "u" # endif # endif # if !defined SCNxPTR || @PRI_MACROS_BROKEN@ # undef SCNxPTR # ifdef UINTPTR_MAX # define SCNxPTR @PRIPTR_PREFIX@ "x" # endif # endif #endif /* 7.8.2 Functions for greatest-width integer types */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_IMAXABS@ # if !@HAVE_DECL_IMAXABS@ extern intmax_t imaxabs (intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs # if HAVE_RAW_DECL_IMAXABS _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " "use gnulib module imaxabs for portability"); # endif #endif #if @GNULIB_IMAXDIV@ # if !@HAVE_DECL_IMAXDIV@ # if !GNULIB_defined_imaxdiv_t typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif extern imaxdiv_t imaxdiv (intmax_t, intmax_t); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv # if HAVE_RAW_DECL_IMAXDIV _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " "use gnulib module imaxdiv for portability"); # endif #endif #if @GNULIB_STRTOIMAX@ # if !@HAVE_DECL_STRTOIMAX@ extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtoimax # if HAVE_RAW_DECL_STRTOIMAX _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " "use gnulib module strtoimax for portability"); # endif #endif #if @GNULIB_STRTOUMAX@ # if !@HAVE_DECL_STRTOUMAX@ extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1)); # endif #elif defined GNULIB_POSIXCHECK # undef strtoumax # if HAVE_RAW_DECL_STRTOUMAX _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " "use gnulib module strtoumax for portability"); # endif #endif /* Don't bother defining or declaring wcstoimax and wcstoumax, since wide-character functions like this are hardly ever useful. */ #ifdef __cplusplus } #endif #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ dico-2.2/gnu/langinfo.in.h000066400000000000000000000122441172612674100154510ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . Copyright (C) 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * POSIX for platforms that lack it or have an incomplete one. * */ #ifndef _GL_LANGINFO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_LANGINFO_H@ # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ #endif #ifndef _GL_LANGINFO_H #define _GL_LANGINFO_H #if !@HAVE_LANGINFO_H@ /* A platform that lacks . */ /* Assume that it also lacks and the nl_item type. */ # if !GNULIB_defined_nl_item typedef int nl_item; # define GNULIB_defined_nl_item 1 # endif /* nl_langinfo items of the LC_CTYPE category */ # define CODESET 10000 /* nl_langinfo items of the LC_NUMERIC category */ # define RADIXCHAR 10001 # define THOUSEP 10002 /* nl_langinfo items of the LC_TIME category */ # define D_T_FMT 10003 # define D_FMT 10004 # define T_FMT 10005 # define T_FMT_AMPM 10006 # define AM_STR 10007 # define PM_STR 10008 # define DAY_1 10009 # define DAY_2 (DAY_1 + 1) # define DAY_3 (DAY_1 + 2) # define DAY_4 (DAY_1 + 3) # define DAY_5 (DAY_1 + 4) # define DAY_6 (DAY_1 + 5) # define DAY_7 (DAY_1 + 6) # define ABDAY_1 10016 # define ABDAY_2 (ABDAY_1 + 1) # define ABDAY_3 (ABDAY_1 + 2) # define ABDAY_4 (ABDAY_1 + 3) # define ABDAY_5 (ABDAY_1 + 4) # define ABDAY_6 (ABDAY_1 + 5) # define ABDAY_7 (ABDAY_1 + 6) # define MON_1 10023 # define MON_2 (MON_1 + 1) # define MON_3 (MON_1 + 2) # define MON_4 (MON_1 + 3) # define MON_5 (MON_1 + 4) # define MON_6 (MON_1 + 5) # define MON_7 (MON_1 + 6) # define MON_8 (MON_1 + 7) # define MON_9 (MON_1 + 8) # define MON_10 (MON_1 + 9) # define MON_11 (MON_1 + 10) # define MON_12 (MON_1 + 11) # define ABMON_1 10035 # define ABMON_2 (ABMON_1 + 1) # define ABMON_3 (ABMON_1 + 2) # define ABMON_4 (ABMON_1 + 3) # define ABMON_5 (ABMON_1 + 4) # define ABMON_6 (ABMON_1 + 5) # define ABMON_7 (ABMON_1 + 6) # define ABMON_8 (ABMON_1 + 7) # define ABMON_9 (ABMON_1 + 8) # define ABMON_10 (ABMON_1 + 9) # define ABMON_11 (ABMON_1 + 10) # define ABMON_12 (ABMON_1 + 11) # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 /* nl_langinfo items of the LC_MONETARY category */ # define CRNCYSTR 10052 /* nl_langinfo items of the LC_MESSAGES category */ # define YESEXPR 10053 # define NOEXPR 10054 #else /* A platform that has . */ # if !@HAVE_LANGINFO_CODESET@ # define CODESET 10000 # define GNULIB_defined_CODESET 1 # endif # if !@HAVE_LANGINFO_T_FMT_AMPM@ # define T_FMT_AMPM 10006 # define GNULIB_defined_T_FMT_AMPM 1 # endif # if !@HAVE_LANGINFO_ERA@ # define ERA 10047 # define ERA_D_FMT 10048 # define ERA_D_T_FMT 10049 # define ERA_T_FMT 10050 # define ALT_DIGITS 10051 # define GNULIB_defined_ERA 1 # endif # if !@HAVE_LANGINFO_YESEXPR@ # define YESEXPR 10053 # define NOEXPR 10054 # define GNULIB_defined_YESEXPR 1 # endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ /* Return a piece of locale dependent information. Note: The difference between nl_langinfo (CODESET) and locale_charset () is that the latter normalizes the encoding names to GNU conventions. */ #if @GNULIB_NL_LANGINFO@ # if @REPLACE_NL_LANGINFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef nl_langinfo # define nl_langinfo rpl_nl_langinfo # endif _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); # else # if !@HAVE_NL_LANGINFO@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIASWARN (nl_langinfo); #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " "use gnulib module nl_langinfo for portability"); # endif #endif #endif /* _GL_LANGINFO_H */ #endif /* _GL_LANGINFO_H */ dico-2.2/gnu/localcharset.c000066400000000000000000000431731172612674100157130ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2006, 2008-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible . */ #include /* Specification. */ #include "localcharset.h" #include #include #include #include #include #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET # define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ #endif #if defined _WIN32 || defined __WIN32__ # define WIN32_NATIVE #endif #if defined __EMX__ /* Assume EMX program runs on OS/2, even if compiled under DOS. */ # ifndef OS2 # define OS2 # endif #endif #if !defined WIN32_NATIVE # include # if HAVE_LANGINFO_CODESET # include # else # if 0 /* see comment below */ # include # endif # endif # ifdef __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include # endif #elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif #if defined OS2 # define INCL_DOS # include #endif #if ENABLE_RELOCATABLE # include "relocatable.h" #else # define relocate(pathname) (pathname) #endif /* Get LIBDIR. */ #ifndef LIBDIR # include "configmake.h" #endif /* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ #ifndef O_NOFOLLOW # define O_NOFOLLOW 0 #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif #ifndef ISSLASH # define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) #endif #if HAVE_DECL_GETC_UNLOCKED # undef getc # define getc getc_unlocked #endif /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize 'charset_aliases' simultaneously, both will produce the same value, and everything will be ok if the two assignments to 'charset_aliases' are atomic. But I don't know what will happen if the two assignments mix. */ #if __STDC__ != 1 # define volatile /* empty */ #endif /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases (void) { const char *cp; cp = charset_aliases; if (cp == NULL) { #if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) const char *dir; const char *base = "charset.alias"; char *file_name; /* Make it possible to override the charset.alias location. This is necessary for running the testsuite before "make install". */ dir = getenv ("CHARSETALIASDIR"); if (dir == NULL || dir[0] == '\0') dir = relocate (LIBDIR); /* Concatenate dir and base into freshly allocated file_name. */ { size_t dir_len = strlen (dir); size_t base_len = strlen (base); int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); file_name = (char *) malloc (dir_len + add_slash + base_len + 1); if (file_name != NULL) { memcpy (file_name, dir, dir_len); if (add_slash) file_name[dir_len] = DIRECTORY_SEPARATOR; memcpy (file_name + dir_len + add_slash, base, base_len + 1); } } if (file_name == NULL) /* Out of memory. Treat the file as empty. */ cp = ""; else { int fd; /* Open the file. Reject symbolic links on platforms that support O_NOFOLLOW. This is a security feature. Without it, an attacker could retrieve parts of the contents (namely, the tail of the first line that starts with "* ") of an arbitrary file by placing a symbolic link to that file under the name "charset.alias" in some writable directory and defining the environment variable CHARSETALIASDIR to point to that directory. */ fd = open (file_name, O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); if (fd < 0) /* File not found. Treat it as empty. */ cp = ""; else { FILE *fp; fp = fdopen (fd, "r"); if (fp == NULL) { /* Out of memory. Treat the file as empty. */ close (fd); cp = ""; } else { /* Parse the file's contents. */ char *res_ptr = NULL; size_t res_size = 0; for (;;) { int c; char buf1[50+1]; char buf2[50+1]; size_t l1, l2; char *old_res_ptr; c = getc (fp); if (c == EOF) break; if (c == '\n' || c == ' ' || c == '\t') continue; if (c == '#') { /* Skip comment, to end of line. */ do c = getc (fp); while (!(c == EOF || c == '\n')); if (c == EOF) break; continue; } ungetc (c, fp); if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) break; l1 = strlen (buf1); l2 = strlen (buf2); old_res_ptr = res_ptr; if (res_size == 0) { res_size = l1 + 1 + l2 + 1; res_ptr = (char *) malloc (res_size + 1); } else { res_size += l1 + 1 + l2 + 1; res_ptr = (char *) realloc (res_ptr, res_size + 1); } if (res_ptr == NULL) { /* Out of memory. */ res_size = 0; free (old_res_ptr); break; } strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); strcpy (res_ptr + res_size - (l2 + 1), buf2); } fclose (fp); if (res_size == 0) cp = ""; else { *(res_ptr + res_size) = '\0'; cp = res_ptr; } } } free (file_name); } #else # if defined DARWIN7 /* To avoid the trouble of installing a file that is shared by many GNU packages -- many packaging systems have problems with this --, simply inline the aliases here. */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-4" "\0" "ISO-8859-4" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" "ISO8859-13" "\0" "ISO-8859-13" "\0" "ISO8859-15" "\0" "ISO-8859-15" "\0" "KOI8-R" "\0" "KOI8-R" "\0" "KOI8-U" "\0" "KOI8-U" "\0" "CP866" "\0" "CP866" "\0" "CP949" "\0" "CP949" "\0" "CP1131" "\0" "CP1131" "\0" "CP1251" "\0" "CP1251" "\0" "eucCN" "\0" "GB2312" "\0" "GB2312" "\0" "GB2312" "\0" "eucJP" "\0" "EUC-JP" "\0" "eucKR" "\0" "EUC-KR" "\0" "Big5" "\0" "BIG5" "\0" "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" "GBK" "\0" "GBK" "\0" "GB18030" "\0" "GB18030" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "ARMSCII-8" "\0" "ARMSCII-8" "\0" "PT154" "\0" "PT154" "\0" /*"ISCII-DEV" "\0" "?" "\0"*/ "*" "\0" "UTF-8" "\0"; # endif # if defined VMS /* To avoid the troubles of an extra file charset.alias_vms in the sources of many GNU packages, simply inline the aliases here. */ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation "Compaq C Run-Time Library Reference Manual for OpenVMS systems" section 10.7 "Handling Different Character Sets". */ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" "ISO8859-2" "\0" "ISO-8859-2" "\0" "ISO8859-5" "\0" "ISO-8859-5" "\0" "ISO8859-7" "\0" "ISO-8859-7" "\0" "ISO8859-8" "\0" "ISO-8859-8" "\0" "ISO8859-9" "\0" "ISO-8859-9" "\0" /* Japanese */ "eucJP" "\0" "EUC-JP" "\0" "SJIS" "\0" "SHIFT_JIS" "\0" "DECKANJI" "\0" "DEC-KANJI" "\0" "SDECKANJI" "\0" "EUC-JP" "\0" /* Chinese */ "eucTW" "\0" "EUC-TW" "\0" "DECHANYU" "\0" "DEC-HANYU" "\0" "DECHANZI" "\0" "GB2312" "\0" /* Korean */ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif # if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ cp = "CP936" "\0" "GBK" "\0" "CP1361" "\0" "JOHAB" "\0" "CP20127" "\0" "ASCII" "\0" "CP20866" "\0" "KOI8-R" "\0" "CP20936" "\0" "GB2312" "\0" "CP21866" "\0" "KOI8-RU" "\0" "CP28591" "\0" "ISO-8859-1" "\0" "CP28592" "\0" "ISO-8859-2" "\0" "CP28593" "\0" "ISO-8859-3" "\0" "CP28594" "\0" "ISO-8859-4" "\0" "CP28595" "\0" "ISO-8859-5" "\0" "CP28596" "\0" "ISO-8859-6" "\0" "CP28597" "\0" "ISO-8859-7" "\0" "CP28598" "\0" "ISO-8859-8" "\0" "CP28599" "\0" "ISO-8859-9" "\0" "CP28605" "\0" "ISO-8859-15" "\0" "CP38598" "\0" "ISO-8859-8" "\0" "CP51932" "\0" "EUC-JP" "\0" "CP51936" "\0" "GB2312" "\0" "CP51949" "\0" "EUC-KR" "\0" "CP51950" "\0" "EUC-TW" "\0" "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif #endif charset_aliases = cp; } return cp; } /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ #ifdef STATIC STATIC #endif const char * locale_charset (void) { const char *codeset; const char *aliases; #if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET /* Most systems support nl_langinfo (CODESET) nowadays. */ codeset = nl_langinfo (CODESET); # ifdef __CYGWIN__ /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always returns "US-ASCII". Return the suffix of the locale name from the environment variables (if present) or the codepage as a number. */ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) { const char *locale; static char buf[2 + 10 + 1]; locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } /* Woe32 has a function returning the locale's codepage as a number: GetACP(). This encoding is used by Cygwin, unless the user has set the environment variable CYGWIN=codepage:oem (which very few people do). Output directed to console windows needs to be converted (to GetOEMCP() if the console is using a raster font, or to GetConsoleOutputCP() if it is using a TrueType font). Cygwin does this conversion transparently (see winsup/cygwin/fhandler_console.cc), converting to GetConsoleOutputCP(). This leads to correct results, except when SetConsoleOutputCP has been called and a raster font is in use. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; } # endif # else /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the locale name the user has set. */ # if 0 locale = setlocale (LC_CTYPE, NULL); # endif if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } } /* On some old systems, one used to set locale = "iso8859_1". On others, you set it to "language_COUNTRY.charset". In any case, we resolve it through the charset.alias file. */ codeset = locale; # endif #elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number: GetACP(). When the output goes to a console window, it needs to be provided in GetOEMCP() encoding if the console is using a raster font, or in GetConsoleOutputCP() encoding if it is using a TrueType font. But in GUI programs and for output sent to files and pipes, GetACP() encoding is the best bet. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; #elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; ULONG cp[3]; ULONG cplen; /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); if (locale == NULL || locale[0] == '\0') locale = getenv ("LANG"); } if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } /* Resolve through the charset.alias file. */ codeset = locale; } else { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) codeset = ""; else { sprintf (buf, "CP%u", cp[0]); codeset = buf; } } #endif if (codeset == NULL) /* The canonical name cannot be determined. */ codeset = ""; /* Resolve alias. */ for (aliases = get_charset_aliases (); *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 || (aliases[0] == '*' && aliases[1] == '\0')) { codeset = aliases + strlen (aliases) + 1; break; } /* Don't return an empty string. GNU libc and GNU libiconv interpret the empty string as denoting "the locale's character encoding", thus GNU libiconv would call this function a second time. */ if (codeset[0] == '\0') codeset = "ASCII"; return codeset; } dico-2.2/gnu/localcharset.h000066400000000000000000000026751172612674100157220ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ dico-2.2/gnu/lseek.c000066400000000000000000000034651172612674100143520ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* An lseek() function that detects pipes. Copyright (C) 2007, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ # include #else # include #endif #include #undef lseek off_t rpl_lseek (int fd, off_t offset, int whence) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) { errno = EBADF; return -1; } if (GetFileType (h) != FILE_TYPE_DISK) { errno = ESPIPE; return -1; } #else /* BeOS lseek mistakenly succeeds on pipes... */ struct stat statbuf; if (fstat (fd, &statbuf) < 0) return -1; if (!S_ISREG (statbuf.st_mode)) { errno = ESPIPE; return -1; } #endif return lseek (fd, offset, whence); } dico-2.2/gnu/malloc.c000066400000000000000000000032521172612674100145100ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* malloc() function that is glibc compatible. Copyright (C) 1997-1998, 2006-2007, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering and Bruno Haible */ #include /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #ifdef malloc # define NEED_MALLOC_GNU 1 # undef malloc /* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU # define NEED_MALLOC_GNU 1 #endif /* Specification. */ #include #include /* Call the system's malloc below. */ #undef malloc /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ void * rpl_malloc (size_t n) { void *result; #if NEED_MALLOC_GNU if (n == 0) n = 1; #endif result = malloc (n); #if !HAVE_MALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } dico-2.2/gnu/mbrtowc.c000066400000000000000000000250161172612674100147200ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert multibyte character to wide character. Copyright (C) 1999-2002, 2005-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #if GNULIB_defined_mbstate_t /* Implement mbrtowc() on top of mbtowc(). */ # include # include # include "localcharset.h" # include "streq.h" # include "verify.h" verify (sizeof (mbstate_t) >= 4); static char internal_state[4]; size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { char *pstate = (char *)ps; if (s == NULL) { pwc = NULL; s = ""; n = 1; } if (n == 0) return (size_t)(-2); /* Here n > 0. */ if (pstate == NULL) pstate = internal_state; { size_t nstate = pstate[0]; char buf[4]; const char *p; size_t m; switch (nstate) { case 0: p = s; m = n; break; case 3: buf[2] = pstate[3]; /*FALLTHROUGH*/ case 2: buf[1] = pstate[2]; /*FALLTHROUGH*/ case 1: buf[0] = pstate[1]; p = buf; m = nstate; buf[m++] = s[0]; if (n >= 2 && m < 4) { buf[m++] = s[1]; if (n >= 3 && m < 4) buf[m++] = s[2]; } break; default: errno = EINVAL; return (size_t)(-1); } /* Here m > 0. */ # if __GLIBC__ || defined __UCLIBC__ /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { int res = mbtowc (pwc, p, m); if (res >= 0) { if (pwc != NULL && ((*pwc == 0) != (res == 0))) abort (); if (nstate >= (res > 0 ? res : 1)) abort (); res -= nstate; pstate[0] = 0; return res; } /* mbtowc does not distinguish between invalid and incomplete multibyte sequences. But mbrtowc needs to make this distinction. There are two possible approaches: - Use iconv() and its return value. - Use built-in knowledge about the possible encodings. Given the low quality of implementation of iconv() on the systems that lack mbrtowc(), we use the second approach. The possible encodings are: - 8-bit encodings, - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - UTF-8. Use specialized code for each. */ if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ { const char *encoding = locale_charset (); if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; if (c >= 0xc2) { if (c < 0xe0) { if (m == 1) goto incomplete; } else if (c < 0xf0) { if (m == 1) goto incomplete; if (m == 2) { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xe1 || c2 >= 0xa0) && (c != 0xed || c2 < 0xa0)) goto incomplete; } } else if (c <= 0xf4) { if (m == 1) goto incomplete; else /* m == 2 || m == 3 */ { unsigned char c2 = (unsigned char) p[1]; if ((c2 ^ 0x80) < 0x40 && (c >= 0xf1 || c2 >= 0x90) && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if ((c3 ^ 0x80) < 0x40) goto incomplete; } } } } } goto invalid; } /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) goto incomplete; } if (m == 2) { unsigned char c = (unsigned char) p[0]; if (c == 0x8f) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0xa1 && c2 < 0xff) goto incomplete; } } goto invalid; } if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if (c >= 0xa1 && c < 0xff) goto incomplete; } goto invalid; } if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0xa1 && c < 0xff) || c == 0x8e) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c == 0x8e) goto incomplete; } goto invalid; } if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) goto incomplete; } else /* m == 2 || m == 3 */ { unsigned char c = (unsigned char) p[0]; if (c >= 0x90 && c <= 0xe3) { unsigned char c2 = (unsigned char) p[1]; if (c2 >= 0x30 && c2 <= 0x39) { if (m == 2) goto incomplete; else /* m == 3 */ { unsigned char c3 = (unsigned char) p[2]; if (c3 >= 0x81 && c3 <= 0xfe) goto incomplete; } } } } goto invalid; } if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { unsigned char c = (unsigned char) p[0]; if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) || (c >= 0xf0 && c <= 0xf9)) goto incomplete; } goto invalid; } /* An unknown multibyte encoding. */ goto incomplete; } incomplete: { size_t k = nstate; /* Here 0 <= k < m < 4. */ pstate[++k] = s[0]; if (k < m) { pstate[++k] = s[1]; if (k < m) pstate[++k] = s[2]; } if (k != m) abort (); } pstate[0] = m; return (size_t)(-2); invalid: errno = EILSEQ; /* The conversion state is undefined, says POSIX. */ return (size_t)(-1); } } } #else /* Override the system's mbrtowc() function. */ # undef mbrtowc size_t rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { # if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG if (s == NULL) { pwc = NULL; s = ""; n = 1; } # endif # if MBRTOWC_RETVAL_BUG { static mbstate_t internal_state; /* Override mbrtowc's internal state. We can not call mbsinit() on the hidden internal state, but we can call it on our variable. */ if (ps == NULL) ps = &internal_state; if (!mbsinit (ps)) { /* Parse the rest of the multibyte character byte for byte. */ size_t count = 0; for (; n > 0; s++, n--) { wchar_t wc; size_t ret = mbrtowc (&wc, s, 1, ps); if (ret == (size_t)(-1)) return (size_t)(-1); count++; if (ret != (size_t)(-2)) { /* The multibyte character has been completed. */ if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : count); } } return (size_t)(-2); } } # endif # if MBRTOWC_NUL_RETVAL_BUG { wchar_t wc; size_t ret = mbrtowc (&wc, s, n, ps); if (ret != (size_t)(-1) && ret != (size_t)(-2)) { if (pwc != NULL) *pwc = wc; if (wc == 0) ret = 0; } return ret; } # else { # if MBRTOWC_NULL_ARG1_BUG wchar_t dummy; if (pwc == NULL) pwc = &dummy; # endif return mbrtowc (pwc, s, n, ps); } # endif } #endif dico-2.2/gnu/mbsinit.c000066400000000000000000000040351172612674100147060ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Test for initial conversion state. Copyright (C) 2008-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #include "verify.h" #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, 'mbstate_t' is defined as 'int'. */ int mbsinit (const mbstate_t *ps) { return ps == NULL || *ps == 0; } #else /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). We assume that - sizeof (mbstate_t) >= 4, - only stateless encodings are supported (such as UTF-8 and EUC-JP, but not ISO-2022 variants), - for each encoding, the number of bytes for a wide character is <= 4. (This maximum is attained for UTF-8, GB18030, EUC-TW.) We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ verify (sizeof (mbstate_t) >= 4); int mbsinit (const mbstate_t *ps) { const char *pstate = (const char *)ps; return pstate == NULL || pstate[0] == 0; } #endif dico-2.2/gnu/mbtowc-impl.h000066400000000000000000000027531172612674100155050ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert multibyte character to wide character. Copyright (C) 2011 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 3 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, see . */ /* We don't need a static internal state, because the encoding is not state dependent, and when mbrtowc returns (size_t)(-2). we throw the result away. */ int mbtowc (wchar_t *pwc, const char *s, size_t n) { if (s == NULL) return 0; else { mbstate_t state; wchar_t wc; size_t result; memset (&state, 0, sizeof (mbstate_t)); result = mbrtowc (&wc, s, n, &state); if (result == (size_t)-1 || result == (size_t)-2) { errno = EILSEQ; return -1; } if (pwc != NULL) *pwc = wc; return (wc == 0 ? 0 : result); } } dico-2.2/gnu/mbtowc.c000066400000000000000000000017731172612674100145420ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert multibyte character to wide character. Copyright (C) 2011 Free Software Foundation, Inc. Written by Bruno Haible , 2011. 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 3 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, see . */ #include #include #include #include #include #include "mbtowc-impl.h" dico-2.2/gnu/md5.c000066400000000000000000000360351172612674100137330ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Ulrich Drepper , 1995. */ #include #include "md5.h" #include #include #include #include #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #ifdef _LIBC # include # if __BYTE_ORDER == __BIG_ENDIAN # define WORDS_BIGENDIAN 1 # endif /* We need to keep the namespace clean so define the MD5 function protected using leading __ . */ # define md5_init_ctx __md5_init_ctx # define md5_process_block __md5_process_block # define md5_process_bytes __md5_process_bytes # define md5_finish_ctx __md5_finish_ctx # define md5_read_ctx __md5_read_ctx # define md5_stream __md5_stream # define md5_buffer __md5_buffer #endif #ifdef WORDS_BIGENDIAN # define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else # define SWAP(n) (n) #endif #define BLOCKSIZE 32768 #if BLOCKSIZE % 64 != 0 # error "invalid BLOCKSIZE" #endif /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ void md5_init_ctx (struct md5_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; ctx->C = 0x98badcfe; ctx->D = 0x10325476; ctx->total[0] = ctx->total[1] = 0; ctx->buflen = 0; } /* Copy the 4 byte value from v into the memory location pointed to by *cp, If your architecture allows unaligned access this is equivalent to * (uint32_t *) cp = v */ static inline void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); } /* Put result from CTX in first 16 bytes following RESBUF. The result must be in little endian byte order. */ void * md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) { char *r = resbuf; set_uint32 (r + 0 * sizeof ctx->A, SWAP (ctx->A)); set_uint32 (r + 1 * sizeof ctx->B, SWAP (ctx->B)); set_uint32 (r + 2 * sizeof ctx->C, SWAP (ctx->C)); set_uint32 (r + 3 * sizeof ctx->D, SWAP (ctx->D)); return resbuf; } /* Process the remaining bytes in the internal buffer and the usual prolog according to the standard and write the result to RESBUF. */ void * md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ uint32_t bytes = ctx->buflen; size_t size = (bytes < 56) ? 64 / 4 : 64 * 2 / 4; /* Now count remaining bytes. */ ctx->total[0] += bytes; if (ctx->total[0] < bytes) ++ctx->total[1]; /* Put the 64-bit file length in *bits* at the end of the buffer. */ ctx->buffer[size - 2] = SWAP (ctx->total[0] << 3); ctx->buffer[size - 1] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); memcpy (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes); /* Process last bytes. */ md5_process_block (ctx->buffer, size * 4, ctx); return md5_read_ctx (ctx, resbuf); } /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ int md5_stream (FILE *stream, void *resblock) { struct md5_ctx ctx; size_t sum; char *buffer = malloc (BLOCKSIZE + 72); if (!buffer) return 1; /* Initialize the computation context. */ md5_init_ctx (&ctx); /* Iterate over full file contents. */ while (1) { /* We read the file in blocks of BLOCKSIZE bytes. One call of the computation function processes the whole buffer so that with the next round of the loop another block can be read. */ size_t n; sum = 0; /* Read block. Take care for partial reads. */ while (1) { n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); sum += n; if (sum == BLOCKSIZE) break; if (n == 0) { /* Check for the error flag IFF N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) { free (buffer); return 1; } goto process_partial_block; } /* We've read at least one byte, so ignore errors. But always check for EOF, since feof may be true even though N > 0. Otherwise, we could end up calling fread after EOF. */ if (feof (stream)) goto process_partial_block; } /* Process buffer with BLOCKSIZE bytes. Note that BLOCKSIZE % 64 == 0 */ md5_process_block (buffer, BLOCKSIZE, &ctx); } process_partial_block: /* Process any remaining bytes. */ if (sum > 0) md5_process_bytes (buffer, sum, &ctx); /* Construct result in desired memory. */ md5_finish_ctx (&ctx, resblock); free (buffer); return 0; } /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ void * md5_buffer (const char *buffer, size_t len, void *resblock) { struct md5_ctx ctx; /* Initialize the computation context. */ md5_init_ctx (&ctx); /* Process whole buffer but last len % 64 bytes. */ md5_process_bytes (buffer, len, &ctx); /* Put result in desired memory area. */ return md5_finish_ctx (&ctx, resblock); } void md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ if (ctx->buflen != 0) { size_t left_over = ctx->buflen; size_t add = 128 - left_over > len ? len : 128 - left_over; memcpy (&((char *) ctx->buffer)[left_over], buffer, add); ctx->buflen += add; if (ctx->buflen > 64) { md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63], ctx->buflen); } buffer = (const char *) buffer + add; len -= add; } /* Process available complete blocks. */ if (len >= 64) { #if !_STRING_ARCH_unaligned # define alignof(type) offsetof (struct { char c; type x; }, x) # define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); buffer = (const char *) buffer + 64; len -= 64; } else #endif { md5_process_block (buffer, len & ~63, ctx); buffer = (const char *) buffer + (len & ~63); len &= 63; } } /* Move remaining bytes in internal buffer. */ if (len > 0) { size_t left_over = ctx->buflen; memcpy (&((char *) ctx->buffer)[left_over], buffer, len); left_over += len; if (left_over >= 64) { md5_process_block (ctx->buffer, 64, ctx); left_over -= 64; memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; } } /* These are the four functions used in the four steps of the MD5 algorithm and defined in the RFC 1321. The first function is a little bit optimized (as found in Colin Plumbs public domain implementation). */ /* #define FF(b, c, d) ((b & c) | (~b & d)) */ #define FF(b, c, d) (d ^ (b & (c ^ d))) #define FG(b, c, d) FF (d, b, c) #define FH(b, c, d) (b ^ c ^ d) #define FI(b, c, d) (c ^ (b | ~d)) /* Process LEN bytes of BUFFER, accumulating context into CTX. It is assumed that LEN % 64 == 0. */ void md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) { uint32_t correct_words[16]; const uint32_t *words = buffer; size_t nwords = len / sizeof (uint32_t); const uint32_t *endp = words + nwords; uint32_t A = ctx->A; uint32_t B = ctx->B; uint32_t C = ctx->C; uint32_t D = ctx->D; /* First increment the byte count. RFC 1321 specifies the possible length of the file up to 2^64 bits. Here we only compute the number of bytes. Do a double word increment. */ ctx->total[0] += len; if (ctx->total[0] < len) ++ctx->total[1]; /* Process all bytes in the buffer with 64 bytes in each round of the loop. */ while (words < endp) { uint32_t *cwp = correct_words; uint32_t A_save = A; uint32_t B_save = B; uint32_t C_save = C; uint32_t D_save = D; /* First round: using the given function, the context and a constant the next context is computed. Because the algorithms processing unit is a 32-bit word and it is determined to work on words in little endian byte order we perhaps have to change the byte order before the computation. To reduce the work for the next steps we store the swapped words in the array CORRECT_WORDS. */ #define OP(a, b, c, d, s, T) \ do \ { \ a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \ ++words; \ CYCLIC (a, s); \ a += b; \ } \ while (0) /* It is unfortunate that C does not provide an operator for cyclic rotation. Hope the C compiler is smart enough. */ #define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) /* Before we start, one word to the strange constants. They are defined in RFC 1321 as T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 Here is an equivalent invocation using Perl: perl -e 'foreach(1..64){printf "0x%08x\n", int (4294967296 * abs (sin $_))}' */ /* Round 1. */ OP (A, B, C, D, 7, 0xd76aa478); OP (D, A, B, C, 12, 0xe8c7b756); OP (C, D, A, B, 17, 0x242070db); OP (B, C, D, A, 22, 0xc1bdceee); OP (A, B, C, D, 7, 0xf57c0faf); OP (D, A, B, C, 12, 0x4787c62a); OP (C, D, A, B, 17, 0xa8304613); OP (B, C, D, A, 22, 0xfd469501); OP (A, B, C, D, 7, 0x698098d8); OP (D, A, B, C, 12, 0x8b44f7af); OP (C, D, A, B, 17, 0xffff5bb1); OP (B, C, D, A, 22, 0x895cd7be); OP (A, B, C, D, 7, 0x6b901122); OP (D, A, B, C, 12, 0xfd987193); OP (C, D, A, B, 17, 0xa679438e); OP (B, C, D, A, 22, 0x49b40821); /* For the second to fourth round we have the possibly swapped words in CORRECT_WORDS. Redefine the macro to take an additional first argument specifying the function to use. */ #undef OP #define OP(f, a, b, c, d, k, s, T) \ do \ { \ a += f (b, c, d) + correct_words[k] + T; \ CYCLIC (a, s); \ a += b; \ } \ while (0) /* Round 2. */ OP (FG, A, B, C, D, 1, 5, 0xf61e2562); OP (FG, D, A, B, C, 6, 9, 0xc040b340); OP (FG, C, D, A, B, 11, 14, 0x265e5a51); OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); OP (FG, A, B, C, D, 5, 5, 0xd62f105d); OP (FG, D, A, B, C, 10, 9, 0x02441453); OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); OP (FG, D, A, B, C, 14, 9, 0xc33707d6); OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); OP (FG, B, C, D, A, 8, 20, 0x455a14ed); OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); OP (FG, C, D, A, B, 7, 14, 0x676f02d9); OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); /* Round 3. */ OP (FH, A, B, C, D, 5, 4, 0xfffa3942); OP (FH, D, A, B, C, 8, 11, 0x8771f681); OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); OP (FH, B, C, D, A, 14, 23, 0xfde5380c); OP (FH, A, B, C, D, 1, 4, 0xa4beea44); OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); OP (FH, B, C, D, A, 6, 23, 0x04881d05); OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); /* Round 4. */ OP (FI, A, B, C, D, 0, 6, 0xf4292244); OP (FI, D, A, B, C, 7, 10, 0x432aff97); OP (FI, C, D, A, B, 14, 15, 0xab9423a7); OP (FI, B, C, D, A, 5, 21, 0xfc93a039); OP (FI, A, B, C, D, 12, 6, 0x655b59c3); OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); OP (FI, C, D, A, B, 10, 15, 0xffeff47d); OP (FI, B, C, D, A, 1, 21, 0x85845dd1); OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); OP (FI, C, D, A, B, 6, 15, 0xa3014314); OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); OP (FI, A, B, C, D, 4, 6, 0xf7537e82); OP (FI, D, A, B, C, 11, 10, 0xbd3af235); OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); OP (FI, B, C, D, A, 9, 21, 0xeb86d391); /* Add the starting values of the context. */ A += A_save; B += B_save; C += C_save; D += D_save; } /* Put checksum in context given as argument. */ ctx->A = A; ctx->B = B; ctx->C = C; ctx->D = D; } dico-2.2/gnu/md5.h000066400000000000000000000103251172612674100137320ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Declaration of functions and data types used for MD5 sum computing library functions. Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _MD5_H #define _MD5_H 1 #include #include #define MD5_DIGEST_SIZE 16 #define MD5_BLOCK_SIZE 64 #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #ifndef __THROW # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif #ifndef _LIBC # define __md5_buffer md5_buffer # define __md5_finish_ctx md5_finish_ctx # define __md5_init_ctx md5_init_ctx # define __md5_process_block md5_process_block # define __md5_process_bytes md5_process_bytes # define __md5_read_ctx md5_read_ctx # define __md5_stream md5_stream #endif # ifdef __cplusplus extern "C" { # endif /* Structure to save state of computation between the single steps. */ struct md5_ctx { uint32_t A; uint32_t B; uint32_t C; uint32_t D; uint32_t total[2]; uint32_t buflen; uint32_t buffer[32]; }; /* * The following three functions are build up the low level used in * the functions `md5_stream' and `md5_buffer'. */ /* Initialize structure containing state of computation. (RFC 1321, 3.3: Step 3) */ extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW; /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is necessary that LEN is a multiple of 64!!! */ extern void __md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) __THROW; /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is NOT required that LEN is a multiple of 64. */ extern void __md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) __THROW; /* Process the remaining bytes in the buffer and put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW; /* Put result from CTX in first 16 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW; /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ extern int __md5_stream (FILE *stream, void *resblock) __THROW; /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *__md5_buffer (const char *buffer, size_t len, void *resblock) __THROW; # ifdef __cplusplus } # endif #endif /* md5.h */ dico-2.2/gnu/memchr.c000066400000000000000000000135001172612674100145110ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), and implemented by Roland McGrath (roland@ai.mit.edu). 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 3 of the License, or 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, see . */ #ifndef _LIBC # include #endif #include #include #if defined _LIBC # include #else # define reg_char char #endif #include #if HAVE_BP_SYM_H || defined _LIBC # include #else # define BP_SYM(sym) sym #endif #undef __memchr #ifdef _LIBC # undef memchr #endif #ifndef weak_alias # define __memchr memchr #endif /* Search no more than N bytes of S for C. */ void * __memchr (void const *s, int c_in, size_t n) { /* On 32-bit hardware, choosing longword to be a 32-bit unsigned long instead of a 64-bit uintmax_t tends to give better performance. On 64-bit hardware, unsigned long is generally 64 bits already. Change this typedef to experiment with performance. */ typedef unsigned long int longword; const unsigned char *char_ptr; const longword *longword_ptr; longword repeated_one; longword repeated_c; unsigned reg_char c; c = (unsigned char) c_in; /* Handle the first few bytes by reading one byte at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ for (char_ptr = (const unsigned char *) s; n > 0 && (size_t) char_ptr % sizeof (longword) != 0; --n, ++char_ptr) if (*char_ptr == c) return (void *) char_ptr; longword_ptr = (const longword *) char_ptr; /* All these elucidatory comments refer to 4-byte longwords, but the theory applies equally well to any size longwords. */ /* Compute auxiliary longword values: repeated_one is a value which has a 1 in every byte. repeated_c has c in every byte. */ repeated_one = 0x01010101; repeated_c = c | (c << 8); repeated_c |= repeated_c << 16; if (0xffffffffU < (longword) -1) { repeated_one |= repeated_one << 31 << 1; repeated_c |= repeated_c << 31 << 1; if (8 < sizeof (longword)) { size_t i; for (i = 64; i < sizeof (longword) * 8; i *= 2) { repeated_one |= repeated_one << i; repeated_c |= repeated_c << i; } } } /* Instead of the traditional loop which tests each byte, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are equal to c. We first use an xor with repeated_c. This reduces the task to testing whether *any of the four* bytes in longword1 is zero. We compute tmp = ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). That is, we perform the following operations: 1. Subtract repeated_one. 2. & ~longword1. 3. & a mask consisting of 0x80 in every byte. Consider what happens in each byte: - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, and step 3 transforms it into 0x80. A carry can also be propagated to more significant bytes. - If a byte of longword1 is nonzero, let its lowest 1 bit be at position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, the byte ends in a single bit of value 0 and k bits of value 1. After step 2, the result is just k bits of value 1: 2^k - 1. After step 3, the result is 0. And no carry is produced. So, if longword1 has only non-zero bytes, tmp is zero. Whereas if longword1 has a zero byte, call j the position of the least significant zero byte. Then the result has a zero at positions 0, ..., j-1 and a 0x80 at position j. We cannot predict the result at the more significant bytes (positions j+1..3), but it does not matter since we already have a non-zero bit at position 8*j+7. So, the test whether any byte in longword1 is zero is equivalent to testing whether tmp is nonzero. */ while (n >= sizeof (longword)) { longword longword1 = *longword_ptr ^ repeated_c; if ((((longword1 - repeated_one) & ~longword1) & (repeated_one << 7)) != 0) break; longword_ptr++; n -= sizeof (longword); } char_ptr = (const unsigned char *) longword_ptr; /* At this point, we know that either n < sizeof (longword), or one of the sizeof (longword) bytes starting at char_ptr is == c. On little-endian machines, we could determine the first such byte without any further memory accesses, just by looking at the tmp result from the last loop iteration. But this does not work on big-endian machines. Choose code that works in both cases. */ for (; n > 0; --n, ++char_ptr) { if (*char_ptr == c) return (void *) char_ptr; } return NULL; } #ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) #endif dico-2.2/gnu/memchr.valgrind000066400000000000000000000006521172612674100161010ustar00rootroot00000000000000# Suppress a valgrind message about use of uninitialized memory in memchr(). # POSIX states that when the character is found, memchr must not read extra # bytes in an overestimated length (for example, where memchr is used to # implement strnlen). However, we use a safe word read to provide a speedup. { memchr-value4 Memcheck:Value4 fun:rpl_memchr } { memchr-value8 Memcheck:Value8 fun:rpl_memchr } dico-2.2/gnu/netdb.in.h000066400000000000000000000177771172612674100147700ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a netdb.h header file for systems lacking it (read: MinGW). Copyright (C) 2008-2011 Free Software Foundation, Inc. Written by Simon Josefsson. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file is supposed to be used on platforms that lack . It is intended to provide definitions and prototypes needed by an application. */ #ifndef _GL_NETDB_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if @HAVE_NETDB_H@ /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_NETDB_H@ #endif #ifndef _GL_NETDB_H #define _GL_NETDB_H /* Get netdb.h definitions such as struct hostent for MinGW. */ #include /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declarations for a platform that lacks , or where it is incomplete. */ #if @GNULIB_GETADDRINFO@ # if !@HAVE_STRUCT_ADDRINFO@ # if !GNULIB_defined_struct_addrinfo /* Structure to contain information about address of a service provider. */ struct addrinfo { int ai_flags; /* Input flags. */ int ai_family; /* Protocol family for socket. */ int ai_socktype; /* Socket type. */ int ai_protocol; /* Protocol for socket. */ socklen_t ai_addrlen; /* Length of socket address. */ struct sockaddr *ai_addr; /* Socket address for socket. */ char *ai_canonname; /* Canonical name for service location. */ struct addrinfo *ai_next; /* Pointer to next in list. */ }; # define GNULIB_defined_struct_addrinfo 1 # endif # endif /* Possible values for `ai_flags' field in `addrinfo' structure. */ # ifndef AI_PASSIVE # define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ # endif # ifndef AI_CANONNAME # define AI_CANONNAME 0x0002 /* Request for canonical name. */ # endif # ifndef AI_NUMERICSERV # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ # endif # if 0 # define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ # endif /* These symbolic constants are required to be present by POSIX, but our getaddrinfo replacement doesn't use them (yet). Setting them to 0 on systems that doesn't have them avoids causing problems for system getaddrinfo implementations that would be confused by unknown values. */ # ifndef AI_V4MAPPED # define AI_V4MAPPED 0 /* 0x0008: IPv4 mapped addresses are acceptable. */ # endif # ifndef AI_ALL # define AI_ALL 0 /* 0x0010: Return IPv4 mapped and IPv6 addresses. */ # endif # ifndef AI_ADDRCONFIG # define AI_ADDRCONFIG 0 /* 0x0020: Use configuration of this host to choose returned address type. */ # endif /* Error values for `getaddrinfo' function. */ # ifndef EAI_BADFLAGS # define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ # define EAI_AGAIN -3 /* Temporary failure in name resolution. */ # define EAI_FAIL -4 /* Non-recoverable failure in name res. */ # define EAI_NODATA -5 /* No address associated with NAME. */ # define EAI_FAMILY -6 /* `ai_family' not supported. */ # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ # endif /* Since EAI_NODATA is deprecated by RFC3493, some systems (at least FreeBSD, which does define EAI_BADFLAGS) have removed the definition in favor of EAI_NONAME. */ # if !defined EAI_NODATA && defined EAI_NONAME # define EAI_NODATA EAI_NONAME # endif # ifndef EAI_OVERFLOW /* Not defined on mingw32 and Haiku. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ # endif # ifndef EAI_ADDRFAMILY /* Not defined on mingw32. */ # define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # endif # ifndef EAI_SYSTEM /* Not defined on mingw32. */ # define EAI_SYSTEM -11 /* System error returned in `errno'. */ # endif # if 0 /* The commented out definitions below are not yet implemented in the GNULIB getaddrinfo() replacement, so are not yet needed. If they are restored, be sure to protect the definitions with #ifndef. */ # ifndef EAI_INPROGRESS # define EAI_INPROGRESS -100 /* Processing request in progress. */ # define EAI_CANCELED -101 /* Request canceled. */ # define EAI_NOTCANCELED -102 /* Request not canceled. */ # define EAI_ALLDONE -103 /* All requests done. */ # define EAI_INTR -104 /* Interrupted by a signal. */ # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ # endif # endif # if !@HAVE_DECL_GETADDRINFO@ /* Translate name of a service location and/or a service name to set of socket addresses. For more details, see the POSIX:2001 specification . */ extern int getaddrinfo (const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict hints, struct addrinfo **restrict res) _GL_ARG_NONNULL ((4)); # endif # if !@HAVE_DECL_FREEADDRINFO@ /* Free `addrinfo' structure AI including associated storage. For more details, see the POSIX:2001 specification . */ extern void freeaddrinfo (struct addrinfo *ai) _GL_ARG_NONNULL ((1)); # endif # if !@HAVE_DECL_GAI_STRERROR@ /* Convert error return from getaddrinfo() to a string. For more details, see the POSIX:2001 specification . */ extern const char *gai_strerror (int ecode); # endif # if !@HAVE_DECL_GETNAMEINFO@ /* Convert socket address to printable node and service names. For more details, see the POSIX:2001 specification . */ extern int getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, char *restrict service, socklen_t servicelen, int flags) _GL_ARG_NONNULL ((1)); # endif /* Possible flags for getnameinfo. */ # ifndef NI_NUMERICHOST # define NI_NUMERICHOST 1 # endif # ifndef NI_NUMERICSERV # define NI_NUMERICSERV 2 # endif #elif defined GNULIB_POSIXCHECK # undef getaddrinfo # if HAVE_RAW_DECL_GETADDRINFO _GL_WARN_ON_USE (getaddrinfo, "getaddrinfo is unportable - " "use gnulib module getaddrinfo for portability"); # endif # undef freeaddrinfo # if HAVE_RAW_DECL_FREEADDRINFO _GL_WARN_ON_USE (freeaddrinfo, "freeaddrinfo is unportable - " "use gnulib module getaddrinfo for portability"); # endif # undef gai_strerror # if HAVE_RAW_DECL_GAI_STRERROR _GL_WARN_ON_USE (gai_strerror, "gai_strerror is unportable - " "use gnulib module getaddrinfo for portability"); # endif # undef getnameinfo # if HAVE_RAW_DECL_GETNAMEINFO _GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - " "use gnulib module getaddrinfo for portability"); # endif #endif #endif /* _GL_NETDB_H */ #endif /* _GL_NETDB_H */ dico-2.2/gnu/nl_langinfo.c000066400000000000000000000151441172612674100155320ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* nl_langinfo() replacement: query locale dependent information. Copyright (C) 2007-2011 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 3 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, see . */ #include /* Specification. */ #include #if REPLACE_NL_LANGINFO /* Override nl_langinfo with support for added nl_item values. */ # include # include # undef nl_langinfo char * rpl_nl_langinfo (nl_item item) { switch (item) { # if GNULIB_defined_CODESET case CODESET: { const char *locale; static char buf[2 + 10 + 1]; locale = setlocale (LC_CTYPE, NULL); if (locale != NULL && locale[0] != '\0') { /* If the locale name contains an encoding after the dot, return it. */ const char *dot = strchr (locale, '.'); if (dot != NULL) { const char *modifier; dot++; /* Look for the possible @... trailer and remove it, if any. */ modifier = strchr (dot, '@'); if (modifier == NULL) return dot; if (modifier - dot < sizeof (buf)) { memcpy (buf, dot, modifier - dot); buf [modifier - dot] = '\0'; return buf; } } } return ""; } # endif # if GNULIB_defined_T_FMT_AMPM case T_FMT_AMPM: return "%I:%M:%S %p"; # endif # if GNULIB_defined_ERA case ERA: /* The format is not standardized. In glibc it is a sequence of strings of the form "direction:offset:start_date:end_date:era_name:era_format" with an empty string at the end. */ return ""; case ERA_D_FMT: /* The %Ex conversion in strftime behaves like %x if the locale does not have an alternative time format. */ item = D_FMT; break; case ERA_D_T_FMT: /* The %Ec conversion in strftime behaves like %c if the locale does not have an alternative time format. */ item = D_T_FMT; break; case ERA_T_FMT: /* The %EX conversion in strftime behaves like %X if the locale does not have an alternative time format. */ item = T_FMT; break; case ALT_DIGITS: /* The format is not standardized. In glibc it is a sequence of 10 strings, appended in memory. */ return "\0\0\0\0\0\0\0\0\0\0"; # endif # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS case YESEXPR: return "^[yY]"; case NOEXPR: return "^[nN]"; # endif default: break; } return nl_langinfo (item); } #else /* Provide nl_langinfo from scratch. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows platforms. */ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # include # else /* An old Unix platform without locales, such as Linux libc5 or BeOS. */ # endif # include char * nl_langinfo (nl_item item) { switch (item) { /* nl_langinfo items of the LC_CTYPE category */ case CODESET: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { static char buf[2 + 10 + 1]; /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); return buf; } # elif defined __BEOS__ return "UTF-8"; # else return "ISO-8859-1"; # endif /* nl_langinfo items of the LC_NUMERIC category */ case RADIXCHAR: return localeconv () ->decimal_point; case THOUSEP: return localeconv () ->thousands_sep; /* nl_langinfo items of the LC_TIME category. TODO: Really use the locale. */ case D_T_FMT: case ERA_D_T_FMT: return "%a %b %e %H:%M:%S %Y"; case D_FMT: case ERA_D_FMT: return "%m/%d/%y"; case T_FMT: case ERA_T_FMT: return "%H:%M:%S"; case T_FMT_AMPM: return "%I:%M:%S %p"; case AM_STR: return "AM"; case PM_STR: return "PM"; case DAY_1: return "Sunday"; case DAY_2: return "Monday"; case DAY_3: return "Tuesday"; case DAY_4: return "Wednesday"; case DAY_5: return "Thursday"; case DAY_6: return "Friday"; case DAY_7: return "Saturday"; case ABDAY_1: return "Sun"; case ABDAY_2: return "Mon"; case ABDAY_3: return "Tue"; case ABDAY_4: return "Wed"; case ABDAY_5: return "Thu"; case ABDAY_6: return "Fri"; case ABDAY_7: return "Sat"; case MON_1: return "January"; case MON_2: return "February"; case MON_3: return "March"; case MON_4: return "April"; case MON_5: return "May"; case MON_6: return "June"; case MON_7: return "July"; case MON_8: return "August"; case MON_9: return "September"; case MON_10: return "October"; case MON_11: return "November"; case MON_12: return "December"; case ABMON_1: return "Jan"; case ABMON_2: return "Feb"; case ABMON_3: return "Mar"; case ABMON_4: return "Apr"; case ABMON_5: return "May"; case ABMON_6: return "Jun"; case ABMON_7: return "Jul"; case ABMON_8: return "Aug"; case ABMON_9: return "Sep"; case ABMON_10: return "Oct"; case ABMON_11: return "Nov"; case ABMON_12: return "Dec"; case ERA: return ""; case ALT_DIGITS: return "\0\0\0\0\0\0\0\0\0\0"; /* nl_langinfo items of the LC_MONETARY category TODO: Really use the locale. */ case CRNCYSTR: return "-"; /* nl_langinfo items of the LC_MESSAGES category TODO: Really use the locale. */ case YESEXPR: return "^[yY]"; case NOEXPR: return "^[nN]"; default: return ""; } } #endif dico-2.2/gnu/obstack.c000066400000000000000000000345321172612674100146740ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* obstack.c - subroutines used implicitly by object stack macros Copyright (C) 1988-1994, 1996-2006, 2009-2011 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 3 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, see . */ #ifdef _LIBC # include # include #else # include # include "obstack.h" #endif /* 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 /* Random thing to get __GNU_LIBRARY__. */ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 # include # if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #include #ifndef ELIDE_CODE # include /* Determine default alignment. */ union fooround { uintmax_t i; long double d; void *p; }; struct fooalign { char c; union fooround u; }; /* 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. */ enum { DEFAULT_ALIGNMENT = offsetof (struct fooalign, u), 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 can be set to a user defined function which should either abort gracefully or use longjump - but shouldn't return. This variable by default points to the internal function `print_and_abort'. */ static void print_and_abort (void); void (*obstack_alloc_failed_handler) (void) = print_and_abort; /* Exit value used when `print_and_abort' is used. */ # include # ifdef _LIBC int obstack_exit_failure = EXIT_FAILURE; # else # include "exitfail.h" # define obstack_exit_failure exit_failure # endif # ifdef _LIBC # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) /* A looong time ago (before 1994, anyway; we're not sure) this global variable was used by non-GNU-C macros to avoid multiple evaluation. The GNU C library still exports it because somebody might use it. */ struct obstack *_obstack_compat; compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); # endif # endif /* 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. */ # 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) /* 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, calls obstack_alloc_failed_handler if allocation fails. */ int _obstack_begin (struct obstack *h, int size, int alignment, void *(*chunkfun) (long), void (*freefun) (void *)) { register struct _obstack_chunk *chunk; /* points to new chunk */ if (alignment == 0) alignment = 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; } h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun; h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; 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 = __PTR_ALIGN ((char *) chunk, chunk->contents, alignment - 1); 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 (struct obstack *h, int size, int alignment, void *(*chunkfun) (void *, long), void (*freefun) (void *, void *), void *arg) { register struct _obstack_chunk *chunk; /* points to new chunk */ if (alignment == 0) alignment = 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; } h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun; h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; 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 = __PTR_ALIGN ((char *) chunk, chunk->contents, alignment - 1); 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 (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; char *object_base; /* Compute size for new chunk. */ new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 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; /* Compute an aligned object_base in the new chunk */ object_base = __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask); /* 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 *)object_base)[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++) object_base[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->maybe_empty_object && (h->object_base == __PTR_ALIGN ((char *) old_chunk, old_chunk->contents, h->alignment_mask))) { new_chunk->prev = old_chunk->prev; CALL_FREEFUN (h, old_chunk); } h->object_base = object_base; h->next_free = h->object_base + obj_size; /* The new chunk certainly contains no empty object yet. */ h->maybe_empty_object = 0; } # ifdef _LIBC libc_hidden_def (_obstack_newchunk) # endif /* 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. */ /* 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, void *obj); int _obstack_allocated_p (struct obstack *h, void *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 && ((void *) lp >= obj || (void *) (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 void __obstack_free (struct obstack *h, void *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 && ((void *) lp >= obj || (void *) (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 (); } # ifdef _LIBC /* Older versions of libc used a function _obstack_free intended to be called by non-GCC compilers. */ strong_alias (obstack_free, _obstack_free) # endif int _obstack_memory_used (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. */ # ifdef _LIBC # include # else # include "gettext.h" # endif # ifndef _ # define _(msgid) gettext (msgid) # endif # ifdef _LIBC # include # endif # ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif # endif static void __attribute__ ((noreturn)) print_and_abort (void) { /* Don't change any of these strings. Yes, it would be possible to add the newline to the string and use fputs or so. But this must not happen because the "memory exhausted" message appears in other places like this and the translation should be reused instead of creating a very similar string which requires a separate translation. */ # ifdef _LIBC (void) __fxprintf (NULL, "%s\n", _("memory exhausted")); # else fprintf (stderr, "%s\n", _("memory exhausted")); # endif exit (obstack_exit_failure); } #endif /* !ELIDE_CODE */ dico-2.2/gnu/obstack.h000066400000000000000000000615021172612674100146760ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* obstack.h - object stack macros Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ /* 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 /* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is defined, as with GNU C, use that; that way we don't pollute the namespace with 's symbols. Otherwise, include and use ptrdiff_t. */ #ifdef __PTRDIFF_TYPE__ # define PTR_INT_TYPE __PTRDIFF_TYPE__ #else # include # define PTR_INT_TYPE ptrdiff_t #endif /* If B is the base of an object addressed by P, return the result of aligning P to the next multiple of A + 1. B and P must be of type char *. A + 1 must be a power of 2. */ #define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A))) /* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case where pointers can be converted to integers, aligned as integers, and converted back again. If PTR_INT_TYPE is narrower than a pointer (e.g., the AS/400), play it safe and compute the alignment relative to B. Otherwise, use the faster strategy of computing the alignment relative to 0. */ #define __PTR_ALIGN(B, P, A) \ __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \ P, A) #include #ifdef __cplusplus extern "C" { #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 */ union { PTR_INT_TYPE tempint; void *tempptr; } temp; /* Temporary for some macros. */ int alignment_mask; /* Mask of alignment for each object. */ /* 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 */ 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. */ extern void _obstack_newchunk (struct obstack *, int); 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 *); /* The default name of the function for freeing a chunk is 'obstack_free', but gnulib users can override this by defining '__obstack_free'. */ #ifndef __obstack_free # define __obstack_free obstack_free #endif extern void __obstack_free (struct obstack *obstack, void *block); /* Error handler called when `obstack_chunk_alloc' failed to allocate more memory. This can be set to a user defined function which should either abort gracefully or use longjump - but shouldn't return. The default action is to print a message and abort. */ extern void (*obstack_alloc_failed_handler) (void); /* 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) ((void *) (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. */ #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)) #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 const *__o = (OBSTACK); \ (unsigned) (__o->next_free - __o->object_base); }) # define obstack_room(OBSTACK) \ __extension__ \ ({ struct obstack const *__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 const *__o = (OBSTACK); \ (__o->chunk->prev == 0 \ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \ __o->chunk->contents, \ __o->alignment_mask)); }) # 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); \ memcpy (__o->next_free, 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); \ memcpy (__o->next_free, 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); \ obstack_1grow_fast (__o, 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 *)); \ obstack_ptr_grow_fast (__o, datum); }) \ # 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)); \ obstack_int_grow_fast (__o, datum); }) # define obstack_ptr_grow_fast(OBSTACK,aptr) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ *(const void **) __o1->next_free = (aptr); \ __o1->next_free += sizeof (const void *); \ (void) 0; }) # define obstack_int_grow_fast(OBSTACK,aint) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ *(int *) __o1->next_free = (aint); \ __o1->next_free += sizeof (int); \ (void) 0; }) # 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); \ obstack_blank_fast (__o, __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 = (void *) __o1->object_base; \ if (__o1->next_free == __value) \ __o1->maybe_empty_object = 1; \ __o1->next_free \ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \ __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 = (char *)__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 == __PTR_ALIGN ((char *) (h)->chunk, \ (h)->chunk->contents, \ (h)->alignment_mask)) /* 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.tempint = (length), \ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0)) # define obstack_grow(h,where,length) \ ( (h)->temp.tempint = (length), \ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ memcpy ((h)->next_free, where, (h)->temp.tempint), \ (h)->next_free += (h)->temp.tempint) # define obstack_grow0(h,where,length) \ ( (h)->temp.tempint = (length), \ (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \ memcpy ((h)->next_free, where, (h)->temp.tempint), \ (h)->next_free += (h)->temp.tempint, \ *((h)->next_free)++ = 0) # define obstack_1grow(h,datum) \ ( (((h)->next_free + 1 > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), 1), 0) : 0), \ obstack_1grow_fast (h, datum)) # define obstack_ptr_grow(h,datum) \ ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ obstack_ptr_grow_fast (h, datum)) # define obstack_int_grow(h,datum) \ ( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ obstack_int_grow_fast (h, datum)) # define obstack_ptr_grow_fast(h,aptr) \ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) # define obstack_int_grow_fast(h,aint) \ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint)) # define obstack_blank(h,length) \ ( (h)->temp.tempint = (length), \ (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ obstack_blank_fast (h, (h)->temp.tempint)) # 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.tempptr = (h)->object_base, \ (h)->next_free \ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \ (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, \ (h)->temp.tempptr) # define obstack_free(h,obj) \ ( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \ ((((h)->temp.tempint > 0 \ && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \ ? (int) ((h)->next_free = (h)->object_base \ = (h)->temp.tempint + (char *) (h)->chunk) \ : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0))) #endif /* not __GNUC__ or not __STDC__ */ #ifdef __cplusplus } /* C++ */ #endif #endif /* obstack.h */ dico-2.2/gnu/offtostr.c000066400000000000000000000002401172612674100151010ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define anytostr offtostr #define inttype off_t #include "anytostr.c" dico-2.2/gnu/printf-args.c000066400000000000000000000150751172612674100155030ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be defined. STATIC Set to 'static' to declare the function static. */ #ifndef PRINTF_FETCHARGS # include #endif /* Specification. */ #ifndef PRINTF_FETCHARGS # include "printf-args.h" #endif #ifdef STATIC STATIC #endif int PRINTF_FETCHARGS (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = va_arg (args, /*signed char*/ int); break; case TYPE_UCHAR: ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); break; case TYPE_SHORT: ap->a.a_short = va_arg (args, /*short*/ int); break; case TYPE_USHORT: ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); break; case TYPE_INT: ap->a.a_int = va_arg (args, int); break; case TYPE_UINT: ap->a.a_uint = va_arg (args, unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = va_arg (args, long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = va_arg (args, unsigned long int); break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: ap->a.a_longlongint = va_arg (args, long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = va_arg (args, unsigned long long int); break; #endif case TYPE_DOUBLE: ap->a.a_double = va_arg (args, double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = va_arg (args, long double); break; case TYPE_CHAR: ap->a.a_char = va_arg (args, int); break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by default argument promotions", this is not the case in mingw32, where wint_t is 'unsigned short'. */ ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? (wint_t) va_arg (args, int) : va_arg (args, wint_t)); break; #endif case TYPE_STRING: ap->a.a_string = va_arg (args, const char *); /* A null pointer is an invalid argument for "%s", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_string == NULL) ap->a.a_string = "(NULL)"; break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: ap->a.a_wide_string = va_arg (args, const wchar_t *); /* A null pointer is an invalid argument for "%ls", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_wide_string == NULL) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; #endif case TYPE_POINTER: ap->a.a_pointer = va_arg (args, void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = va_arg (args, signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = va_arg (args, short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = va_arg (args, int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = va_arg (args, long int *); break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); break; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ case TYPE_U8_STRING: ap->a.a_u8_string = va_arg (args, const uint8_t *); /* A null pointer is an invalid argument for "%U", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u8_string == NULL) { static const uint8_t u8_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u8_string = u8_null_string; } break; case TYPE_U16_STRING: ap->a.a_u16_string = va_arg (args, const uint16_t *); /* A null pointer is an invalid argument for "%lU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u16_string == NULL) { static const uint16_t u16_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u16_string = u16_null_string; } break; case TYPE_U32_STRING: ap->a.a_u32_string = va_arg (args, const uint32_t *); /* A null pointer is an invalid argument for "%llU", but in practice it occurs quite frequently in printf statements that produce debug output. Use a fallback in this case. */ if (ap->a.a_u32_string == NULL) { static const uint32_t u32_null_string[] = { '(', 'N', 'U', 'L', 'L', ')', 0 }; ap->a.a_u32_string = u32_null_string; } break; #endif default: /* Unknown type. */ return -1; } return 0; } dico-2.2/gnu/printf-args.h000066400000000000000000000077711172612674100155140ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Decomposed printf argument list. Copyright (C) 1999, 2002-2003, 2006-2007, 2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. PRINTF_FETCHARGS Name of the function to be declared. STATIC Set to 'static' to declare the function static. */ /* Default parameters. */ #ifndef PRINTF_FETCHARGS # define PRINTF_FETCHARGS printf_fetchargs #endif /* Get size_t. */ #include /* Get wchar_t. */ #if HAVE_WCHAR_T # include #endif /* Get wint_t. */ #if HAVE_WINT_T # include #endif /* Get va_list. */ #include /* Argument types */ typedef enum { TYPE_NONE, TYPE_SCHAR, TYPE_UCHAR, TYPE_SHORT, TYPE_USHORT, TYPE_INT, TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, #if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, TYPE_LONGDOUBLE, TYPE_CHAR, #if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, #if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, TYPE_COUNT_SCHAR_POINTER, TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER #if HAVE_LONG_LONG_INT , TYPE_COUNT_LONGLONGINT_POINTER #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ , TYPE_U8_STRING , TYPE_U16_STRING , TYPE_U32_STRING #endif } arg_type; /* Polymorphic argument */ typedef struct { arg_type type; union { signed char a_schar; unsigned char a_uchar; short a_short; unsigned short a_ushort; int a_int; unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; #if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; long double a_longdouble; int a_char; #if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; #if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; signed char * a_count_schar_pointer; short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; #if HAVE_LONG_LONG_INT long long int * a_count_longlongint_pointer; #endif #if ENABLE_UNISTDIO /* The unistdio extensions. */ const uint8_t * a_u8_string; const uint16_t * a_u16_string; const uint32_t * a_u32_string; #endif } a; } argument; /* Number of directly allocated arguments (no malloc() needed). */ #define N_DIRECT_ALLOC_ARGUMENTS 7 typedef struct { size_t count; argument *arg; argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; } arguments; /* Fetch the arguments, putting them into a. */ #ifdef STATIC STATIC #else extern #endif int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ dico-2.2/gnu/printf-parse.c000066400000000000000000000534311172612674100156570ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Formatted output to strings. Copyright (C) 1999-2000, 2002-2003, 2006-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. DIRECTIVE Structure denoting a format directive. Depends on CHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on CHAR_T. PRINTF_PARSE Function that parses a format string. Depends on CHAR_T. STATIC Set to 'static' to declare the function static. ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ #ifndef PRINTF_PARSE # include #endif /* Specification. */ #ifndef PRINTF_PARSE # include "printf-parse.h" #endif /* Default parameters. */ #ifndef PRINTF_PARSE # define PRINTF_PARSE printf_parse # define CHAR_T char # define DIRECTIVE char_directive # define DIRECTIVES char_directives #endif /* Get size_t, NULL. */ #include /* Get intmax_t. */ #if defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include # endif # if HAVE_INTTYPES_H_WITH_UINTMAX # include # endif #else # include #endif /* malloc(), realloc(), free(). */ #include /* memcpy(). */ #include /* errno. */ #include /* Checked size_t computations. */ #include "xsize.h" #if CHAR_T_ONLY_ASCII /* c_isascii(). */ # include "c-ctype.h" #endif #ifdef STATIC STATIC #endif int PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) { const CHAR_T *cp = format; /* pointer into format */ size_t arg_posn = 0; /* number of regular arguments consumed */ size_t d_allocated; /* allocated elements of d->dir */ size_t a_allocated; /* allocated elements of a->arg */ size_t max_width_length = 0; size_t max_precision_length = 0; d->count = 0; d_allocated = N_DIRECT_ALLOC_DIRECTIVES; d->dir = d->direct_alloc_dir; a->count = 0; a_allocated = N_DIRECT_ALLOC_ARGUMENTS; a->arg = a->direct_alloc_arg; #define REGISTER_ARG(_index_,_type_) \ { \ size_t n = (_index_); \ if (n >= a_allocated) \ { \ size_t memory_size; \ argument *memory; \ \ a_allocated = xtimes (a_allocated, 2); \ if (a_allocated <= n) \ a_allocated = xsum (n, 1); \ memory_size = xtimes (a_allocated, sizeof (argument)); \ if (size_overflow_p (memory_size)) \ /* Overflow, would lead to out of memory. */ \ goto out_of_memory; \ memory = (argument *) (a->arg != a->direct_alloc_arg \ ? realloc (a->arg, memory_size) \ : malloc (memory_size)); \ if (memory == NULL) \ /* Out of memory. */ \ goto out_of_memory; \ if (a->arg == a->direct_alloc_arg) \ memcpy (memory, a->arg, a->count * sizeof (argument)); \ a->arg = memory; \ } \ while (a->count <= n) \ a->arg[a->count++].type = TYPE_NONE; \ if (a->arg[n].type == TYPE_NONE) \ a->arg[n].type = (_type_); \ else if (a->arg[n].type != (_type_)) \ /* Ambiguous type for positional argument. */ \ goto error; \ } while (*cp != '\0') { CHAR_T c = *cp++; if (c == '%') { size_t arg_index = ARG_NONE; DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ /* Initialize the next directive. */ dp->dir_start = cp - 1; dp->flags = 0; dp->width_start = NULL; dp->width_end = NULL; dp->width_arg_index = ARG_NONE; dp->precision_start = NULL; dp->precision_end = NULL; dp->precision_arg_index = ARG_NONE; dp->arg_index = ARG_NONE; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; arg_index = n - 1; cp = np + 1; } } /* Read the flags. */ for (;;) { if (*cp == '\'') { dp->flags |= FLAG_GROUP; cp++; } else if (*cp == '-') { dp->flags |= FLAG_LEFT; cp++; } else if (*cp == '+') { dp->flags |= FLAG_SHOWSIGN; cp++; } else if (*cp == ' ') { dp->flags |= FLAG_SPACE; cp++; } else if (*cp == '#') { dp->flags |= FLAG_ALT; cp++; } else if (*cp == '0') { dp->flags |= FLAG_ZERO; cp++; } #if __GLIBC__ >= 2 && !defined __UCLIBC__ else if (*cp == 'I') { dp->flags |= FLAG_LOCALIZED; cp++; } #endif else break; } /* Parse the field width. */ if (*cp == '*') { dp->width_start = cp; cp++; dp->width_end = cp; if (max_width_length < 1) max_width_length = 1; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->width_arg_index = n - 1; cp = np + 1; } } if (dp->width_arg_index == ARG_NONE) { dp->width_arg_index = arg_posn++; if (dp->width_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->width_arg_index, TYPE_INT); } else if (*cp >= '0' && *cp <= '9') { size_t width_length; dp->width_start = cp; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->width_end = cp; width_length = dp->width_end - dp->width_start; if (max_width_length < width_length) max_width_length = width_length; } /* Parse the precision. */ if (*cp == '.') { cp++; if (*cp == '*') { dp->precision_start = cp - 1; cp++; dp->precision_end = cp; if (max_precision_length < 2) max_precision_length = 2; /* Test for positional argument. */ if (*cp >= '0' && *cp <= '9') { const CHAR_T *np; for (np = cp; *np >= '0' && *np <= '9'; np++) ; if (*np == '$') { size_t n = 0; for (np = cp; *np >= '0' && *np <= '9'; np++) n = xsum (xtimes (n, 10), *np - '0'); if (n == 0) /* Positional argument 0. */ goto error; if (size_overflow_p (n)) /* n too large, would lead to out of memory later. */ goto error; dp->precision_arg_index = n - 1; cp = np + 1; } } if (dp->precision_arg_index == ARG_NONE) { dp->precision_arg_index = arg_posn++; if (dp->precision_arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->precision_arg_index, TYPE_INT); } else { size_t precision_length; dp->precision_start = cp - 1; for (; *cp >= '0' && *cp <= '9'; cp++) ; dp->precision_end = cp; precision_length = dp->precision_end - dp->precision_start; if (max_precision_length < precision_length) max_precision_length = precision_length; } } { arg_type type; /* Parse argument type/size specifiers. */ { int flags = 0; for (;;) { if (*cp == 'h') { flags |= (1 << (flags & 1)); cp++; } else if (*cp == 'L') { flags |= 4; cp++; } else if (*cp == 'l') { flags += 8; cp++; } else if (*cp == 'j') { if (sizeof (intmax_t) > sizeof (long)) { /* intmax_t = long long */ flags += 16; } else if (sizeof (intmax_t) > sizeof (int)) { /* intmax_t = long */ flags += 8; } cp++; } else if (*cp == 'z' || *cp == 'Z') { /* 'z' is standardized in ISO C 99, but glibc uses 'Z' because the warning facility in gcc-2.95.2 understands only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ if (sizeof (size_t) > sizeof (long)) { /* size_t = long long */ flags += 16; } else if (sizeof (size_t) > sizeof (int)) { /* size_t = long */ flags += 8; } cp++; } else if (*cp == 't') { if (sizeof (ptrdiff_t) > sizeof (long)) { /* ptrdiff_t = long long */ flags += 16; } else if (sizeof (ptrdiff_t) > sizeof (int)) { /* ptrdiff_t = long */ flags += 8; } cp++; } #if defined __APPLE__ && defined __MACH__ /* On MacOS X 10.3, PRIdMAX is defined as "qd". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'q') { if (64 / 8 > sizeof (long)) { /* int64_t = long long */ flags += 16; } else { /* int64_t = long */ flags += 8; } cp++; } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Win32, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') { if (64 / 8 > sizeof (long)) { /* __int64 = long long */ flags += 16; } else { /* __int64 = long */ flags += 8; } cp += 3; } #endif else break; } /* Read the conversion character. */ c = *cp++; switch (c) { case 'd': case 'i': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else #endif /* If 'long long' exists and is the same as 'long', we parse "lld" into TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) type = TYPE_SCHAR; else if (flags & 1) type = TYPE_SHORT; else type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else #endif /* If 'unsigned long long' exists and is the same as 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) type = TYPE_UCHAR; else if (flags & 1) type = TYPE_USHORT; else type = TYPE_UINT; break; case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': if (flags >= 16 || (flags & 4)) type = TYPE_LONGDOUBLE; else type = TYPE_DOUBLE; break; case 'c': if (flags >= 8) #if HAVE_WINT_T type = TYPE_WIDE_CHAR; #else goto error; #endif else type = TYPE_CHAR; break; #if HAVE_WINT_T case 'C': type = TYPE_WIDE_CHAR; c = 'c'; break; #endif case 's': if (flags >= 8) #if HAVE_WCHAR_T type = TYPE_WIDE_STRING; #else goto error; #endif else type = TYPE_STRING; break; #if HAVE_WCHAR_T case 'S': type = TYPE_WIDE_STRING; c = 's'; break; #endif case 'p': type = TYPE_POINTER; break; case 'n': #if HAVE_LONG_LONG_INT /* If 'long long' exists and is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else #endif /* If 'long long' exists and is the same as 'long', we parse "lln" into TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) type = TYPE_COUNT_SCHAR_POINTER; else if (flags & 1) type = TYPE_COUNT_SHORT_POINTER; else type = TYPE_COUNT_INT_POINTER; break; #if ENABLE_UNISTDIO /* The unistdio extensions. */ case 'U': if (flags >= 16) type = TYPE_U32_STRING; else if (flags >= 8) type = TYPE_U16_STRING; else type = TYPE_U8_STRING; break; #endif case '%': type = TYPE_NONE; break; default: /* Unknown conversion character. */ goto error; } } if (type != TYPE_NONE) { dp->arg_index = arg_index; if (dp->arg_index == ARG_NONE) { dp->arg_index = arg_posn++; if (dp->arg_index == ARG_NONE) /* arg_posn wrapped around. */ goto error; } REGISTER_ARG (dp->arg_index, type); } dp->conversion = c; dp->dir_end = cp; } d->count++; if (d->count >= d_allocated) { size_t memory_size; DIRECTIVE *memory; d_allocated = xtimes (d_allocated, 2); memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); if (size_overflow_p (memory_size)) /* Overflow, would lead to out of memory. */ goto out_of_memory; memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir ? realloc (d->dir, memory_size) : malloc (memory_size)); if (memory == NULL) /* Out of memory. */ goto out_of_memory; if (d->dir == d->direct_alloc_dir) memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); d->dir = memory; } } #if CHAR_T_ONLY_ASCII else if (!c_isascii (c)) { /* Non-ASCII character. Not supported. */ goto error; } #endif } d->dir[d->count].dir_start = cp; d->max_width_length = max_width_length; d->max_precision_length = max_precision_length; return 0; error: if (a->arg != a->direct_alloc_arg) free (a->arg); if (d->dir != d->direct_alloc_dir) free (d->dir); errno = EINVAL; return -1; out_of_memory: if (a->arg != a->direct_alloc_arg) free (a->arg); if (d->dir != d->direct_alloc_dir) free (d->dir); errno = ENOMEM; return -1; } #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef CHAR_T_ONLY_ASCII #undef CHAR_T dico-2.2/gnu/printf-parse.h000066400000000000000000000124261172612674100156630ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Parse printf format string. Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H /* This file can be parametrized with the following macros: ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. STATIC Set to 'static' to declare the function static. */ #if HAVE_FEATURES_H # include /* for __GLIBC__, __UCLIBC__ */ #endif #include "printf-args.h" /* Flags */ #define FLAG_GROUP 1 /* ' flag */ #define FLAG_LEFT 2 /* - flag */ #define FLAG_SHOWSIGN 4 /* + flag */ #define FLAG_SPACE 8 /* space flag */ #define FLAG_ALT 16 /* # flag */ #define FLAG_ZERO 32 #if __GLIBC__ >= 2 && !defined __UCLIBC__ # define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ #endif /* arg_index value indicating that no argument is consumed. */ #define ARG_NONE (~(size_t)0) /* xxx_directive: A parsed directive. xxx_directives: A parsed format string. */ /* Number of directly allocated directives (no malloc() needed). */ #define N_DIRECT_ALLOC_DIRECTIVES 7 /* A parsed directive. */ typedef struct { const char* dir_start; const char* dir_end; int flags; const char* width_start; const char* width_end; size_t width_arg_index; const char* precision_start; const char* precision_end; size_t precision_arg_index; char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } char_directive; /* A parsed format string. */ typedef struct { size_t count; char_directive *dir; size_t max_width_length; size_t max_precision_length; char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } char_directives; #if ENABLE_UNISTDIO /* A parsed directive. */ typedef struct { const uint8_t* dir_start; const uint8_t* dir_end; int flags; const uint8_t* width_start; const uint8_t* width_end; size_t width_arg_index; const uint8_t* precision_start; const uint8_t* precision_end; size_t precision_arg_index; uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u8_directive; /* A parsed format string. */ typedef struct { size_t count; u8_directive *dir; size_t max_width_length; size_t max_precision_length; u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u8_directives; /* A parsed directive. */ typedef struct { const uint16_t* dir_start; const uint16_t* dir_end; int flags; const uint16_t* width_start; const uint16_t* width_end; size_t width_arg_index; const uint16_t* precision_start; const uint16_t* precision_end; size_t precision_arg_index; uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u16_directive; /* A parsed format string. */ typedef struct { size_t count; u16_directive *dir; size_t max_width_length; size_t max_precision_length; u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u16_directives; /* A parsed directive. */ typedef struct { const uint32_t* dir_start; const uint32_t* dir_end; int flags; const uint32_t* width_start; const uint32_t* width_end; size_t width_arg_index; const uint32_t* precision_start; const uint32_t* precision_end; size_t precision_arg_index; uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ size_t arg_index; } u32_directive; /* A parsed format string. */ typedef struct { size_t count; u32_directive *dir; size_t max_width_length; size_t max_precision_length; u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; } u32_directives; #endif /* Parses the format string. Fills in the number N of directives, and fills in directives[0], ..., directives[N-1], and sets directives[N].dir_start to the end of the format string. Also fills in the arg_type fields of the arguments and the needed count of arguments. */ #if ENABLE_UNISTDIO extern int ulc_printf_parse (const char *format, char_directives *d, arguments *a); extern int u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); extern int u16_printf_parse (const uint16_t *format, u16_directives *d, arguments *a); extern int u32_printf_parse (const uint32_t *format, u32_directives *d, arguments *a); #else # ifdef STATIC STATIC # else extern # endif int printf_parse (const char *format, char_directives *d, arguments *a); #endif #endif /* _PRINTF_PARSE_H */ dico-2.2/gnu/quote.c000066400000000000000000000025301172612674100143740ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* quote.c - quote arguments for output Copyright (C) 1998-2001, 2003, 2005-2006, 2009-2011 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 3 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, see . */ /* Written by Paul Eggert */ #include #include "quotearg.h" #include "quote.h" /* Return an unambiguous printable representation of NAME, allocated in slot N, suitable for diagnostics. */ char const * quote_n (int n, char const *name) { return quotearg_n_style (n, locale_quoting_style, name); } /* Return an unambiguous printable representation of NAME, suitable for diagnostics. */ char const * quote (char const *name) { return quote_n (0, name); } dico-2.2/gnu/quote.h000066400000000000000000000016501172612674100144030ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* quote.h - prototypes for quote.c Copyright (C) 1998-2001, 2003, 2009-2011 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 3 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, see . */ char const *quote_n (int n, char const *name); char const *quote (char const *name); dico-2.2/gnu/quotearg.c000066400000000000000000000703541172612674100150770ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* quotearg.c - quote arguments for output Copyright (C) 1998-2002, 2004-2011 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 3 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, see . */ /* Written by Paul Eggert */ #include #include "quotearg.h" #include "xalloc.h" #include #include #include #include #include #include #include #include #include "gettext.h" #define _(msgid) gettext (msgid) #define N_(msgid) msgid #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #define INT_BITS (sizeof (int) * CHAR_BIT) struct quoting_options { /* Basic quoting style. */ enum quoting_style style; /* Additional flags. Bitwise combination of enum quoting_flags. */ int flags; /* Quote the characters indicated by this bit vector even if the quoting style would not normally require them to be quoted. */ unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1]; /* The left quote for custom_quoting_style. */ char const *left_quote; /* The right quote for custom_quoting_style. */ char const *right_quote; }; /* Names of quoting styles. */ char const *const quoting_style_args[] = { "literal", "shell", "shell-always", "c", "c-maybe", "escape", "locale", "clocale", 0 }; /* Correspondences to quoting style names. */ enum quoting_style const quoting_style_vals[] = { literal_quoting_style, shell_quoting_style, shell_always_quoting_style, c_quoting_style, c_maybe_quoting_style, escape_quoting_style, locale_quoting_style, clocale_quoting_style }; /* The default quoting options. */ static struct quoting_options default_quoting_options; /* Allocate a new set of quoting options, with contents initially identical to O if O is not null, or to the default if O is null. It is the caller's responsibility to free the result. */ struct quoting_options * clone_quoting_options (struct quoting_options *o) { int e = errno; struct quoting_options *p = xmemdup (o ? o : &default_quoting_options, sizeof *o); errno = e; return p; } /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options *o) { return (o ? o : &default_quoting_options)->style; } /* In O (or in the default if O is null), set the value of the quoting style to S. */ void set_quoting_style (struct quoting_options *o, enum quoting_style s) { (o ? o : &default_quoting_options)->style = s; } /* In O (or in the default if O is null), set the value of the quoting options for character C to I. Return the old value. Currently, the only values defined for I are 0 (the default) and 1 (which means to quote the character even if it would not otherwise be quoted). */ int set_char_quoting (struct quoting_options *o, char c, int i) { unsigned char uc = c; unsigned int *p = (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS; int shift = uc % INT_BITS; int r = (*p >> shift) & 1; *p ^= ((i & 1) ^ r) << shift; return r; } /* In O (or in the default if O is null), set the value of the quoting options flag to I, which can be a bitwise combination of enum quoting_flags, or 0 for default behavior. Return the old value. */ int set_quoting_flags (struct quoting_options *o, int i) { int r; if (!o) o = &default_quoting_options; r = o->flags; o->flags = i; return r; } void set_custom_quoting (struct quoting_options *o, char const *left_quote, char const *right_quote) { if (!o) o = &default_quoting_options; o->style = custom_quoting_style; if (!left_quote || !right_quote) abort (); o->left_quote = left_quote; o->right_quote = right_quote; } /* Return quoting options for STYLE, with no extra quoting. */ static struct quoting_options quoting_options_from_style (enum quoting_style style) { struct quoting_options o; o.style = style; o.flags = 0; memset (o.quote_these_too, 0, sizeof o.quote_these_too); return o; } /* MSGID approximates a quotation mark. Return its translation if it has one; otherwise, return either it or "\"", depending on S. */ static char const * gettext_quote (char const *msgid, enum quoting_style s) { char const *translation = _(msgid); if (translation == msgid && s == clocale_quoting_style) translation = "\""; return translation; } /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and QUOTE_THESE_TOO to control quoting. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG, ARGSIZE, O), except it breaks O into its component pieces and is not careful about errno. */ static size_t quotearg_buffer_restyled (char *buffer, size_t buffersize, char const *arg, size_t argsize, enum quoting_style quoting_style, int flags, unsigned int const *quote_these_too, char const *left_quote, char const *right_quote) { size_t i; size_t len = 0; char const *quote_string = 0; size_t quote_string_len = 0; bool backslash_escapes = false; bool unibyte_locale = MB_CUR_MAX == 1; bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0; #define STORE(c) \ do \ { \ if (len < buffersize) \ buffer[len] = (c); \ len++; \ } \ while (0) switch (quoting_style) { case c_maybe_quoting_style: quoting_style = c_quoting_style; elide_outer_quotes = true; /* Fall through. */ case c_quoting_style: if (!elide_outer_quotes) STORE ('"'); backslash_escapes = true; quote_string = "\""; quote_string_len = 1; break; case escape_quoting_style: backslash_escapes = true; elide_outer_quotes = false; break; case locale_quoting_style: case clocale_quoting_style: case custom_quoting_style: { if (quoting_style != custom_quoting_style) { /* TRANSLATORS: Get translations for open and closing quotation marks. The message catalog should translate "`" to a left quotation mark suitable for the locale, and similarly for "'". If the catalog has no translation, locale_quoting_style quotes `like this', and clocale_quoting_style quotes "like this". For example, an American English Unicode locale should translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and should translate "'" to U+201D (RIGHT DOUBLE QUOTATION MARK). A British English Unicode locale should instead translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and U+2019 (RIGHT SINGLE QUOTATION MARK), respectively. If you don't know what to put here, please see and use glyphs suitable for your language. */ left_quote = gettext_quote (N_("`"), quoting_style); right_quote = gettext_quote (N_("'"), quoting_style); } if (!elide_outer_quotes) for (quote_string = left_quote; *quote_string; quote_string++) STORE (*quote_string); backslash_escapes = true; quote_string = right_quote; quote_string_len = strlen (quote_string); } break; case shell_quoting_style: quoting_style = shell_always_quoting_style; elide_outer_quotes = true; /* Fall through. */ case shell_always_quoting_style: if (!elide_outer_quotes) STORE ('\''); quote_string = "'"; quote_string_len = 1; break; case literal_quoting_style: elide_outer_quotes = false; break; default: abort (); } for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++) { unsigned char c; unsigned char esc; bool is_right_quote = false; if (backslash_escapes && quote_string_len && i + quote_string_len <= argsize && memcmp (arg + i, quote_string, quote_string_len) == 0) { if (elide_outer_quotes) goto force_outer_quoting_style; is_right_quote = true; } c = arg[i]; switch (c) { case '\0': if (backslash_escapes) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); /* If quote_string were to begin with digits, we'd need to test for the end of the arg as well. However, it's hard to imagine any locale that would use digits in quotes, and set_custom_quoting is documented not to accept them. */ if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9') { STORE ('0'); STORE ('0'); } c = '0'; /* We don't have to worry that this last '0' will be backslash-escaped because, again, quote_string should not start with it and because quote_these_too is documented as not accepting it. */ } else if (flags & QA_ELIDE_NULL_BYTES) continue; break; case '?': switch (quoting_style) { case shell_always_quoting_style: if (elide_outer_quotes) goto force_outer_quoting_style; break; case c_quoting_style: if ((flags & QA_SPLIT_TRIGRAPHS) && i + 2 < argsize && arg[i + 1] == '?') switch (arg[i + 2]) { case '!': case '\'': case '(': case ')': case '-': case '/': case '<': case '=': case '>': /* Escape the second '?' in what would otherwise be a trigraph. */ if (elide_outer_quotes) goto force_outer_quoting_style; c = arg[i + 2]; i += 2; STORE ('?'); STORE ('"'); STORE ('"'); STORE ('?'); break; default: break; } break; default: break; } break; case '\a': esc = 'a'; goto c_escape; case '\b': esc = 'b'; goto c_escape; case '\f': esc = 'f'; goto c_escape; case '\n': esc = 'n'; goto c_and_shell_escape; case '\r': esc = 'r'; goto c_and_shell_escape; case '\t': esc = 't'; goto c_and_shell_escape; case '\v': esc = 'v'; goto c_escape; case '\\': esc = c; /* No need to escape the escape if we are trying to elide outer quotes and nothing else is problematic. */ if (backslash_escapes && elide_outer_quotes && quote_string_len) goto store_c; c_and_shell_escape: if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; /* Fall through. */ c_escape: if (backslash_escapes) { c = esc; goto store_escape; } break; case '{': case '}': /* sometimes special if isolated */ if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1)) break; /* Fall through. */ case '#': case '~': if (i != 0) break; /* Fall through. */ case ' ': case '!': /* special in bash */ case '"': case '$': case '&': case '(': case ')': case '*': case ';': case '<': case '=': /* sometimes special in 0th or (with "set -k") later args */ case '>': case '[': case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */ case '`': case '|': /* A shell special character. In theory, '$' and '`' could be the first bytes of multibyte characters, which means we should check them with mbrtowc, but in practice this doesn't happen so it's not worth worrying about. */ if (quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; break; case '\'': if (quoting_style == shell_always_quoting_style) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\''); STORE ('\\'); STORE ('\''); } break; case '%': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': 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 ']': 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': /* These characters don't cause problems, no matter what the quoting style is. They cannot start multibyte sequences. A digit or a special letter would cause trouble if it appeared at the beginning of quote_string because we'd then escape by prepending a backslash. However, it's hard to imagine any locale that would use digits or letters as quotes, and set_custom_quoting is documented not to accept them. Also, a digit or a special letter would cause trouble if it appeared in quote_these_too, but that's also documented as not accepting them. */ break; default: /* If we have a multibyte sequence, copy it until we reach its end, find an error, or come back to the initial shift state. For C-like styles, if the sequence has unprintable characters, escape the whole sequence, since we can't easily escape single characters within it. */ { /* Length of multibyte sequence found so far. */ size_t m; bool printable; if (unibyte_locale) { m = 1; printable = isprint (c) != 0; } else { mbstate_t mbstate; memset (&mbstate, 0, sizeof mbstate); m = 0; printable = true; if (argsize == SIZE_MAX) argsize = strlen (arg); do { wchar_t w; size_t bytes = mbrtowc (&w, &arg[i + m], argsize - (i + m), &mbstate); if (bytes == 0) break; else if (bytes == (size_t) -1) { printable = false; break; } else if (bytes == (size_t) -2) { printable = false; while (i + m < argsize && arg[i + m]) m++; break; } else { /* Work around a bug with older shells that "see" a '\' that is really the 2nd byte of a multibyte character. In practice the problem is limited to ASCII chars >= '@' that are shell special chars. */ if ('[' == 0x5b && elide_outer_quotes && quoting_style == shell_always_quoting_style) { size_t j; for (j = 1; j < bytes; j++) switch (arg[i + m + j]) { case '[': case '\\': case '^': case '`': case '|': goto force_outer_quoting_style; default: break; } } if (! iswprint (w)) printable = false; m += bytes; } } while (! mbsinit (&mbstate)); } if (1 < m || (backslash_escapes && ! printable)) { /* Output a multibyte sequence, or an escaped unprintable unibyte character. */ size_t ilim = i + m; for (;;) { if (backslash_escapes && ! printable) { if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); STORE ('0' + (c >> 6)); STORE ('0' + ((c >> 3) & 7)); c = '0' + (c & 7); } else if (is_right_quote) { STORE ('\\'); is_right_quote = false; } if (ilim <= i + 1) break; STORE (c); c = arg[++i]; } goto store_c; } } } if (! ((backslash_escapes || elide_outer_quotes) && quote_these_too && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))) && !is_right_quote) goto store_c; store_escape: if (elide_outer_quotes) goto force_outer_quoting_style; STORE ('\\'); store_c: STORE (c); } if (len == 0 && quoting_style == shell_always_quoting_style && elide_outer_quotes) goto force_outer_quoting_style; if (quote_string && !elide_outer_quotes) for (; *quote_string; quote_string++) STORE (*quote_string); if (len < buffersize) buffer[len] = '\0'; return len; force_outer_quoting_style: /* Don't reuse quote_these_too, since the addition of outer quotes sufficiently quotes the specified characters. */ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, quoting_style, flags & ~QA_ELIDE_OUTER_QUOTES, NULL, left_quote, right_quote); } /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using O to control quoting. If O is null, use the default. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. */ size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = errno; size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, p->style, p->flags, p->quote_these_too, p->left_quote, p->right_quote); errno = e; return r; } /* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */ char * quotearg_alloc (char const *arg, size_t argsize, struct quoting_options const *o) { return quotearg_alloc_mem (arg, argsize, NULL, o); } /* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly allocated storage containing the quoted string, and store the resulting size into *SIZE, if non-NULL. The result can contain embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not NULL, and set_quoting_flags has not set the null byte elision flag. */ char * quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = errno; /* Elide embedded null bytes if we can't return a size. */ int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES); size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style, flags, p->quote_these_too, p->left_quote, p->right_quote) + 1; char *buf = xcharalloc (bufsize); quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags, p->quote_these_too, p->left_quote, p->right_quote); errno = e; if (size) *size = bufsize - 1; return buf; } /* A storage slot with size and pointer to a value. */ struct slotvec { size_t size; char *val; }; /* Preallocate a slot 0 buffer, so that the caller can always quote one small component of a "memory exhausted" message in slot 0. */ static char slot0[256]; static unsigned int nslots = 1; static struct slotvec slotvec0 = {sizeof slot0, slot0}; static struct slotvec *slotvec = &slotvec0; void quotearg_free (void) { struct slotvec *sv = slotvec; unsigned int i; for (i = 1; i < nslots; i++) free (sv[i].val); if (sv[0].val != slot0) { free (sv[0].val); slotvec0.size = sizeof slot0; slotvec0.val = slot0; } if (sv != &slotvec0) { free (sv); slotvec = &slotvec0; } nslots = 1; } /* Use storage slot N to return a quoted version of argument ARG. ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a null-terminated string. OPTIONS specifies the quoting options. The returned value points to static storage that can be reused by the next call to this function with the same value of N. N must be nonnegative. N is deliberately declared with type "int" to allow for future extensions (using negative values). */ static char * quotearg_n_options (int n, char const *arg, size_t argsize, struct quoting_options const *options) { int e = errno; unsigned int n0 = n; struct slotvec *sv = slotvec; if (n < 0) abort (); if (nslots <= n0) { /* FIXME: technically, the type of n1 should be `unsigned int', but that evokes an unsuppressible warning from gcc-4.0.1 and older. If gcc ever provides an option to suppress that warning, revert to the original type, so that the test in xalloc_oversized is once again performed only at compile time. */ size_t n1 = n0 + 1; bool preallocated = (sv == &slotvec0); if (xalloc_oversized (n1, sizeof *sv)) xalloc_die (); slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv); if (preallocated) *sv = slotvec0; memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv); nslots = n1; } { size_t size = sv[n].size; char *val = sv[n].val; /* Elide embedded null bytes since we don't return a size. */ int flags = options->flags | QA_ELIDE_NULL_BYTES; size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize, options->style, flags, options->quote_these_too, options->left_quote, options->right_quote); if (size <= qsize) { sv[n].size = size = qsize + 1; if (val != slot0) free (val); sv[n].val = val = xcharalloc (size); quotearg_buffer_restyled (val, size, arg, argsize, options->style, flags, options->quote_these_too, options->left_quote, options->right_quote); } errno = e; return val; } } char * quotearg_n (int n, char const *arg) { return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options); } char * quotearg_n_mem (int n, char const *arg, size_t argsize) { return quotearg_n_options (n, arg, argsize, &default_quoting_options); } char * quotearg (char const *arg) { return quotearg_n (0, arg); } char * quotearg_mem (char const *arg, size_t argsize) { return quotearg_n_mem (0, arg, argsize); } char * quotearg_n_style (int n, enum quoting_style s, char const *arg) { struct quoting_options const o = quoting_options_from_style (s); return quotearg_n_options (n, arg, SIZE_MAX, &o); } char * quotearg_n_style_mem (int n, enum quoting_style s, char const *arg, size_t argsize) { struct quoting_options const o = quoting_options_from_style (s); return quotearg_n_options (n, arg, argsize, &o); } char * quotearg_style (enum quoting_style s, char const *arg) { return quotearg_n_style (0, s, arg); } char * quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize) { return quotearg_n_style_mem (0, s, arg, argsize); } char * quotearg_char_mem (char const *arg, size_t argsize, char ch) { struct quoting_options options; options = default_quoting_options; set_char_quoting (&options, ch, 1); return quotearg_n_options (0, arg, argsize, &options); } char * quotearg_char (char const *arg, char ch) { return quotearg_char_mem (arg, SIZE_MAX, ch); } char * quotearg_colon (char const *arg) { return quotearg_char (arg, ':'); } char * quotearg_colon_mem (char const *arg, size_t argsize) { return quotearg_char_mem (arg, argsize, ':'); } char * quotearg_n_custom (int n, char const *left_quote, char const *right_quote, char const *arg) { return quotearg_n_custom_mem (n, left_quote, right_quote, arg, SIZE_MAX); } char * quotearg_n_custom_mem (int n, char const *left_quote, char const *right_quote, char const *arg, size_t argsize) { struct quoting_options o = default_quoting_options; set_custom_quoting (&o, left_quote, right_quote); return quotearg_n_options (n, arg, argsize, &o); } char * quotearg_custom (char const *left_quote, char const *right_quote, char const *arg) { return quotearg_n_custom (0, left_quote, right_quote, arg); } char * quotearg_custom_mem (char const *left_quote, char const *right_quote, char const *arg, size_t argsize) { return quotearg_n_custom_mem (0, left_quote, right_quote, arg, argsize); } dico-2.2/gnu/quotearg.h000066400000000000000000000371011172612674100150750ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* quotearg.h - quote arguments for output Copyright (C) 1998-2002, 2004, 2006, 2008-2011 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 3 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, see . */ /* Written by Paul Eggert */ #ifndef QUOTEARG_H_ # define QUOTEARG_H_ 1 # include /* Basic quoting styles. For each style, an example is given on the input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that style and the default flags and quoted characters. Note that the examples are shown here as valid C strings rather than what displays on a terminal (with "??/" as a trigraph for "\\"). */ enum quoting_style { /* Output names as-is (ls --quoting-style=literal). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. quotearg_buffer: "simple", "\0 \t\n'\"\033??/\\", "a:b" quotearg: "simple", " \t\n'\"\033??/\\", "a:b" quotearg_colon: "simple", " \t\n'\"\033??/\\", "a:b" */ literal_quoting_style, /* Quote names for the shell if they contain shell metacharacters or would cause ambiguous output (ls --quoting-style=shell). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. quotearg_buffer: "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b" quotearg: "simple", "' \t\n'\\''\"\033??/\\'", "a:b" quotearg_colon: "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'" */ shell_quoting_style, /* Quote names for the shell, even if they would normally not require quoting (ls --quoting-style=shell-always). Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect. quotearg_buffer: "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'" quotearg: "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" quotearg_colon: "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" */ shell_always_quoting_style, /* Quote names as for a C language string (ls --quoting-style=c). Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect. Split into consecutive strings if QA_SPLIT_TRIGRAPHS. quotearg_buffer: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg_colon: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" */ c_quoting_style, /* Like c_quoting_style except omit the surrounding double-quote characters if no quoted characters are encountered. quotearg_buffer: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" quotearg: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" quotearg_colon: "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" */ c_maybe_quoting_style, /* Like c_quoting_style except always omit the surrounding double-quote characters and ignore QA_SPLIT_TRIGRAPHS (ls --quoting-style=escape). quotearg_buffer: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" quotearg: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" quotearg_colon: "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b" */ escape_quoting_style, /* Like clocale_quoting_style, but quote `like this' instead of "like this" in the default C locale (ls --quoting-style=locale). LC_MESSAGES=C quotearg_buffer: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" quotearg: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" quotearg_colon: "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'" LC_MESSAGES=pt_PT.utf8 quotearg_buffer: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg_colon: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" */ locale_quoting_style, /* Like c_quoting_style except use quotation marks appropriate for the locale and ignore QA_SPLIT_TRIGRAPHS (ls --quoting-style=clocale). LC_MESSAGES=C quotearg_buffer: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" quotearg_colon: "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" LC_MESSAGES=pt_PT.utf8 quotearg_buffer: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" quotearg_colon: "\302\253simple\302\273", "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" */ clocale_quoting_style, /* Like clocale_quoting_style except use the custom quotation marks set by set_custom_quoting. If custom quotation marks are not set, the behavior is undefined. left_quote = right_quote = "'" quotearg_buffer: "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" quotearg: "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" quotearg_colon: "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a\\:b'" left_quote = "(" and right_quote = ")" quotearg_buffer: "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" quotearg: "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" quotearg_colon: "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a\\:b)" left_quote = ":" and right_quote = " " quotearg_buffer: ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " quotearg: ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " quotearg_colon: ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a\\:b " left_quote = "\"'" and right_quote = "'\"" Notice that this is treated as a single level of quotes or two levels where the outer quote need not be escaped within the inner quotes. For two levels where the outer quote must be escaped within the inner quotes, you must use separate quotearg invocations. quotearg_buffer: "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" quotearg: "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" quotearg_colon: "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a\\:b'\"" */ custom_quoting_style }; /* Flags for use in set_quoting_flags. */ enum quoting_flags { /* Always elide null bytes from styles that do not quote them, even when the length of the result is available to the caller. */ QA_ELIDE_NULL_BYTES = 0x01, /* Omit the surrounding quote characters if no escaped characters are encountered. Note that if no other character needs escaping, then neither does the escape character. */ QA_ELIDE_OUTER_QUOTES = 0x02, /* In the c_quoting_style and c_maybe_quoting_style, split ANSI trigraph sequences into concatenated strings (for example, "?""?/" rather than "??/", which could be confused with "\\"). */ QA_SPLIT_TRIGRAPHS = 0x04 }; /* For now, --quoting-style=literal is the default, but this may change. */ # ifndef DEFAULT_QUOTING_STYLE # define DEFAULT_QUOTING_STYLE literal_quoting_style # endif /* Names of quoting styles and their corresponding values. */ extern char const *const quoting_style_args[]; extern enum quoting_style const quoting_style_vals[]; struct quoting_options; /* The functions listed below set and use a hidden variable that contains the default quoting style options. */ /* Allocate a new set of quoting options, with contents initially identical to O if O is not null, or to the default if O is null. It is the caller's responsibility to free the result. */ struct quoting_options *clone_quoting_options (struct quoting_options *o); /* Get the value of O's quoting style. If O is null, use the default. */ enum quoting_style get_quoting_style (struct quoting_options *o); /* In O (or in the default if O is null), set the value of the quoting style to S. */ void set_quoting_style (struct quoting_options *o, enum quoting_style s); /* In O (or in the default if O is null), set the value of the quoting options for character C to I. Return the old value. Currently, the only values defined for I are 0 (the default) and 1 (which means to quote the character even if it would not otherwise be quoted). C must never be a digit or a letter that has special meaning after a backslash (for example, "\t" for tab). */ int set_char_quoting (struct quoting_options *o, char c, int i); /* In O (or in the default if O is null), set the value of the quoting options flag to I, which can be a bitwise combination of enum quoting_flags, or 0 for default behavior. Return the old value. */ int set_quoting_flags (struct quoting_options *o, int i); /* In O (or in the default if O is null), set the value of the quoting style to custom_quoting_style, set the left quote to LEFT_QUOTE, and set the right quote to RIGHT_QUOTE. Each of LEFT_QUOTE and RIGHT_QUOTE must be null-terminated and can be the empty string. Because backslashes are used for escaping, it does not make sense for RIGHT_QUOTE to contain a backslash. RIGHT_QUOTE must not begin with a digit or a letter that has special meaning after a backslash (for example, "\t" for tab). */ void set_custom_quoting (struct quoting_options *o, char const *left_quote, char const *right_quote); /* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of argument ARG (of size ARGSIZE), using O to control quoting. If O is null, use the default. Terminate the output with a null character, and return the written size of the output, not counting the terminating null. If BUFFERSIZE is too small to store the output string, return the value that would have been returned had BUFFERSIZE been large enough. If ARGSIZE is -1, use the string length of the argument for ARGSIZE. On output, BUFFER might contain embedded null bytes if ARGSIZE was not -1, the style of O does not use backslash escapes, and the flags of O do not request elision of null bytes.*/ size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o); /* Like quotearg_buffer, except return the result in a newly allocated buffer. It is the caller's responsibility to free the result. The result will not contain embedded null bytes. */ char *quotearg_alloc (char const *arg, size_t argsize, struct quoting_options const *o); /* Like quotearg_alloc, except that the length of the result, excluding the terminating null byte, is stored into SIZE if it is non-NULL. The result might contain embedded null bytes if ARGSIZE was not -1, SIZE was not NULL, the style of O does not use backslash escapes, and the flags of O do not request elision of null bytes.*/ char *quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, struct quoting_options const *o); /* Use storage slot N to return a quoted version of the string ARG. Use the default quoting options. The returned value points to static storage that can be reused by the next call to this function with the same value of N. N must be nonnegative. The output of all functions in the quotearg_n family are guaranteed to not contain embedded null bytes.*/ char *quotearg_n (int n, char const *arg); /* Equivalent to quotearg_n (0, ARG). */ char *quotearg (char const *arg); /* Use storage slot N to return a quoted version of the argument ARG of size ARGSIZE. This is like quotearg_n (N, ARG), except it can quote null bytes. */ char *quotearg_n_mem (int n, char const *arg, size_t argsize); /* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */ char *quotearg_mem (char const *arg, size_t argsize); /* Use style S and storage slot N to return a quoted version of the string ARG. This is like quotearg_n (N, ARG), except that it uses S with no other options to specify the quoting method. */ char *quotearg_n_style (int n, enum quoting_style s, char const *arg); /* Use style S and storage slot N to return a quoted version of the argument ARG of size ARGSIZE. This is like quotearg_n_style (N, S, ARG), except it can quote null bytes. */ char *quotearg_n_style_mem (int n, enum quoting_style s, char const *arg, size_t argsize); /* Equivalent to quotearg_n_style (0, S, ARG). */ char *quotearg_style (enum quoting_style s, char const *arg); /* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */ char *quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize); /* Like quotearg (ARG), except also quote any instances of CH. See set_char_quoting for a description of acceptable CH values. */ char *quotearg_char (char const *arg, char ch); /* Like quotearg_char (ARG, CH), except it can quote null bytes. */ char *quotearg_char_mem (char const *arg, size_t argsize, char ch); /* Equivalent to quotearg_char (ARG, ':'). */ char *quotearg_colon (char const *arg); /* Like quotearg_colon (ARG), except it can quote null bytes. */ char *quotearg_colon_mem (char const *arg, size_t argsize); /* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See set_custom_quoting for a description of acceptable LEFT_QUOTE and RIGHT_QUOTE values. */ char *quotearg_n_custom (int n, char const *left_quote, char const *right_quote, char const *arg); /* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it can quote null bytes. */ char *quotearg_n_custom_mem (int n, char const *left_quote, char const *right_quote, char const *arg, size_t argsize); /* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG). */ char *quotearg_custom (char const *left_quote, char const *right_quote, char const *arg); /* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG, ARGSIZE). */ char *quotearg_custom_mem (char const *left_quote, char const *right_quote, char const *arg, size_t argsize); /* Free any dynamically allocated memory. */ void quotearg_free (void); #endif /* !QUOTEARG_H_ */ dico-2.2/gnu/realloc.c000066400000000000000000000050461172612674100146650ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* realloc() function that is glibc compatible. Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2011 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 3 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, see . */ /* written by Jim Meyering and Bruno Haible */ #include /* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ #ifdef realloc # define NEED_REALLOC_GNU 1 /* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ #elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU # define NEED_REALLOC_GNU 1 #endif /* Infer the properties of the system's malloc function. The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU # define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 #endif /* Below we want to call the system's malloc and realloc. Undefine the symbols here so that including provides a declaration of malloc(), not of rpl_malloc(), and likewise for realloc. */ #undef malloc #undef realloc /* Specification. */ #include #include /* Below we want to call the system's malloc and realloc. Undefine the symbols, if they were defined by gnulib's replacement. */ #undef malloc #undef realloc /* Change the size of an allocated block of memory P to N bytes, with error checking. If N is zero, change it to 1. If P is NULL, use malloc. */ void * rpl_realloc (void *p, size_t n) { void *result; #if NEED_REALLOC_GNU if (n == 0) { n = 1; /* In theory realloc might fail, so don't rely on it to free. */ free (p); p = NULL; } #endif if (p == NULL) { #if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE if (n == 0) n = 1; #endif result = malloc (n); } else result = realloc (p, n); #if !HAVE_REALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } dico-2.2/gnu/ref-add.sin000066400000000000000000000020641172612674100151120ustar00rootroot00000000000000# Add this package to a list of references stored in a text file. # # Copyright (C) 2000, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// ta :a s/ @PACKAGE@ / @PACKAGE@ / tb s/ $/ @PACKAGE@ / :b s/^/# Packages using this file:/ } dico-2.2/gnu/ref-del.sin000066400000000000000000000020071172612674100151230ustar00rootroot00000000000000# Remove this package from a list of references stored in a text file. # # Copyright (C) 2000, 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Written by Bruno Haible . # /^# Packages using this file: / { s/# Packages using this file:// s/ @PACKAGE@ / / s/^/# Packages using this file:/ } dico-2.2/gnu/regcomp.c000066400000000000000000003332341172612674100147030ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Extended regular expression matching and search library. Copyright (C) 2002-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); #ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); #endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra); static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node); static reg_errcode_t calc_first (void *extra, bin_tree_t *node); static reg_errcode_t calc_next (void *extra, bin_tree_t *node); static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint); static reg_errcode_t calc_eclosure (re_dfa_t *dfa); static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root); static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax); static int peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) internal_function; static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err); static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err); static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen); static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class (bitset_t sbcset, const unsigned char *name); static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err); static bin_tree_t *create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type); static bin_tree_t *create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token); static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); static void free_token (re_token_t *node); static reg_errcode_t free_tree (void *extra, bin_tree_t *node); static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ static const char __re_error_msgid[] = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; static const size_t __re_error_msgid_idx[] = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. */ #ifdef _LIBC const char * re_compile_pattern (pattern, length, bufp) const char *pattern; size_t length; struct re_pattern_buffer *bufp; #else /* size_t might promote */ const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp) #endif { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub, unless RE_NO_SUB is set. */ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void __attribute ((always_inline)) re_set_fastmap (char *fastmap, bool icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap) { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; Idx node_cnt; bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { Idx node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char buf[MB_LEN_MAX]; unsigned char *p; wchar_t wc; mbstate_t state; p = buf; *p++ = dfa->nodes[node].opr.c; while (++node < dfa->nodes_len && dfa->nodes[node].type == CHARACTER && dfa->nodes[node].mb_partial) *p++ = dfa->nodes[node].opr.c; memset (&state, '\0', sizeof (state)); if (__mbrtowc (&wc, (const char *) buf, p - buf, &state) == p - buf && (__wcrtomb ((char *) buf, towlower (wc), &state) != (size_t) -1)) re_set_fastmap (fastmap, false, buf[0]); } #endif } else if (type == SIMPLE_BRACKET) { int i, ch; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) { int j; bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (w & ((bitset_word_t) 1 << j)) re_set_fastmap (fastmap, icase, ch); } } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; Idx i; # ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b' (and it is caught by SIMPLE_BRACKET). */ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 && (cset->ncoll_syms || cset->nranges)) { const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0; i < SBC_MAX; ++i) if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } # endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes # endif /* _LIBC */ )) { unsigned char c = 0; do { mbstate_t mbs; memset (&mbs, 0, sizeof (mbs)); if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) re_set_fastmap (fastmap, false, (int) c); } while (++c != 0); } else { /* ... Else catch all bytes which can start the mbchars. */ for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) re_set_fastmap (fastmap, false, *(unsigned char *) buf); } } } } #endif /* RE_ENABLE_I18N */ else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD #endif /* RE_ENABLE_I18N */ || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set `buffer' to the compiled pattern; `used' to the length of the compiled pattern; `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; `newline_anchor' to REG_NEWLINE being set in CFLAGS; `fastmap' to an allocated space for the fastmap; `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (preg, pattern, cflags) regex_t *_Restrict_ preg; const char *_Restrict_ pattern; int cflags; { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function never fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ #ifdef _LIBC size_t regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *_Restrict_ preg; char *_Restrict_ errbuf; size_t errbuf_size; #else /* size_t might promote */ size_t regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, size_t errbuf_size) #endif { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { size_t cpy_size = msg_size; if (BE (msg_size > errbuf_size, 0)) { cpy_size = errbuf_size - 1; errbuf[cpy_size] = '\0'; } memcpy (errbuf, msg, cpy_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif #ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is a worthwhile optimization. */ static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ # if 4 * BITSET_WORD_BITS < ASCII_CHARS # error "bitset_word_t is narrower than 32 bits" # elif 3 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 2 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, # elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, # endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) }; #endif static void free_dfa_content (re_dfa_t *dfa) { Idx i, j; if (dfa->nodes) for (i = 0; i < dfa->nodes_len; ++i) free_token (dfa->nodes + i); re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); if (dfa->state_table) for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); #ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); #endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; re_free (preg->fastmap); preg->fastmap = NULL; re_free (preg->translate); preg->translate = NULL; } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since `re_exec' always passes NULL for the `regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax) { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); preg->buffer = (unsigned char *) dfa; } preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG /* Note: length+1 will not overflow since it is checked in init_dfa. */ dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif __libc_lock_init (dfa->lock); err = re_string_construct (®exp, pattern, length, preg->translate, (syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (®exp); free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and create the nfa. */ err = analyze (preg); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; #ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); #endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len) { __re_size_t table_size; #ifndef _LIBC char *codeset_name; #endif #ifdef RE_ENABLE_I18N size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); #else size_t max_i18n_object_size = 0; #endif size_t max_object_size = MAX (sizeof (struct re_state_table_entry), MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), MAX (sizeof (regmatch_t), max_i18n_object_size)))); memset (dfa, '\0', sizeof (re_dfa_t)); /* Force allocation of str_tree_storage the first time. */ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; /* Avoid overflows. The extra "/ 2" is for the table_size doubling calculation below, and for similar doubling calculations elsewhere. And it's <= rather than <, because some of the doubling calculations add 1 afterwards. */ if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; ; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC if (dfa->mb_cur_max == 6 && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) dfa->is_utf8 = 1; dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) != 0); #else codeset_name = nl_langinfo (CODESET); if (strcasecmp (codeset_name, "UTF-8") == 0 || strcasecmp (codeset_name, "UTF8") == 0) dfa->is_utf8 = 1; /* We check exhaustively in the loop below if this charset is a superset of ASCII. */ dfa->map_notascii = 0; #endif #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; else { int i, j, ch; dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); if (BE (dfa->sb_char == NULL, 0)) return REG_ESPACE; /* Set the bits corresponding to single byte chars. */ for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) { wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; # ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; # endif } } } #endif if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static void internal_function init_word_char (re_dfa_t *dfa) { int i, j, ch; dfa->word_ops_used = 1; for (i = 0, ch = 0; i < BITSET_WORDS; ++i) for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= (bitset_word_t) 1 << j; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { next = storage->next; re_free (storage); } dfa->str_tree_storage = NULL; dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (re_dfa_t *dfa) { Idx first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first->node_idx; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { Idx node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; Idx clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { Idx dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { reg_errcode_t merge_err = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); if (merge_err != REG_NOERROR) return merge_err; i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } #ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ static void optimize_utf8 (re_dfa_t *dfa) { Idx node; int i; bool mb_chars = false; bool has_period = false; for (node = 0; node < dfa->nodes_len; ++node) switch (dfa->nodes[node].type) { case CHARACTER: if (dfa->nodes[node].opr.c >= ASCII_CHARS) mb_chars = true; break; case ANCHOR: switch (dfa->nodes[node].opr.ctx_type) { case LINE_FIRST: case LINE_LAST: case BUF_FIRST: case BUF_LAST: break; default: /* Word anchors etc. cannot be handled. It's okay to test opr.ctx_type since constraints (for all DFA nodes) are created by ORing one or more opr.ctx_type values. */ return; } break; case OP_PERIOD: has_period = true; break; case OP_BACK_REF: case OP_ALT: case END_OF_RE: case OP_DUP_ASTERISK: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: break; case COMPLEX_BRACKET: return; case SIMPLE_BRACKET: /* Just double check. */ { int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) { if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) return; rshift = 0; } } break; default: abort (); } if (mb_chars || has_period) for (node = 0; node < dfa->nodes_len; ++node) { if (dfa->nodes[node].type == CHARACTER && dfa->nodes[node].opr.c >= ASCII_CHARS) dfa->nodes[node].mb_partial = 0; else if (dfa->nodes[node].type == OP_PERIOD) dfa->nodes[node].type = OP_UTF8_PERIOD; } /* The search can be in single byte locale. */ dfa->mb_cur_max = 1; dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } #endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (regex_t *preg) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL, 0)) return REG_ESPACE; dfa->subexp_map = re_malloc (Idx, preg->re_nsub); if (dfa->subexp_map != NULL) { Idx i; for (i = 0; i < preg->re_nsub; i++) dfa->subexp_map[i] = i; preorder (dfa->str_tree, optimize_subexps, dfa); for (i = 0; i < preg->re_nsub; i++) if (dfa->subexp_map[i] != i) break; if (i == preg->re_nsub) { free (dfa->subexp_map); dfa->subexp_map = NULL; } } ret = postorder (dfa->str_tree, lower_subexps, preg); if (BE (ret != REG_NOERROR, 0)) return ret; ret = postorder (dfa->str_tree, calc_first, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; preorder (dfa->str_tree, calc_next, dfa); ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); if (BE (ret != REG_NOERROR, 0)) return ret; ret = calc_eclosure (dfa); if (BE (ret != REG_NOERROR, 0)) return ret; /* We only need this during the prune_impossible_nodes pass in regexec.c; skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) || dfa->nbackref) { dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); if (BE (dfa->inveclosures == NULL, 0)) return REG_ESPACE; ret = calc_inveclosure (dfa); } return ret; } /* Our parse trees are very unbalanced, so we cannot use a stack to implement parse tree visits. Instead, we use parent pointers and some hairy code in these two functions. */ static reg_errcode_t postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node, *prev; for (node = root; ; ) { /* Descend down the tree, preferably to the left (or to the right if that's the only child). */ while (node->left || node->right) if (node->left) node = node->left; else node = node->right; do { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; if (node->parent == NULL) return REG_NOERROR; prev = node; node = node->parent; } /* Go up while we have a node that is reached from the right. */ while (node->right == prev || node->right == NULL); node = node->right; } } static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), void *extra) { bin_tree_t *node; for (node = root; ; ) { reg_errcode_t err = fn (extra, node); if (BE (err != REG_NOERROR, 0)) return err; /* Go to the left node, or up and to the right. */ if (node->left) node = node->left; else { bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; if (!node) return REG_NOERROR; } node = node->right; } } } /* Optimization pass: if a SUBEXP is entirely contained, strip it and tell re_search_internal to map the inner one's opr.idx to this one's. Adjust backreferences as well. Requires a preorder visit. */ static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == OP_BACK_REF && dfa->subexp_map) { int idx = node->token.opr.idx; node->token.opr.idx = dfa->subexp_map[idx]; dfa->used_bkref_map |= 1 << node->token.opr.idx; } else if (node->token.type == SUBEXP && node->left && node->left->token.type == SUBEXP) { Idx other_idx = node->left->token.opr.idx; node->left = node->left->left; if (node->left) node->left->parent = node; dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; if (other_idx < BITSET_WORD_BITS) dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); } return REG_NOERROR; } /* Lowering pass: Turn each SUBEXP node into the appropriate concatenation of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node) { regex_t *preg = (regex_t *) extra; reg_errcode_t err = REG_NOERROR; if (node->left && node->left->token.type == SUBEXP) { node->left = lower_subexp (&err, preg, node->left); if (node->left) node->left->parent = node; } if (node->right && node->right->token.type == SUBEXP) { node->right = lower_subexp (&err, preg, node->right); if (node->right) node->right->parent = node; } return err; } static bin_tree_t * lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; if (preg->no_sub /* We do not optimize empty subexpressions, because otherwise we may have bad CONCAT nodes with NULL children. This is obviously not very common, so we do not lose much. An example that triggers this case is the sed "script" /\(\)/x. */ && node->left != NULL && (node->token.opr.idx >= BITSET_WORD_BITS || !(dfa->used_bkref_map & ((bitset_word_t) 1 << node->token.opr.idx)))) return node->left; /* Convert the SUBEXP node to the concatenation of an OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; tree = create_tree (dfa, op, tree1, CONCAT); if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) { *err = REG_ESPACE; return NULL; } op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; return tree; } /* Pass 1 in building the NFA: compute FIRST and create unlinked automaton nodes. Requires a postorder visit. */ static reg_errcode_t calc_first (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; if (node->token.type == CONCAT) { node->first = node->left->first; node->node_idx = node->left->node_idx; } else { node->first = node; node->node_idx = re_dfa_add_node (dfa, node->token); if (BE (node->node_idx == REG_MISSING, 0)) return REG_ESPACE; if (node->token.type == ANCHOR) dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; } return REG_NOERROR; } /* Pass 2: compute NEXT on the tree. Preorder visit. */ static reg_errcode_t calc_next (void *extra, bin_tree_t *node) { switch (node->token.type) { case OP_DUP_ASTERISK: node->left->next = node; break; case CONCAT: node->left->next = node->right->first; node->right->next = node->next; break; default: if (node->left) node->left->next = node->next; if (node->right) node->right->next = node->next; break; } return REG_NOERROR; } /* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; Idx idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case OP_ALT: { Idx left, right; dfa->has_plural_match = 1; if (node->left != NULL) left = node->left->first->node_idx; else left = node->next->node_idx; if (node->right != NULL) right = node->right->first->node_idx; else right = node->next->node_idx; assert (REG_VALID_INDEX (left)); assert (REG_VALID_INDEX (right)); err = re_node_set_init_2 (dfa->edests + idx, left, right); } break; case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); break; case OP_BACK_REF: dfa->nexts[idx] = node->next->node_idx; if (node->token.type == OP_BACK_REF) err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); break; default: assert (!IS_EPSILON_NODE (node->token.type)); dfa->nexts[idx] = node->next->node_idx; break; } return err; } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t internal_function duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, Idx root_node, unsigned int init_constraint) { Idx org_node, clone_node; bool ok; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { Idx org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; dfa->nexts[clone_node] = dfa->nexts[org_node]; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* If the node is root_node itself, it means the epsilon closure has a loop. Then tie it to the destination of the root_node. */ if (org_node == root_node && clone_node != org_node) { ok = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (! ok, 0)) return REG_ESPACE; break; } /* In case the node has another constraint, append it. */ constraint |= dfa->nodes[org_node].constraint; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == REG_MISSING) { /* There is no such duplicated node, create a new one. */ reg_errcode_t err; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There is a duplicated node which satisfies the constraint, use it to avoid infinite loop. */ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; clone_dest = duplicate_node (dfa, org_dest, constraint); if (BE (clone_dest == REG_MISSING, 0)) return REG_ESPACE; ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (! ok, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, unsigned int constraint) { Idx idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return REG_MISSING; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. Return the index of the new node, or REG_MISSING if insufficient storage is available. */ static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) { Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); if (BE (dup_idx != REG_MISSING, 1)) { dfa->nodes[dup_idx].constraint = constraint; dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; dfa->nodes[dup_idx].duplicated = 1; /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; } return dup_idx; } static reg_errcode_t calc_inveclosure (re_dfa_t *dfa) { Idx src, idx; bool ok; for (idx = 0; idx < dfa->nodes_len; ++idx) re_node_set_init_empty (dfa->inveclosures + idx); for (src = 0; src < dfa->nodes_len; ++src) { Idx *elems = dfa->eclosures[src].elems; for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); if (BE (! ok, 0)) return REG_ESPACE; } } return REG_NOERROR; } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (re_dfa_t *dfa) { Idx node_idx; bool incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = false; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = false; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != REG_MISSING); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of `node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) { reg_errcode_t err; Idx i; re_node_set eclosure; bool ok; bool incomplete = false; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = REG_MISSING; /* If the current node has constraints, duplicate all nodes since they must inherit the constraints. */ if (dfa->nodes[node].constraint && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { err = duplicate_node_closure (dfa, node, node, node, dfa->nodes[node].constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; Idx edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of `edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == REG_MISSING) { incomplete = true; continue; } /* If we haven't calculated the epsilon closure of `edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of `edest'. */ err = re_node_set_merge (&eclosure, &eclosure_elem); if (BE (err != REG_NOERROR, 0)) return err; /* If the epsilon closure of `edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = true; re_node_set_free (&eclosure_elem); } } /* An epsilon closure includes itself. */ ok = re_node_set_insert (&eclosure, node); if (BE (! ok, 0)) return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static void internal_function fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) { re_string_skip_bytes (input, peek_token (result, input, syntax)); } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int internal_function peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '1'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case 's': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_SPACE; break; case 'S': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTSPACE; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.ctx_type = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else #endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') break; } token->type = ANCHOR; token->opr.ctx_type = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.ctx_type = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int internal_function peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; if (re_string_cur_idx (input) + 1 < re_string_length (input)) c2 = re_string_peek_byte (input, 1); else c2 = 0; token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error is occured, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ / \ EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; eor = create_tree (dfa, NULL, NULL, END_OF_RE); if (tree != NULL) root = create_tree (dfa, tree, eor, CONCAT); else root = eor; if (BE (eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression |: ALT / \ / \ ALT means alternative, which represents the operator `|'. */ static bin_tree_t * parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) return NULL; } else branch = NULL; tree = create_tree (dfa, tree, branch, OP_ALT); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } return tree; } /* This function build the following tree, from regular expression : CAT / \ / \ CAT means concatenation. */ static bin_tree_t * parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { bin_tree_t *tree, *expr; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { expr = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && expr == NULL, 0)) { return NULL; } if (tree != NULL && expr != NULL) { tree = create_tree (dfa, tree, expr, CONCAT); if (tree == NULL) { *err = REG_ESPACE; return NULL; } } else if (tree == NULL) tree = expr; /* Otherwise expr == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; switch (token->type) { case CHARACTER: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; fetch_token (token, regexp, syntax); mbc_remain = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree, mbc_remain, CONCAT); if (BE (mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1 << token->opr.idx; tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_DUP) { *err = REG_BADRPT; return NULL; } /* FALLTHROUGH */ case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { fetch_token (token, regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; /* mb_partial and word_char bits should be initialized already by peek_token. */ tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if ((token->opr.ctx_type & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); if (token->opr.ctx_type == WORD_DELIM || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; if (token->opr.ctx_type == WORD_DELIM) { token->opr.ctx_type = WORD_FIRST; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = WORD_LAST; } else { token->opr.ctx_type = INSIDE_WORD; tree_first = create_token_tree (dfa, NULL, NULL, token); token->opr.ctx_type = INSIDE_NOTWORD; } tree_last = create_token_tree (dfa, NULL, NULL, token); tree = create_tree (dfa, tree_first, tree_last, OP_ALT); if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ fetch_token (token, regexp, syntax); return tree; case OP_PERIOD: tree = create_token_tree (dfa, NULL, NULL, token); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } if (dfa->mb_cur_max > 1) dfa->has_mb_node = 1; break; case OP_WORD: case OP_NOTWORD: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "alnum", (const unsigned char *) "_", token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: case OP_NOTSPACE: tree = build_charclass_op (dfa, regexp->trans, (const unsigned char *) "space", (const unsigned char *) "", token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } fetch_token (token, regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; /* In BRE consecutive duplications are not allowed. */ if ((syntax & RE_CONTEXT_INVALID_DUP) && (token->type == OP_DUP_ASTERISK || token->type == OP_OPEN_DUP_NUM)) { *err = REG_BADRPT; return NULL; } } return tree; } /* This function build the following tree, from regular expression (): SUBEXP | */ static bin_tree_t * parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, Idx nest, reg_errcode_t *err) { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) *err = REG_EPAREN; if (BE (*err != REG_NOERROR, 0)) return NULL; } if (cur_nsub <= '9' - '1') dfa->completed_bkref_map |= 1 << cur_nsub; tree = create_tree (dfa, tree, NULL, SUBEXP); if (BE (tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } tree->token.opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { bin_tree_t *tree = NULL, *old_tree = NULL; Idx i, start, end, start_idx = re_string_cur_idx (regexp); re_token_t start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { end = 0; start = fetch_number (regexp, token, syntax); if (start == REG_MISSING) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* {} is invalid. */ return NULL; } } if (BE (start != REG_ERROR, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : REG_ERROR)); } if (BE (start == REG_ERROR || end == REG_ERROR, 0)) { /* Invalid sequence. */ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { if (token->type == END_OF_RE) *err = REG_EBRACE; else *err = REG_BADBR; return NULL; } /* If the syntax bit is set, rollback. */ re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; /* mb_partial and word_char bits should be already initialized by peek_token. */ return elem; } if (BE ((end != REG_MISSING && start > end) || token->type != OP_CLOSE_DUP_NUM, 0)) { /* First number greater than second. */ *err = REG_BADBR; return NULL; } } else { start = (token->type == OP_DUP_PLUS) ? 1 : 0; end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; } fetch_token (token, regexp, syntax); if (BE (elem == NULL, 0)) return NULL; if (BE (start == 0 && end == 0, 0)) { postorder (elem, free_tree, NULL); return NULL; } /* Extract "{n,m}" to "...{0,}". */ if (BE (start > 0, 0)) { tree = elem; for (i = 2; i <= start; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (start == end) return tree; /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); old_tree = tree; } else old_tree = NULL; if (elem->token.type == SUBEXP) postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); tree = create_tree (dfa, elem, NULL, (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; /* From gnulib's "intprops.h": True if the arithmetic type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* This loop is actually executed only when end != REG_MISSING, to rewrite {0,n} as ((...?)?)?... We have already created the start+1-th copy. */ if (TYPE_SIGNED (Idx) || end != REG_MISSING) for (i = start + 2; i <= end; ++i) { elem = duplicate_tree (elem, dfa); tree = create_tree (dfa, tree, elem, CONCAT); if (BE (elem == NULL || tree == NULL, 0)) goto parse_dup_op_espace; tree = create_tree (dfa, tree, NULL, OP_ALT); if (BE (tree == NULL, 0)) goto parse_dup_op_espace; } if (old_tree) tree = create_tree (dfa, old_tree, tree, CONCAT); return tree; parse_dup_op_espace: *err = REG_ESPACE; return NULL; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static reg_errcode_t internal_function # ifdef RE_ENABLE_I18N build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, const bracket_elem_t *start_elem, const bracket_elem_t *end_elem) # else /* not RE_ENABLE_I18N */ build_range_exp (const reg_syntax_t syntax, bitset_t sbcset, const bracket_elem_t *start_elem, const bracket_elem_t *end_elem) # endif /* not RE_ENABLE_I18N */ { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc; wint_t start_wc; wint_t end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? __btowc (start_ch) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? __btowc (end_ch) : end_elem->opr.wch); if (start_wc == WEOF || end_wc == WEOF) return REG_ECOLLATE; cmp_buf[0] = start_wc; cmp_buf[4] = end_wc; if (BE ((syntax & RE_NO_EMPTY_RANGES) && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes no MBCSET if dfa->mb_cur_max == 1. */ if (mbcset) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; } /* Build the table for single byte characters. */ for (wc = 0; wc < SBC_MAX; ++wc) { cmp_buf[2] = wc; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t internal_function build_collating_symbol (bitset_t sbcset, # ifdef RE_ENABLE_I18N re_charset_t *mbcset, Idx *coll_sym_alloc, # endif const unsigned char *name) { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ auto inline int32_t __attribute ((always_inline)) seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; if (symb_table[2 * elem] != 0) { int32_t second = hash % (table_size - 2) + 1; do { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash /* Compare the length of the name. */ && name_len == extra[symb_table[2 * elem + 1]] /* Compare the name. */ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { /* Yep, this is the entry. */ break; } /* Next entry. */ elem += second; } while (symb_table[2 * elem] != 0); } return elem; } /* Local function for parse_bracket_exp used in _LIBC environment. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ auto inline unsigned int __attribute ((always_inline)) lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* if (MB_CUR_MAX == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return __collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { if (nrules != 0) return __collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; Idx *range_alloc; bitset_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; /* Got valid collation sequence values, add them as a new entry. However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ if (nrules > 0 || dfa->mb_cur_max > 1) { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) { /* There is not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; Idx new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; } /* Build the table for single byte characters. */ for (ch = 0; ch < SBC_MAX; ch++) { uint32_t ch_collseq; /* if (MB_CUR_MAX == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; Idx *coll_sym_alloc; bitset_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, new_coll_sym_alloc); if (BE (new_coll_syms == NULL, 0)) return REG_ESPACE; mbcset->coll_syms = new_coll_syms; *coll_sym_alloc = new_coll_sym_alloc; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; Idx equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ bool non_match = false; bin_tree_t *work_tree; int token_len; bool first_round = true; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (MB_CUR_MAX > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ non_match = true; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0; bool is_range_exp = false; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax, first_round); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } first_round = false; /* Get information about the next token. We need it in any case. */ token_len = peek_token_bracket (token, regexp, syntax); /* Do not check for ranges if we know they are not allowed. */ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) { if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token2.type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = true; } } if (is_range_exp == true) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax, true); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); #ifdef _LIBC *err = build_range_exp (sbcset, mbcset, &range_alloc, &start_elem, &end_elem); #else # ifdef RE_ENABLE_I18N *err = build_range_exp (syntax, sbcset, dfa->mb_cur_max > 1 ? mbcset : NULL, &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); # endif #endif /* RE_ENABLE_I18N */ if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) { wchar_t *new_mbchars; /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ new_mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (new_mbchars == NULL, 0)) goto parse_bracket_exp_espace; mbcset->mbchars = new_mbchars; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name, syntax); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; default: assert (0); break; } } if (BE (token->type == END_OF_RE, 0)) { *err = REG_EBRACK; goto parse_bracket_exp_free_return; } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { bin_tree_t *mbc_tree; int sbc_idx; /* Build a tree for complex bracket. */ dfa->has_mb_node = 1; br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) if (sbcset[sbc_idx]) break; /* If there are no bits set in sbcset, there is no point of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ if (sbc_idx < BITSET_WORDS) { /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } else { re_free (sbcset); work_tree = mbc_tree; } } else #endif /* not RE_ENABLE_I18N */ { #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; work_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (work_tree == NULL, 0)) goto parse_bracket_exp_espace; } return work_tree; parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen) { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) { /* A '-' must only appear as anything but a range indicator before the closing bracket. Everything else is an error. */ re_token_t token2; (void) peek_token_bracket (&token2, regexp, syntax); if (token2.type != OP_CLOSE_BRACKET) /* The actual error value is not standardized since this whole case is undefined. But ERANGE makes good sense. */ return REG_ERANGE; } elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [::], [..], and [==]. */ static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token) { unsigned char ch, delim = token->opr.c; int i = 0; if (re_string_eoi(regexp)) return REG_EBRACK; for (;; ++i) { if (i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (re_string_eoi(regexp)) return REG_EBRACK; if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name) #else /* not RE_ENABLE_I18N */ build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* This #include defines a local function! */ # include /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (&cp); if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matcing table for this equivalence class. */ char_buf[1] = (unsigned char) '\0'; len = weights[idx1 & 0xffffff]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; /* Compare only if the length matches and the collation rule index is the same. */ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) { int cnt = 0; while (cnt <= len && weights[(idx1 & 0xffffff) + 1 + cnt] == weights[(idx2 & 0xffffff) + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, new_equiv_class_alloc); if (BE (new_equiv_classes == NULL, 0)) return REG_ESPACE; mbcset->equiv_classes = new_equiv_classes; *equiv_class_alloc = new_equiv_class_alloc; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax) #else /* not RE_ENABLE_I18N */ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, const unsigned char *class_name, reg_syntax_t syntax) #endif /* not RE_ENABLE_I18N */ { int i; const char *name = (const char *) class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, new_char_class_alloc); if (BE (new_char_classes == NULL, 0)) return REG_ESPACE; mbcset->char_classes = new_char_classes; *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ if (BE (trans != NULL, 0)) \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, trans[i]); \ } \ else \ { \ for (i = 0; i < SBC_MAX; ++i) \ if (ctype_func (i)) \ bitset_set (sbcset, i); \ } \ } while (0) if (strcmp (name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum); else if (strcmp (name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl); else if (strcmp (name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower); else if (strcmp (name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace); else if (strcmp (name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha); else if (strcmp (name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit); else if (strcmp (name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint); else if (strcmp (name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper); else if (strcmp (name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank); else if (strcmp (name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph); else if (strcmp (name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct); else if (strcmp (name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit); else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const unsigned char *class_name, const unsigned char *extra, bool non_match, reg_errcode_t *err) { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx alloc = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else /* not RE_ENABLE_I18N */ if (BE (sbcset == NULL, 0)) #endif /* not RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } if (non_match) { #ifdef RE_ENABLE_I18N mbcset->non_match = 1; #endif /* not RE_ENABLE_I18N */ } /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ class_name, 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ for (; *extra; extra++) bitset_set (sbcset, *extra); /* If it is non-matching list. */ if (non_match) bitset_not (sbcset); #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); #endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); if (BE (mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ tree = create_tree (dfa, tree, mbc_tree, OP_ALT); if (BE (mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from `input', and return the number. Return REG_MISSING if the number field is empty like "{,1}". Return REG_ERROR if an error occurred. */ static Idx fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) { Idx num = REG_MISSING; unsigned char c; while (1) { fetch_token (token, input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return REG_ERROR; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == REG_ERROR) ? REG_ERROR : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0')); num = (num > RE_DUP_MAX) ? REG_ERROR : num; } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a tree node. */ static bin_tree_t * create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, re_token_type_t type) { re_token_t t; t.type = type; return create_token_tree (dfa, left, right, &t); } static bin_tree_t * create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, const re_token_t *token) { bin_tree_t *tree; if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) { bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); if (storage == NULL) return NULL; storage->next = dfa->str_tree_storage; dfa->str_tree_storage = storage; dfa->str_tree_storage_idx = 0; } tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; tree->parent = NULL; tree->left = left; tree->right = right; tree->token = *token; tree->token.duplicated = 0; tree->token.opt_subexp = 0; tree->first = NULL; tree->next = NULL; tree->node_idx = REG_MISSING; if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Mark the tree SRC as an optional subexpression. To be called from preorder or postorder. */ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { Idx idx = (Idx) (long) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; return REG_NOERROR; } /* Free the allocated memory inside NODE. */ static void free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE and its children. */ static reg_errcode_t free_tree (void *extra, bin_tree_t *node) { free_token (&node->token); return REG_NOERROR; } /* Duplicate the node SRC, and return new node. This is a preorder visit similar to the one implemented by the generic visitor, but we need more infrastructure to maintain two parallel trees --- so, it's easier to duplicate. */ static bin_tree_t * duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) { const bin_tree_t *node; bin_tree_t *dup_root; bin_tree_t **p_new = &dup_root, *dup_node = root->parent; for (node = root; ; ) { /* Create a new tree and link it back to the current parent. */ *p_new = create_token_tree (dfa, NULL, NULL, &node->token); if (*p_new == NULL) return NULL; (*p_new)->parent = dup_node; (*p_new)->token.duplicated = 1; dup_node = *p_new; /* Go to the left node, or up and to the right. */ if (node->left) { node = node->left; p_new = &dup_node->left; } else { const bin_tree_t *prev = NULL; while (node->right == prev || node->right == NULL) { prev = node; node = node->parent; dup_node = dup_node->parent; if (!node) return dup_root; } node = node->right; p_new = &dup_node->right; } } } dico-2.2/gnu/regex.c000066400000000000000000000056731172612674100143640ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Extended regular expression matching and search library. Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Make sure noone compiles this code with a C++ compiler. */ #if defined __cplusplus && defined _LIBC # error "This is C code, use a C compiler" #endif #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) # include "../locale/localeinfo.h" #endif /* On some systems, limits.h sets RE_DUP_MAX to a lower value than GNU regex allows. Include it before , which correctly #undefs RE_DUP_MAX and sets it to the right value. */ #include #include #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif dico-2.2/gnu/regex.h000066400000000000000000000622351172612674100143660ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Definitions for data structures and routines for the regular expression library. Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _REGEX_H #define _REGEX_H 1 #include /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { #endif /* Define __USE_GNU_REGEX to declare GNU extensions that violate the POSIX name space rules. */ #undef __USE_GNU_REGEX #if (defined _GNU_SOURCE \ || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ && !defined _XOPEN_SOURCE)) # define __USE_GNU_REGEX 1 #endif #ifdef _REGEX_LARGE_OFFSETS /* Use types and values that are wide enough to represent signed and unsigned byte offsets in memory. This currently works only when the regex code is used outside of the GNU C library; it is not yet supported within glibc itself, and glibc users should not define _REGEX_LARGE_OFFSETS. */ /* The type of the offset of a byte within a string. For historical reasons POSIX 1003.1-2004 requires that regoff_t be at least as wide as off_t. However, many common POSIX platforms set regoff_t to the more-sensible ssize_t and the Open Group has signalled its intention to change the requirement to be that regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN 60 (2005-08-25). We don't know of any hosts where ssize_t or ptrdiff_t is wider than ssize_t, so ssize_t is safe. */ typedef ssize_t regoff_t; /* The type of nonnegative object indexes. Traditionally, GNU regex uses 'int' for these. Code that uses __re_idx_t should work regardless of whether the type is signed. */ typedef size_t __re_idx_t; /* The type of object sizes. */ typedef size_t __re_size_t; /* The type of object sizes, in places where the traditional code uses unsigned long int. */ typedef size_t __re_long_size_t; #else /* Use types that are binary-compatible with the traditional GNU regex implementation, which mishandles strings longer than INT_MAX. */ typedef int regoff_t; typedef int __re_idx_t; typedef unsigned int __re_size_t; typedef unsigned long int __re_long_size_t; #endif /* The following two types have to be signed and unsigned integer type wide enough to hold a value of a pointer. For most ANSI compilers ptrdiff_t and size_t should be likely OK. Still size of these two types is 2 for Microsoft C. Ugh... */ typedef long int s_reg_t; typedef unsigned long int active_reg_t; /* The following bits are used to determine the regexp syntax we recognize. The set/not-set meanings are chosen so that Emacs syntax remains the value 0. The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; #ifdef __USE_GNU_REGEX /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ # define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) /* If this bit is not set, then + and ? are operators, and \+ and \? are literals. If set, then \+ and \? are operators and + and ? are literals. */ # define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) /* If this bit is set, then character classes are supported. They are: [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. If not set, then character classes are not supported. */ # define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) /* If this bit is set, then ^ and $ are always anchors (outside bracket expressions, of course). If this bit is not set, then it depends: ^ is an anchor if it is at the beginning of a regular expression or after an open-group or an alternation operator; $ is an anchor if it is at the end of a regular expression, or before a close-group or an alternation operator. This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because POSIX draft 11.2 says that * etc. in leading positions is undefined. We already implemented a previous draft which made those constructs invalid, though, so we haven't changed the code back. */ # define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) /* If this bit is set, then special characters are always special regardless of where they are in the pattern. If this bit is not set, then special characters are special only in some contexts; otherwise they are ordinary. Specifically, * + ? and intervals are only special when not after the beginning, open-group, or alternation operator. */ # define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) /* If this bit is set, then *, +, ?, and { cannot be first in an re or immediately after an alternation or begin-group operator. */ # define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) /* If this bit is set, then . matches newline. If not set, then it doesn't. */ # define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) /* If this bit is set, then . doesn't match NUL. If not set, then it does. */ # define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) /* If this bit is set, nonmatching lists [^...] do not match newline. If not set, they do. */ # define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) /* If this bit is set, either \{...\} or {...} defines an interval, depending on RE_NO_BK_BRACES. If not set, \{, \}, {, and } are literals. */ # define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) /* If this bit is set, +, ? and | aren't recognized as operators. If not set, they are. */ # define RE_LIMITED_OPS (RE_INTERVALS << 1) /* If this bit is set, newline is an alternation operator. If not set, newline is literal. */ # define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) /* If this bit is set, then `{...}' defines an interval, and \{ and \} are literals. If not set, then `\{...\}' defines an interval. */ # define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) /* If this bit is set, (...) defines a group, and \( and \) are literals. If not set, \(...\) defines a group, and ( and ) are literals. */ # define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) /* If this bit is set, then \ matches . If not set, then \ is a back-reference. */ # define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) /* If this bit is set, then | is an alternation operator, and \| is literal. If not set, then \| is an alternation operator, and | is literal. */ # define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) /* If this bit is set, then an ending range point collating higher than the starting range point, as in [z-a], is invalid. If not set, then when ending range point collates higher than the starting range point, the range is ignored. */ # define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) /* If this bit is set, then an unmatched ) is ordinary. If not set, then an unmatched ) is invalid. */ # define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) /* If this bit is set, succeed as soon as we match the whole pattern, without further backtracking. */ # define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) /* If this bit is set, do not process the GNU regex operators. If not set, then the GNU regex operators are recognized. */ # define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) /* If this bit is set, turn on internal regex debugging. If not set, and debugging was on, turn it off. This only works if regex.c is compiled -DDEBUG. We define this bit always, so that all that's needed to turn on debugging is to recompile regex.c; the calling code can always have this bit set, and it won't affect anything in the normal case. */ # define RE_DEBUG (RE_NO_GNU_OPS << 1) /* If this bit is set, a syntactically invalid interval is treated as a string of ordinary characters. For example, the ERE 'a{1' is treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only for ^, because it is difficult to scan the regex backwards to find whether ^ should be special. */ # define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) /* If this bit is set, then \{ cannot be first in a regex or immediately after an alternation, open-group or \} operator. */ # define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) #endif /* defined __USE_GNU_REGEX */ /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect already-compiled regexps. */ extern reg_syntax_t re_syntax_options; #ifdef __USE_GNU_REGEX /* Define combinations of the above bits for the standard possibilities. (The [[[ comments delimit what gets put into the Texinfo file, so don't delete them!) */ /* [[[begin syntaxes]]] */ # define RE_SYNTAX_EMACS 0 # define RE_SYNTAX_AWK \ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) # define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ | RE_CONTEXT_INVALID_OPS )) # define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ | RE_INTERVALS | RE_NO_GNU_OPS) # define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ | RE_NEWLINE_ALT) # define RE_SYNTAX_EGREP \ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ | RE_NO_BK_VBAR) # define RE_SYNTAX_POSIX_EGREP \ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ # define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC # define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC /* Syntax bits common to both basic and extended POSIX regex syntax. */ # define _RE_SYNTAX_POSIX_COMMON \ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) # define RE_SYNTAX_POSIX_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this isn't minimal, since other operators, such as \`, aren't disabled. */ # define RE_SYNTAX_POSIX_MINIMAL_BASIC \ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) # define RE_SYNTAX_POSIX_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is removed and RE_NO_BK_REFS is added. */ # define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) /* [[[end syntaxes]]] */ #endif /* defined __USE_GNU_REGEX */ #ifdef __USE_GNU_REGEX /* Maximum number of duplicates an interval can allow. POSIX-conforming systems might define this in , but we want our value, so remove any previous define. */ # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif /* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored the counter as a 2-byte signed integer. This is no longer true, so RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined. However, there would be a huge performance problem if someone actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains its historical value. */ # define RE_DUP_MAX (0x7fff) #endif /* defined __USE_GNU_REGEX */ /* POSIX `cflags' bits (i.e., information for `regcomp'). */ /* If this bit is set, then use extended regular expression syntax. If not set, then use basic regular expression syntax. */ #define REG_EXTENDED 1 /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ #define REG_ICASE (1 << 1) /* If this bit is set, then anchors do not match at newline characters in the string. If not set, then anchors do match at newlines. */ #define REG_NEWLINE (1 << 2) /* If this bit is set, then report only success or fail in regexec. If not set, then returns differ between not matching and errors. */ #define REG_NOSUB (1 << 3) /* POSIX `eflags' bits (i.e., information for regexec). */ /* If this bit is set, then the beginning-of-line operator doesn't match the beginning of the string (presumably because it's not the beginning of a line). If not set, then the beginning-of-line operator does match the beginning of the string. */ #define REG_NOTBOL 1 /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) /* Use PMATCH[0] to delimit the start and end of the search in the buffer. */ #define REG_STARTEND (1 << 2) /* If any error codes are removed, changed, or added, update the `__re_error_msgid' table in regcomp.c. */ typedef enum { _REG_ENOSYS = -1, /* This will never happen for this implementation. */ _REG_NOERROR = 0, /* Success. */ _REG_NOMATCH, /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ _REG_BADPAT, /* Invalid pattern. */ _REG_ECOLLATE, /* Invalid collating element. */ _REG_ECTYPE, /* Invalid character class name. */ _REG_EESCAPE, /* Trailing backslash. */ _REG_ESUBREG, /* Invalid back reference. */ _REG_EBRACK, /* Unmatched left bracket. */ _REG_EPAREN, /* Parenthesis imbalance. */ _REG_EBRACE, /* Unmatched \{. */ _REG_BADBR, /* Invalid contents of \{\}. */ _REG_ERANGE, /* Invalid range end. */ _REG_ESPACE, /* Ran out of memory. */ _REG_BADRPT, /* No preceding re for repetition op. */ /* Error codes we've added. */ _REG_EEND, /* Premature end. */ _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; #ifdef _XOPEN_SOURCE # define REG_ENOSYS _REG_ENOSYS #endif #define REG_NOERROR _REG_NOERROR #define REG_NOMATCH _REG_NOMATCH #define REG_BADPAT _REG_BADPAT #define REG_ECOLLATE _REG_ECOLLATE #define REG_ECTYPE _REG_ECTYPE #define REG_EESCAPE _REG_EESCAPE #define REG_ESUBREG _REG_ESUBREG #define REG_EBRACK _REG_EBRACK #define REG_EPAREN _REG_EPAREN #define REG_EBRACE _REG_EBRACE #define REG_BADBR _REG_BADBR #define REG_ERANGE _REG_ERANGE #define REG_ESPACE _REG_ESPACE #define REG_BADRPT _REG_BADRPT #define REG_EEND _REG_EEND #define REG_ESIZE _REG_ESIZE #define REG_ERPAREN _REG_ERPAREN /* struct re_pattern_buffer normally uses member names like `buffer' that POSIX does not allow. In POSIX mode these members have names with leading `re_' (e.g., `re_buffer'). */ #ifdef __USE_GNU_REGEX # define _REG_RE_NAME(id) id # define _REG_RM_NAME(id) id #else # define _REG_RE_NAME(id) re_##id # define _REG_RM_NAME(id) rm_##id #endif /* The user can specify the type of the re_translate member by defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned char *. This pollutes the POSIX name space, so in POSIX mode just use unsigned char *. */ #ifdef __USE_GNU_REGEX # ifndef RE_TRANSLATE_TYPE # define RE_TRANSLATE_TYPE unsigned char * # endif # define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE #else # define REG_TRANSLATE_TYPE unsigned char * #endif /* This data structure represents a compiled pattern. Before calling the pattern compiler, the fields `buffer', `allocated', `fastmap', `translate', and `no_sub' can be set. After the pattern has been compiled, the `re_nsub' field is available. All other fields are private to the regex routines. */ struct re_pattern_buffer { /* Space that holds the compiled pattern. It is declared as `unsigned char *' because its elements are sometimes used as array indexes. */ unsigned char *_REG_RE_NAME (buffer); /* Number of bytes to which `buffer' points. */ __re_long_size_t _REG_RE_NAME (allocated); /* Number of bytes actually used in `buffer'. */ __re_long_size_t _REG_RE_NAME (used); /* Syntax setting with which the pattern was compiled. */ reg_syntax_t _REG_RE_NAME (syntax); /* Pointer to a fastmap, if any, otherwise zero. re_search uses the fastmap, if there is one, to skip over impossible starting points for matches. */ char *_REG_RE_NAME (fastmap); /* Either a translate table to apply to all characters before comparing them, or zero for no translation. The translation is applied to a pattern when it is compiled and to a string when it is matched. */ REG_TRANSLATE_TYPE _REG_RE_NAME (translate); /* Number of subexpressions found by the compiler. */ size_t re_nsub; /* Zero if this pattern cannot match the empty string, one else. Well, in truth it's used only in `re_search_2', to see whether or not we should use the fastmap, so we don't set this absolutely perfectly; see `re_compile_fastmap' (the `duplicate' case). */ unsigned int _REG_RE_NAME (can_be_null) : 1; /* If REGS_UNALLOCATED, allocate space in the `regs' structure for `max (RE_NREGS, re_nsub + 1)' groups. If REGS_REALLOCATE, reallocate space if necessary. If REGS_FIXED, use what's there. */ #ifdef __USE_GNU_REGEX # define REGS_UNALLOCATED 0 # define REGS_REALLOCATE 1 # define REGS_FIXED 2 #endif unsigned int _REG_RE_NAME (regs_allocated) : 2; /* Set to zero when `re_compile_pattern' compiles a pattern; set to one by `re_compile_fastmap' if it updates the fastmap. */ unsigned int _REG_RE_NAME (fastmap_accurate) : 1; /* If set, `re_match_2' does not return information about subexpressions. */ unsigned int _REG_RE_NAME (no_sub) : 1; /* If set, a beginning-of-line anchor doesn't match at the beginning of the string. */ unsigned int _REG_RE_NAME (not_bol) : 1; /* Similarly for an end-of-line anchor. */ unsigned int _REG_RE_NAME (not_eol) : 1; /* If true, an anchor at a newline matches. */ unsigned int _REG_RE_NAME (newline_anchor) : 1; /* [[[end pattern_buffer]]] */ }; typedef struct re_pattern_buffer regex_t; /* This is the structure we store register match data in. See regex.texinfo for a full description of what registers match. */ struct re_registers { __re_size_t _REG_RM_NAME (num_regs); regoff_t *_REG_RM_NAME (start); regoff_t *_REG_RM_NAME (end); }; /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, `re_match_2' returns information about at least this many registers the first time a `regs' structure is passed. */ #if !defined RE_NREGS && defined __USE_GNU_REGEX # define RE_NREGS 30 #endif /* POSIX specification for registers. Aside from the different names than `re_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { regoff_t rm_so; /* Byte offset from string's start to substring's start. */ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ } regmatch_t; /* Declarations for routines. */ /* Sets the current default syntax to SYNTAX, and return the old syntax. You can also simply assign to the `re_syntax_options' variable. */ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); /* Compile the regular expression PATTERN, with length LENGTH and syntax given by the global `re_syntax_options', into the buffer BUFFER. Return NULL if successful, and an error string if not. */ extern const char *re_compile_pattern (const char *__pattern, size_t __length, struct re_pattern_buffer *__buffer); /* Compile a fastmap for the compiled pattern in BUFFER; used to accelerate searches. Return 0 if successful and -2 if was an internal error. */ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); /* Search in the string STRING (with length LENGTH) for the pattern compiled into BUFFER. Start searching at position START, for RANGE characters. Return the starting position of the match, -1 for no match, or -2 for an internal error. Also return register information in REGS (if REGS and BUFFER->no_sub are nonzero). */ extern regoff_t re_search (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, regoff_t __range, struct re_registers *__regs); /* Like `re_search', but search in the concatenation of STRING1 and STRING2. Also, stop searching at index START + STOP. */ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, const char *__string1, __re_idx_t __length1, const char *__string2, __re_idx_t __length2, __re_idx_t __start, regoff_t __range, struct re_registers *__regs, __re_idx_t __stop); /* Like `re_search', but return how many characters in STRING the regexp in BUFFER matched, starting at position START. */ extern regoff_t re_match (struct re_pattern_buffer *__buffer, const char *__string, __re_idx_t __length, __re_idx_t __start, struct re_registers *__regs); /* Relates to `re_match' as `re_search_2' relates to `re_search'. */ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, const char *__string1, __re_idx_t __length1, const char *__string2, __re_idx_t __length2, __re_idx_t __start, struct re_registers *__regs, __re_idx_t __stop); /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated with malloc, and must each be at least `NUM_REGS * sizeof (regoff_t)' bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using BUFFER will allocate its own register data, without freeing the old data. */ extern void re_set_registers (struct re_pattern_buffer *__buffer, struct re_registers *__regs, __re_size_t __num_regs, regoff_t *__starts, regoff_t *__ends); #if defined _REGEX_RE_COMP || defined _LIBC # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); extern int re_exec (const char *); # endif #endif /* GCC 2.95 and later have "__restrict"; C99 compilers have "restrict", and "configure" may have defined "restrict". Other compilers use __restrict, __restrict__, and _Restrict, and 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ # if 199901L <= __STDC_VERSION__ # define _Restrict_ restrict # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) # define _Restrict_ __restrict # else # define _Restrict_ # endif #endif /* gcc 3.1 and up support the [restrict] syntax. Don't trust sys/cdefs.h's definition of __restrict_arr, though, as it mishandles gcc -ansi -pedantic. */ #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ && !__STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ # endif #endif /* POSIX compatibility. */ extern int regcomp (regex_t *_Restrict_ __preg, const char *_Restrict_ __pattern, int __cflags); extern int regexec (const regex_t *_Restrict_ __preg, const char *_Restrict_ __string, size_t __nmatch, regmatch_t __pmatch[_Restrict_arr_], int __eflags); extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, char *_Restrict_ __errbuf, size_t __errbuf_size); extern void regfree (regex_t *__preg); #ifdef __cplusplus } #endif /* C++ */ #endif /* regex.h */ dico-2.2/gnu/regex_internal.c000066400000000000000000001365641172612674100162640ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Extended regular expression matching and search library. Copyright (C) 2002-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) internal_function; static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) internal_function; static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) internal_function; /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; Idx init_buf_len; /* Ensure at least one character fits into the buffers. */ if (init_len < dfa->mb_cur_max) init_len = dfa->mb_cur_max; init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_construct (re_string_t *pstr, const char *str, Idx len, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { reg_errcode_t ret; memset (pstr, '\0', sizeof (re_string_t)); re_string_construct_common (str, len, pstr, trans, icase, dfa); if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; if (icase) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; if (pstr->valid_raw_len >= len) break; if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; } } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else { pstr->valid_len = pstr->bufs_len; pstr->valid_raw_len = pstr->bufs_len; } } } return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs; /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) return REG_ESPACE; new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_wcs == NULL, 0)) return REG_ESPACE; pstr->wcs = new_wcs; if (pstr->offsets != NULL) { Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); if (BE (new_offsets == NULL, 0)) return REG_ESPACE; pstr->offsets = new_offsets; } } #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_mbs == NULL, 0)) return REG_ESPACE; pstr->mbs = new_mbs; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void internal_function re_string_construct_common (const char *str, Idx len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) { pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->raw_len = len; pstr->trans = trans; pstr->icase = icase; pstr->mbs_allocated = (trans != NULL || icase); pstr->mb_cur_max = dfa->mb_cur_max; pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; pstr->raw_stop = pstr->stop; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: (0), (1), (0), (1), Then wide character buffer will be: , WEOF , , WEOF , We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void internal_function build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else unsigned char buf[64]; #endif mbstate_t prev_st; Idx byte_idx, end_idx, remain_len; size_t mbclen; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; const char *p; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; /* Apply the translation if we need. */ if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; if (BE (pstr->trans != NULL, 0)) wc = pstr->trans[wc]; pstr->cur_state = prev_st; } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ build_wcs_upper_buffer (re_string_t *pstr) { mbstate_t prev_st; Idx src_idx, byte_idx, end_idx, remain_len; size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; assert (MB_LEN_MAX >= pstr->mb_cur_max); #else char buf[64]; #endif byte_idx = pstr->valid_len; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; /* The following optimization assumes that ASCII characters can be mapped to wide characters with a simple cast. */ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) { while (byte_idx < end_idx) { wchar_t wc; if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) && mbsinit (&pstr->cur_state)) { /* In case of a singlebyte character. */ pstr->mbs[byte_idx] = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); /* The next step uses the assumption that wchar_t is encoded ASCII-safe: all ASCII values can be converted like this. */ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; ++byte_idx; continue; } remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb (buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else { src_idx = byte_idx; goto offsets_needed; } } else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->mbs[byte_idx] = ch; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = byte_idx; return REG_NOERROR; } else for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) { wchar_t wc; const char *p; offsets_needed: remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; if (BE (pstr->trans != NULL, 0)) { int i, ch; for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; } p = (const char *) buf; } else p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); if (BE (mbclen < (size_t) -2, 1)) { wchar_t wcu = wc; if (iswlower (wc)) { size_t mbcdlen; wcu = towupper (wc); mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); if (BE (mbclen == mbcdlen, 1)) memcpy (pstr->mbs + byte_idx, buf, mbclen); else if (mbcdlen != (size_t) -1) { size_t i; if (byte_idx + mbcdlen > pstr->bufs_len) { pstr->cur_state = prev_st; break; } if (pstr->offsets == NULL) { pstr->offsets = re_malloc (Idx, pstr->bufs_len); if (pstr->offsets == NULL) return REG_ESPACE; } if (!pstr->offsets_needed) { for (i = 0; i < (size_t) byte_idx; ++i) pstr->offsets[i] = i; pstr->offsets_needed = 1; } memcpy (pstr->mbs + byte_idx, buf, mbcdlen); pstr->wcs[byte_idx] = wcu; pstr->offsets[byte_idx] = src_idx; for (i = 1; i < mbcdlen; ++i) { pstr->offsets[byte_idx + i] = src_idx + (i < mbclen ? i : mbclen - 1); pstr->wcs[byte_idx + i] = WEOF; } pstr->len += mbcdlen - mbclen; if (pstr->raw_stop > src_idx) pstr->stop += mbcdlen - mbclen; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; byte_idx += mbcdlen; src_idx += mbclen; continue; } else memcpy (pstr->mbs + byte_idx, p, mbclen); } else memcpy (pstr->mbs + byte_idx, p, mbclen); if (BE (pstr->offsets_needed != 0, 0)) { size_t i; for (i = 0; i < mbclen; ++i) pstr->offsets[byte_idx + i] = src_idx + i; } src_idx += mbclen; pstr->wcs[byte_idx++] = wcu; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } else if (mbclen == (size_t) -1 || mbclen == 0) { /* It is an invalid character or '\0'. Just use the byte. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans [ch]; pstr->mbs[byte_idx] = ch; if (BE (pstr->offsets_needed != 0, 0)) pstr->offsets[byte_idx] = src_idx; ++src_idx; /* And also cast it to wide char. */ pstr->wcs[byte_idx++] = (wchar_t) ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } } pstr->valid_len = byte_idx; pstr->valid_raw_len = src_idx; return REG_NOERROR; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static Idx internal_function re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) { mbstate_t prev_st; Idx rawbuf_idx; size_t mbclen; wint_t wc = WEOF; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; rawbuf_idx < new_raw_idx;) { wchar_t wc2; Idx remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a single byte character. */ if (mbclen == 0 || remain_len == 0) wc = L'\0'; else wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); mbclen = 1; pstr->cur_state = prev_st; } else wc = wc2; /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void internal_function build_upper_buffer (re_string_t *pstr) { Idx char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; if (islower (ch)) pstr->mbs[char_idx] = toupper (ch); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void internal_function re_string_translate_buffer (re_string_t *pstr) { Idx buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; pstr->valid_raw_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of pstr->mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) { Idx offset; if (BE (pstr->raw_mbs_idx <= idx, 0)) offset = idx - pstr->raw_mbs_idx; else { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; pstr->raw_mbs_idx = 0; pstr->valid_raw_len = 0; pstr->offsets_needed = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!pstr->mbs_allocated) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (BE (offset != 0, 1)) { /* Should the already checked characters be kept? */ if (BE (offset < pstr->valid_raw_len, 1)) { /* Yes, move them to the front of the buffer. */ #ifdef RE_ENABLE_I18N if (BE (pstr->offsets_needed, 0)) { Idx low = 0, high = pstr->valid_len, mid; do { mid = (high + low) / 2; if (pstr->offsets[mid] > offset) high = mid; else if (pstr->offsets[mid] < offset) low = mid + 1; else break; } while (low < high); if (pstr->offsets[mid] < offset) ++mid; pstr->tip_context = re_string_context_at (pstr, mid - 1, eflags); /* This can be quite complicated, so handle specially only the common and easy case where the character with different length representation of lower and upper case is present at or after offset. */ if (pstr->valid_len > offset && mid == offset && pstr->offsets[mid] == offset) { memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; for (low = 0; low < pstr->valid_len; low++) pstr->offsets[low] = pstr->offsets[low + offset] - offset; } else { /* Otherwise, just find out how long the partial multibyte character at offset is and fill it with WEOF/255. */ pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; while (mid > 0 && pstr->offsets[mid - 1] == offset) --mid; while (mid < pstr->valid_len) if (pstr->wcs[mid] != WEOF) break; else ++mid; if (mid == pstr->valid_len) pstr->valid_len = 0; else { pstr->valid_len = pstr->offsets[mid] - offset; if (pstr->valid_len) { for (low = 0; low < pstr->valid_len; ++low) pstr->wcs[low] = WEOF; memset (pstr->mbs, 255, pstr->valid_len); } } pstr->valid_raw_len = pstr->valid_len; } } else #endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif } } else { #ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ Idx prev_valid_len = pstr->valid_len; if (BE (pstr->offsets_needed, 0)) { pstr->len = pstr->raw_len - idx + offset; pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { Idx wcs_idx; wint_t wc = WEOF; if (pstr->is_utf8) { const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; end = raw + (offset - pstr->mb_cur_max); if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; #ifdef _LIBC /* We know the wchar_t encoding is UCS4, so for the simple case, ASCII characters, skip the conversion step. */ if (isascii (*p) && BE (pstr->trans == NULL, 1)) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); /* pstr->valid_len = 0; */ wc = (wchar_t) *p; } else #endif for (; p >= end; --p) if ((*p & 0xc0) != 0x80) { mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; size_t mbclen; #if 0 /* dead code: buf is set but never used */ unsigned char buf[6]; if (BE (pstr->trans != NULL, 0)) { int i = mlen < 6 ? mlen : 6; while (--i >= 0) buf[i] = pstr->trans[p[i]]; } #endif /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); mbclen = __mbrtowc (&wc2, (const char *) p, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) { memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); pstr->valid_len = mbclen - (raw + offset - p); wc = wc2; } break; } } if (wc == WEOF) pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; if (wc == WEOF) pstr->tip_context = re_string_context_at (pstr, prev_valid_len - 1, eflags); else pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) ? CONTEXT_WORD : ((IS_WIDE_NEWLINE (wc) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); if (BE (pstr->valid_len, 0)) { for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->mbs_allocated) memset (pstr->mbs, 255, pstr->valid_len); } pstr->valid_raw_len = pstr->valid_len; } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (bitset_contain (pstr->word_char, c) ? CONTEXT_WORD : ((IS_NEWLINE (c) && pstr->newline_anchor) ? CONTEXT_NEWLINE : 0)); } } if (!BE (pstr->mbs_allocated, 0)) pstr->mbs += offset; } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) { reg_errcode_t ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ if (BE (pstr->mbs_allocated, 0)) { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } else pstr->valid_len = pstr->len; pstr->cur_idx = 0; return REG_NOERROR; } static unsigned char internal_function __attribute ((pure)) re_string_peek_byte_case (const re_string_t *pstr, Idx idx) { int ch; Idx off; /* Handle the common (easiest) cases first. */ if (BE (!pstr->mbs_allocated, 1)) return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif off = pstr->cur_idx + idx; #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; #endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; #ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); #endif return ch; } static unsigned char internal_function __attribute ((pure)) re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) return re_string_fetch_byte (pstr); #ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { Idx off; int ch; /* For tr_TR.UTF-8 [[:islower:]] there is [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip in that case the whole multi-byte character and return the original letter. On the other side, with [[: DOTLESS SMALL LETTER I return [[:I, as doing anything else would complicate things too much. */ if (!re_string_first_byte (pstr, pstr->cur_idx)) return re_string_fetch_byte (pstr); off = pstr->offsets[pstr->cur_idx]; ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; if (! isascii (ch)) return re_string_fetch_byte (pstr); re_string_skip_bytes (pstr, re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } #endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } static void internal_function re_string_destruct (re_string_t *pstr) { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); #endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } /* Return the context at IDX in INPUT. */ static unsigned int internal_function re_string_context_at (const re_string_t *input, Idx idx, int eflags) { int c; if (BE (! REG_VALID_INDEX (idx), 0)) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; if (BE (idx == input->len, 0)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; Idx wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #ifdef DEBUG /* It must not happen. */ assert (REG_VALID_INDEX (wc_idx)); #endif --wc_idx; if (! REG_VALID_INDEX (wc_idx)) return input->tip_context; } wc = input->wcs[wc_idx]; if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (IS_WIDE_NEWLINE (wc) && input->newline_anchor ? CONTEXT_NEWLINE : 0); } else #endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) return CONTEXT_WORD; return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_alloc (re_node_set *set, Idx size) { set->alloc = size; set->nelem = 0; set->elems = re_malloc (Idx, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_1 (re_node_set *set, Idx elem) { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (Idx, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) { set->alloc = 2; set->elems = re_malloc (Idx, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_copy (re_node_set *dest, const re_node_set *src) { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, is, id, delta, sbase; if (src1->nelem == 0 || src2->nelem == 0) return REG_NOERROR; /* We need dest->nelem + 2 * elems_in_intersection; this is a conservative estimate. */ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_elems == NULL, 0)) return REG_ESPACE; dest->elems = new_elems; dest->alloc = new_alloc; } /* Find the items in the intersection of SRC1 and SRC2, and copy into the top of DEST those that are not already in DEST itself. */ sbase = dest->nelem + src1->nelem + src2->nelem; i1 = src1->nelem - 1; i2 = src2->nelem - 1; id = dest->nelem - 1; for (;;) { if (src1->elems[i1] == src2->elems[i2]) { /* Try to find the item in DEST. Maybe we could binary search? */ while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) --id; if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) dest->elems[--sbase] = src1->elems[i1]; if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) break; } /* Lower the highest of the two items. */ else if (src1->elems[i1] < src2->elems[i2]) { if (! REG_VALID_INDEX (--i2)) break; } else { if (! REG_VALID_INDEX (--i1)) break; } } id = dest->nelem - 1; is = dest->nelem + src1->nelem + src2->nelem - 1; delta = is - sbase + 1; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place; this is more or less the same loop that is in re_node_set_merge. */ dest->nelem += delta; if (delta > 0 && REG_VALID_INDEX (id)) for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (! REG_VALID_INDEX (--id)) break; } } /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_init_union (re_node_set *dest, const re_node_set *src1, const re_node_set *src2) { Idx i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (Idx, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (Idx)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (Idx)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_node_set_merge (re_node_set *dest, const re_node_set *src) { Idx is, id, sbase, delta; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < 2 * src->nelem + dest->nelem) { Idx new_alloc = 2 * (src->nelem + dest->alloc); Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; dest->alloc = new_alloc; } if (BE (dest->nelem == 0, 0)) { dest->nelem = src->nelem; memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); return REG_NOERROR; } /* Copy into the top of DEST the items of SRC that are not found in DEST. Maybe we could binary search in DEST? */ for (sbase = dest->nelem + 2 * src->nelem, is = src->nelem - 1, id = dest->nelem - 1; REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) { if (dest->elems[id] == src->elems[is]) is--, id--; else if (dest->elems[id] < src->elems[is]) dest->elems[--sbase] = src->elems[is--]; else /* if (dest->elems[id] > src->elems[is]) */ --id; } if (REG_VALID_INDEX (is)) { /* If DEST is exhausted, the remaining items of SRC must be unique. */ sbase -= is + 1; memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); } id = dest->nelem - 1; is = dest->nelem + 2 * src->nelem - 1; delta = is - sbase + 1; if (delta == 0) return REG_NOERROR; /* Now copy. When DELTA becomes zero, the remaining DEST elements are already in place. */ dest->nelem += delta; for (;;) { if (dest->elems[is] > dest->elems[id]) { /* Copy from the top. */ dest->elems[id + delta--] = dest->elems[is--]; if (delta == 0) break; } else { /* Slide from the bottom. */ dest->elems[id + delta] = dest->elems[id]; if (! REG_VALID_INDEX (--id)) { /* Copy remaining SRC elements. */ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); break; } } } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert (re_node_set *set, Idx elem) { Idx idx; /* In case the set is empty. */ if (set->alloc == 0) return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); if (BE (set->nelem, 0) == 0) { /* We already guaranteed above that set->alloc != 0. */ set->elems[0] = elem; ++set->nelem; return true; } /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = set->alloc * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Move the elements which follows the new element. Test the first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } else { for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] = set->elems[idx - 1]; } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return true; } /* Insert the new element ELEM to the re_node_set* SET. SET should not already have any element greater than or equal to ELEM. Return true if successful. */ static bool internal_function __attribute_warn_unused_result__ re_node_set_insert_last (re_node_set *set, Idx elem) { /* Realloc if we need. */ if (set->alloc == set->nelem) { Idx *new_elems; set->alloc = (set->alloc + 1) * 2; new_elems = re_realloc (set->elems, Idx, set->alloc); if (BE (new_elems == NULL, 0)) return false; set->elems = new_elems; } /* Insert the new element. */ set->elems[set->nelem++] = elem; return true; } /* Compare two node sets SET1 and SET2. Return true if SET1 and SET2 are equivalent. */ static bool internal_function __attribute ((pure)) re_node_set_compare (const re_node_set *set1, const re_node_set *set2) { Idx i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return false; for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) if (set1->elems[i] != set2->elems[i]) return false; return true; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static Idx internal_function __attribute ((pure)) re_node_set_contains (const re_node_set *set, Idx elem) { __re_size_t idx, right, mid; if (! REG_VALID_NONZERO_INDEX (set->nelem)) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void internal_function re_node_set_remove_at (re_node_set *set, Idx idx) { if (idx < 0 || idx >= set->nelem) return; --set->nelem; for (; idx < set->nelem; idx++) set->elems[idx] = set->elems[idx + 1]; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return REG_MISSING if an error occurred. */ static Idx internal_function re_dfa_add_node (re_dfa_t *dfa, re_token_t token) { if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) { size_t new_nodes_alloc = dfa->nodes_alloc * 2; Idx *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures; re_token_t *new_nodes; size_t max_object_size = MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), sizeof (Idx))); /* Avoid overflows. */ if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0)) return REG_MISSING; new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); if (BE (new_nodes == NULL, 0)) return REG_MISSING; dfa->nodes = new_nodes; new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL, 0)) return REG_MISSING; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->nodes_alloc = new_nodes_alloc; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N { int type = token.type; dfa->nodes[dfa->nodes_len].accept_mb = (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; } #endif dfa->nexts[dfa->nodes_len] = REG_MISSING; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); return dfa->nodes_len++; } static inline re_hashval_t internal_function calc_state_hash (const re_node_set *nodes, unsigned int context) { re_hashval_t hash = nodes->nelem + context; Idx i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #ifdef lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context) { re_hashval_t hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; Idx i; #ifdef lint /* Suppress bogus uninitialized-variable warnings. */ *err = REG_NOERROR; #endif if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (state->hash == hash && state->context == context && re_node_set_compare (state->entrance_nodes, nodes)) return state; } /* There are no appropriate state in `dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state == NULL, 0)) *err = REG_ESPACE; return new_state; } /* Finish initialization of the new state NEWSTATE, and using its hash value HASH put in the appropriate bucket of DFA's state table. Return value indicates the error code if failed. */ static reg_errcode_t __attribute_warn_unused_result__ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, re_hashval_t hash) { struct re_state_table_entry *spot; reg_errcode_t err; Idx i; newstate->hash = hash; err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < newstate->nodes.nelem; i++) { Idx elem = newstate->nodes.elems[i]; if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0)) return REG_ESPACE; } spot = dfa->state_table + (hash & dfa->state_hash_mask); if (BE (spot->alloc <= spot->num, 0)) { Idx new_alloc = 2 * spot->num + 2; re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; spot->alloc = new_alloc; } spot->array[spot->num++] = newstate; return REG_NOERROR; } static void free_state (re_dfastate_t *state) { re_node_set_free (&state->non_eps_nodes); re_node_set_free (&state->inveclosure); if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->word_trtable); re_free (state->trtable); re_free (state); } /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_hashval_t hash) { Idx i; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, re_hashval_t hash) { Idx i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; if (type == CHARACTER && !constraint) continue; #ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; #endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) newstate->halt = 1; else if (type == OP_BACK_REF) newstate->has_backref = 1; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) return NULL; nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } dico-2.2/gnu/regex_internal.h000066400000000000000000000570611172612674100162630ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Extended regular expression matching and search library. Copyright (C) 2002-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include #include #include #include #include #include #include #ifndef _LIBC # include "localcharset.h" #endif #include #include #include #include #if defined _LIBC # include #else # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) #endif /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include # include # include # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext # define gettext(msgid) \ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) # endif #else # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif /* For loser systems without the definition. */ #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) #endif #if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) # ifdef _LIBC # define inline # endif #endif /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 /* Number of single byte characters. */ #define SBC_MAX (UCHAR_MAX + 1) #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # define __wctype wctype # define __iswctype iswctype # define __btowc btowc # define __wcrtomb wcrtomb # define __mbrtowc mbrtowc # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) # define __attribute(arg) __attribute__ (arg) #else # define __attribute(arg) #endif typedef __re_idx_t Idx; /* Special return value for failure to match. */ #define REG_MISSING ((Idx) -1) /* Special return value for internal error. */ #define REG_ERROR ((Idx) -2) /* Test whether N is a valid index, and is not one of the above. */ #ifdef _REGEX_LARGE_OFFSETS # define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) #else # define REG_VALID_INDEX(n) (0 <= (n)) #endif /* Test whether N is a valid nonzero index. */ #ifdef _REGEX_LARGE_OFFSETS # define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) #else # define REG_VALID_NONZERO_INDEX(n) (0 < (n)) #endif /* A hash value, suitable for computing hash tables. */ typedef __re_size_t re_hashval_t; /* An integer used to represent a set of bits. It must be unsigned, and must be at least as wide as unsigned int. */ typedef unsigned long int bitset_word_t; /* All bits set in a bitset_word_t. */ #define BITSET_WORD_MAX ULONG_MAX /* Number of bits in a bitset_word_t. For portability to hosts with padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; instead, deduce it directly from BITSET_WORD_MAX. Avoid greater-than-32-bit integers and unconditional shifts by more than 31 bits, as they're not portable. */ #if BITSET_WORD_MAX == 0xffffffffUL # define BITSET_WORD_BITS 32 #elif BITSET_WORD_MAX >> 31 >> 4 == 1 # define BITSET_WORD_BITS 36 #elif BITSET_WORD_MAX >> 31 >> 16 == 1 # define BITSET_WORD_BITS 48 #elif BITSET_WORD_MAX >> 31 >> 28 == 1 # define BITSET_WORD_BITS 60 #elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 # define BITSET_WORD_BITS 64 #elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 # define BITSET_WORD_BITS 72 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 # define BITSET_WORD_BITS 128 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 # define BITSET_WORD_BITS 256 #elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 # define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ # if BITSET_WORD_BITS <= SBC_MAX # error "Invalid SBC_MAX" # endif #else # error "Add case for new bitset_word_t size" #endif /* Number of bitset_word_t values in a bitset_t. */ #define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) typedef bitset_word_t bitset_t[BITSET_WORDS]; typedef bitset_word_t *re_bitset_ptr_t; typedef const bitset_word_t *re_const_bitset_ptr_t; #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define WORD_DELIM_CONSTRAINT 0x0100 #define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = WORD_DELIM_CONSTRAINT, NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct { Idx alloc; Idx nelem; Idx *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Node type, These are used by token, node, tree. */ CHARACTER = 1, END_OF_RE = 2, SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, #endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ #define EPSILON_BIT 8 OP_OPEN_SUBEXP = EPSILON_BIT | 0, OP_CLOSE_SUBEXP = EPSILON_BIT | 1, OP_ALT = EPSILON_BIT | 2, OP_DUP_ASTERISK = EPSILON_BIT | 3, ANCHOR = EPSILON_BIT | 4, /* Tree type, these are used only by tree. */ CONCAT = 16, SUBEXP = 17, /* Token type, these are used only by token. */ OP_DUP_PLUS = 18, OP_DUP_QUESTION, OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, OP_SPACE, OP_NOTSPACE, BACK_SLASH } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ Idx nmbchars; /* # of collating symbols. */ Idx ncoll_syms; /* # of equivalence classes. */ Idx nequiv_classes; /* # of range expressions. */ Idx nranges; /* # of character classes. */ Idx nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 && !__STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; #ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; #endif unsigned int word_char : 1; } re_token_t; #define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; Idx *offsets; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ Idx raw_mbs_idx; /* The length of the valid characters in the buffers. */ Idx valid_len; /* The corresponding number of bytes in raw_mbs array. */ Idx valid_raw_len; /* The length of the buffers MBS and WCS. */ Idx bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ Idx cur_idx; /* length of RAW_MBS array. */ Idx raw_len; /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ Idx len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ Idx raw_stop; /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ Idx stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* Copy of re_dfa_t's word_char. */ re_const_bitset_ptr_t word_char; /* true if REG_ICASE. */ unsigned char icase; unsigned char is_utf8; unsigned char map_notascii; unsigned char mbs_allocated; unsigned char offsets_needed; unsigned char newline_anchor; unsigned char word_ops_used; int mb_cur_max; }; typedef struct re_string_t re_string_t; struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; #ifndef _LIBC # if defined __i386__ && !defined __EMX__ # define internal_function __attribute ((regparm (3), stdcall)) # else # define internal_function # endif #endif static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) internal_function; #ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr) internal_function; static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; #endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr) internal_function; static void re_string_translate_buffer (re_string_t *pstr) internal_function; static unsigned int re_string_context_at (const re_string_t *input, Idx idx, int eflags) internal_function __attribute ((pure)); #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #include #ifndef _LIBC # if HAVE_ALLOCA /* The OS usually guarantees only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely allocate anything larger than 4096 bytes. Also care for the possibility of a few compiler-allocated temporary stack slots. */ # define __libc_use_alloca(n) ((n) < 4032) # else /* alloca is implemented with malloc, so just use malloc. */ # define __libc_use_alloca(n) 0 # undef alloca # define alloca(n) malloc (n) # endif #endif #ifndef MAX # define MAX(a,b) ((a) < (b) ? (b) : (a)) #endif #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; struct bin_tree_t *first; struct bin_tree_t *next; re_token_t token; /* `node_idx' is the index in dfa->nodes, if `type' == 0. Otherwise `type' indicate the type of this node. */ Idx node_idx; }; typedef struct bin_tree_t bin_tree_t; #define BIN_TREE_STORAGE_SIZE \ ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) struct bin_tree_storage_t { struct bin_tree_storage_t *next; bin_tree_t data[BIN_TREE_STORAGE_SIZE]; }; typedef struct bin_tree_storage_t bin_tree_storage_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { re_hashval_t hash; re_node_set nodes; re_node_set non_eps_nodes; re_node_set inveclosure; re_node_set *entrance_nodes; struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; /* If this state can accept `multi byte'. Note that we refer to multibyte characters, and multi character collating elements as `multi byte'. */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; struct re_state_table_entry { Idx num; Idx alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { Idx next_idx; Idx alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { Idx node; Idx str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { Idx str_idx; Idx node; state_array_t *path; Idx alasts; /* Allocation size of LASTS. */ Idx nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { Idx node; Idx str_idx; Idx subexp_from; Idx subexp_to; char more; char unused; unsigned short int eps_reachable_subexps_map; }; typedef struct { /* The string object corresponding to the input string. */ re_string_t input; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) const re_dfa_t *const dfa; #else const re_dfa_t *dfa; #endif /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ Idx match_last; Idx last_node; /* The state log used by the matcher. */ re_dfastate_t **state_log; Idx state_log_top; /* Back reference cache. */ Idx nbkref_ents; Idx abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; Idx nsub_tops; Idx asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { re_dfastate_t **sifted_states; re_dfastate_t **limited_states; Idx last_node; Idx last_str_idx; re_node_set limits; } re_sift_context_t; struct re_fail_stack_ent_t { Idx idx; Idx node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { Idx num; Idx alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_token_t *nodes; size_t nodes_alloc; size_t nodes_len; Idx *nexts; Idx *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; bin_tree_t *str_tree; bin_tree_storage_t *str_tree_storage; re_bitset_ptr_t sb_char; int str_tree_storage_idx; /* number of subexpressions `re_nsub' is in regex_t. */ re_hashval_t state_hash_mask; Idx init_node; Idx nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ bitset_word_t used_bkref_map; bitset_word_t completed_bkref_map; unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; unsigned int is_utf8 : 1; unsigned int map_notascii : 1; unsigned int word_ops_used : 1; int mb_cur_max; bitset_t word_char; reg_syntax_t syntax; Idx *subexp_map; #ifdef DEBUG char* re_str; #endif #ifdef _LIBC __libc_lock_define (, lock) #endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Inline functions for bitset_t operation. */ static inline void bitset_set (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; } static inline void bitset_clear (bitset_t set, Idx i) { set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); } static inline bool bitset_contain (const bitset_t set, Idx i) { return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; } static inline void bitset_empty (bitset_t set) { memset (set, '\0', sizeof (bitset_t)); } static inline void bitset_set_all (bitset_t set) { memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; } static inline void bitset_copy (bitset_t dest, const bitset_t src) { memcpy (dest, src, sizeof (bitset_t)); } static inline void bitset_not (bitset_t set) { int bitset_i; for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; if (SBC_MAX % BITSET_WORD_BITS != 0) set[BITSET_WORDS - 1] = ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) & ~set[BITSET_WORDS - 1]); } static inline void bitset_merge (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_mask (bitset_t dest, const bitset_t src) { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) dest[bitset_i] &= src[bitset_i]; } #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int internal_function __attribute ((pure)) re_string_char_size_at (const re_string_t *pstr, Idx idx) { int byte_idx; if (pstr->mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static inline wint_t internal_function __attribute ((pure)) re_string_wchar_at (const re_string_t *pstr, Idx idx) { if (pstr->mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { # ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; # include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; tmp = findidx (&p); return p - pstr->mbs - idx; } else # endif /* _LIBC */ return 1; } #endif /* RE_ENABLE_I18N */ #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # else # define __GNUC_PREREQ(maj, min) 0 # endif #endif #if __GNUC_PREREQ (3,4) # undef __attribute_warn_unused_result__ # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #else # define __attribute_warn_unused_result__ /* empty */ #endif #endif /* _REGEX_INTERNAL_H */ dico-2.2/gnu/regexec.c000066400000000000000000004000601172612674100146610ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Extended regular expression matching and search library. Copyright (C) 2002-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, Idx n) internal_function; static void match_ctx_clean (re_match_context_t *mctx) internal_function; static void match_ctx_free (re_match_context_t *cache) internal_function; static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, Idx str_idx, Idx from, Idx to) internal_function; static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) internal_function; static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) internal_function; static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) internal_function; static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) internal_function; static reg_errcode_t re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) internal_function; static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) internal_function; static regoff_t re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) internal_function; static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) internal_function; static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) internal_function; static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) internal_function; static Idx check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) internal_function; static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) internal_function; static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) internal_function; static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) internal_function; static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) internal_function; #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) internal_function; static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) internal_function; static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) internal_function; static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) internal_function; static bool check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) internal_function; static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) internal_function; static int check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx node, Idx str_idx, Idx bkref_idx) internal_function; static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) internal_function; static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) internal_function; static reg_errcode_t merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) internal_function; static re_dfastate_t *find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) internal_function; static re_dfastate_t *transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) internal_function; static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) internal_function; static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) internal_function; #if 0 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) internal_function; #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) internal_function; static reg_errcode_t get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) internal_function; static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) internal_function; static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) internal_function; static reg_errcode_t check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) internal_function; static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) internal_function; static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) internal_function; static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) internal_function; static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) internal_function; static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) internal_function; #ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx idx) internal_function; # ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len) internal_function; # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset_t *states_ch) internal_function; static bool check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) internal_function; static reg_errcode_t extend_buffers (re_match_context_t *mctx) internal_function; /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *_Restrict_ preg; const char *_Restrict_ string; size_t nmatch; regmatch_t pmatch[_Restrict_arr_]; int eflags; { reg_errcode_t err; Idx start, length; #ifdef _LIBC re_dfa_t *dfa = (re_dfa_t *) preg->buffer; #endif if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) return REG_BADPAT; if (eflags & REG_STARTEND) { start = pmatch[0].rm_so; length = pmatch[0].rm_eo; } else { start = 0; length = strlen (string); } __libc_lock_lock (dfa->lock); if (preg->no_sub) err = re_search_internal (preg, string, length, start, length, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, start, length, length, nmatch, pmatch, eflags); __libc_lock_unlock (dfa->lock); return err != REG_NOERROR; } #ifdef _LIBC # include versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) __typeof__ (__regexec) __compat_regexec; int attribute_compat_text_section __compat_regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, size_t nmatch, regmatch_t pmatch[], int eflags) { return regexec (preg, string, nmatch, pmatch, eflags & (REG_NOTBOL | REG_NOTEOL)); } compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); # endif #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stored in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ regoff_t re_match (bufp, string, length, start, regs) struct re_pattern_buffer *bufp; const char *string; Idx length, start; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, true); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif regoff_t re_search (bufp, string, length, start, range, regs) struct re_pattern_buffer *bufp; const char *string; Idx length, start; regoff_t range; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, false); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif regoff_t re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; Idx length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, true); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif regoff_t re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; Idx length1, length2, start, stop; regoff_t range; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, false); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static regoff_t internal_function re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, regoff_t range, struct re_registers *regs, Idx stop, bool ret_len) { const char *str; regoff_t rval; Idx len = length1 + length2; char *s = NULL; if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; #ifdef _LIBC memcpy (__mempcpy (s, string1, length1), string2, length2); #else memcpy (s, string1, length1); memcpy (s + length1, string2, length2); #endif str = s; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); re_free (s); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is true the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static regoff_t internal_function re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, Idx start, regoff_t range, Idx stop, struct re_registers *regs, bool ret_len) { reg_errcode_t result; regmatch_t *pmatch; Idx nregs; regoff_t rval; int eflags = 0; #ifdef _LIBC re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; #endif Idx last_start = start + range; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (length < last_start || (0 <= range && last_start < start), 0)) last_start = length; else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) last_start = 0; __libc_lock_lock (dfa->lock); eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs <= bufp->re_nsub, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) { rval = -2; goto out; } result = re_search_internal (bufp, string, length, start, last_start, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill ther regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = -1; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); out: __libc_lock_unlock (dfa->lock); return rval; } static unsigned int internal_function re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, int regs_allocated) { int rval = REGS_REALLOCATE; Idx i; Idx need_regs = nregs + 1; /* We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (BE (need_regs > regs->num_regs, 0)) { regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); regoff_t *new_end; if (BE (new_start == NULL, 0)) return REGS_UNALLOCATED; new_end = re_realloc (regs->end, regoff_t, need_regs); if (BE (new_end == NULL, 0)) { re_free (new_start); return REGS_UNALLOCATED; } regs->start = new_start; regs->end = new_end; regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; __re_size_t num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = NULL; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (s) const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same meaning as with regexec. LAST_START is START + RANGE, where START and RANGE have the same meaning as with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (0 <= LAST_START && LAST_START <= LENGTH) */ static reg_errcode_t internal_function __attribute_warn_unused_result__ re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, size_t nmatch, regmatch_t pmatch[], int eflags) { reg_errcode_t err; const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx left_lim, right_lim; int incr; bool fl_longest_match; int match_kind; Idx match_first; Idx match_last = REG_MISSING; Idx extra_nmatch; bool sb; int ch; #if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) re_match_context_t mctx = { .dfa = dfa }; #else re_match_context_t mctx; #endif char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate && start != last_start && !preg->can_be_null) ? preg->fastmap : NULL); RE_TRANSLATE_TYPE t = preg->translate; #if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) memset (&mctx, '\0', sizeof (re_match_context_t)); mctx.dfa = dfa; #endif extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (0 <= last_start && last_start <= length); #endif /* If initial states with non-begbuf contexts have no elements, the regex must be anchored. If preg->newline_anchor is set, we'll never use init_state_nl, so do not check it. */ if (dfa->init_state->nodes.nelem == 0 && dfa->init_state_word->nodes.nelem == 0 && (dfa->init_state_nl->nodes.nelem == 0 || !preg->newline_anchor)) { if (start != 0 && last_start != 0) return REG_NOMATCH; start = last_start = 0; } /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, preg->translate, (preg->syntax & RE_ICASE) != 0, dfa); if (BE (err != REG_NOERROR, 0)) goto free_return; mctx.input.stop = stop; mctx.input.raw_stop = stop; mctx.input.newline_anchor = preg->newline_anchor; err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) { err = REG_ESPACE; goto free_return; } mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; match_first = start; mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF; /* Check incrementally whether of not the input string match. */ incr = (last_start < start) ? -1 : 1; left_lim = (last_start < start) ? last_start : start; right_lim = (last_start < start) ? start : last_start; sb = dfa->mb_cur_max == 1; match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) | (start <= last_start ? 2 : 0) | (t != NULL ? 1 : 0)) : 8); for (;; match_first += incr) { err = REG_NOMATCH; if (match_first < left_lim || right_lim < match_first) goto free_return; /* Advance as rapidly as possible through the string, until we find a plausible place to start matching. This may be done with varying efficiency, so there are various possibilities: only the most common of them are specialized, in order to save on code size. We use a switch statement for speed. */ switch (match_kind) { case 8: /* No fastmap. */ break; case 7: /* Fastmap with single-byte translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; goto forward_match_found_start_or_reached_end; case 6: /* Fastmap without translation, match forward. */ while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; forward_match_found_start_or_reached_end: if (BE (match_first == right_lim, 0)) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) goto free_return; } break; case 4: case 5: /* Fastmap without multi-byte translation, match backwards. */ while (match_first >= left_lim) { ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) goto free_return; break; default: /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ for (;;) { /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ __re_size_t offset = match_first - mctx.input.raw_mbs_idx; if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) { err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; offset = match_first - mctx.input.raw_mbs_idx; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = (match_first >= length ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) break; match_first += incr; if (match_first < left_lim || match_first > right_lim) { err = REG_NOMATCH; goto free_return; } } break; } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the beginning of the buffer. */ err = re_string_reconstruct (&mctx.input, match_first, eflags); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Don't consider this char as a possible match start if it part, yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; #endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (&mctx, fl_longest_match, start <= last_start ? &match_first : NULL); if (match_last != REG_MISSING) { if (BE (match_last == REG_ERROR, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (&mctx, pstate, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (&mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; match_last = REG_MISSING; } else break; /* We found a match. */ } } match_ctx_clean (&mctx); } #ifdef DEBUG assert (match_last != REG_MISSING); assert (err == REG_NOERROR); #endif /* Set pmatch[] if we need. */ if (nmatch > 0) { Idx reg_idx; /* Initialize registers. */ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; /* FIXME: This function should fail if mctx.match_last exceeds the maximum possible regoff_t value. We need a new error code REG_OVERFLOW. */ if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to the each registers, since we slided the buffers so that we could assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { #ifdef RE_ENABLE_I18N if (BE (mctx.input.offsets_needed != 0, 0)) { pmatch[reg_idx].rm_so = (pmatch[reg_idx].rm_so == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_so]); pmatch[reg_idx].rm_eo = (pmatch[reg_idx].rm_eo == mctx.input.valid_len ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } #else assert (mctx.input.offsets_needed == 0); #endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) { pmatch[nmatch + reg_idx].rm_so = -1; pmatch[nmatch + reg_idx].rm_eo = -1; } if (dfa->subexp_map) for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) if (dfa->subexp_map[reg_idx] != reg_idx) { pmatch[reg_idx + 1].rm_so = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; pmatch[reg_idx + 1].rm_eo = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; } } free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&mctx.input); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; Idx halt_node, match_last; reg_errcode_t ret; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; /* Avoid overflow. */ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) return REG_ESPACE; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (! REG_VALID_INDEX (match_last)) { ret = REG_NOMATCH; goto free_return; } } while (mctx->state_log[match_last] == NULL || !mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (mctx, mctx->state_log[match_last], match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); ret = sift_states_backward (mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] == NULL) { ret = REG_NOMATCH; goto free_return; } } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * __attribute ((always_inline)) internal_function acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { const re_dfa_t *const dfa = mctx->dfa; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end. Return REG_MISSING if there is no match, and return REG_ERROR in case of an error. FL_LONGEST_MATCH means we want the POSIX longest matching. If P_MATCH_FIRST is not NULL, and the match fails, it is set to the next place where we may want to try matching. Note that the matcher assume that the maching starts from the current index of the buffer. */ static Idx internal_function __attribute_warn_unused_result__ check_matching (re_match_context_t *mctx, bool fl_longest_match, Idx *p_match_first) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx match = 0; Idx match_last = REG_MISSING; Idx cur_str_idx = re_string_cur_idx (&mctx->input); re_dfastate_t *cur_state; bool at_init_state = p_match_first != NULL; Idx next_start_idx = cur_str_idx; err = REG_NOERROR; cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); /* An initial state must not be NULL (invalid). */ if (BE (cur_state == NULL, 0)) { assert (err == REG_ESPACE); return REG_ERROR; } if (mctx->state_log != NULL) { mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (BE (dfa->nbackref, 0)) { at_init_state = false; err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; if (cur_state->has_backref) { err = transit_state_bkref (mctx, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } } } /* If the RE accepts NULL string. */ if (BE (cur_state->halt, 0)) { if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (&mctx->input)) { re_dfastate_t *old_state = cur_state; Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; if (BE (next_char_idx >= mctx->input.bufs_len, 0) || (BE (next_char_idx >= mctx->input.valid_len, 0) && mctx->input.valid_len < mctx->input.len)) { err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) { assert (err == REG_ESPACE); return REG_ERROR; } } cur_state = transit_state (&err, mctx, cur_state); if (mctx->state_log != NULL) cur_state = merge_state_with_log (&err, mctx, cur_state); if (cur_state == NULL) { /* Reached the invalid state or an error. Try to recover a valid state using the state log, if available and if we have not already found a valid (even if not the longest) match. */ if (BE (err != REG_NOERROR, 0)) return REG_ERROR; if (mctx->state_log == NULL || (match && !fl_longest_match) || (cur_state = find_recover_state (&err, mctx)) == NULL) break; } if (BE (at_init_state, 0)) { if (old_state == cur_state) next_start_idx = next_char_idx; else at_init_state = false; } if (cur_state->halt) { /* Reached a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (mctx, cur_state, re_string_cur_idx (&mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (&mctx->input); match = 1; /* We found a match, do not modify match_first below. */ p_match_first = NULL; if (!fl_longest_match) break; } } } if (p_match_first) *p_match_first += next_start_idx; return match_last; } /* Check NODE match the current context. */ static bool internal_function check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return false; if (!constraint) return true; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return false; return true; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static Idx internal_function check_halt_state_context (const re_match_context_t *mctx, const re_dfastate_t *state, Idx idx) { Idx i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (&mctx->input, idx, mctx->eflags); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES; return REG_MISSING in case of errors. */ static Idx internal_function proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa = mctx->dfa; Idx i; bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; re_node_set *edests = &dfa->edests[node]; Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return REG_ERROR; /* Pick up a valid destination, or return REG_MISSING if none is found. */ for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) { Idx candidate = edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; if (dest_node == REG_MISSING) dest_node = candidate; else { /* In order to avoid infinite loop like "(a*)*", return the second epsilon-transition if the first was already considered. */ if (re_node_set_contains (eps_via_nodes, dest_node)) return candidate; /* Otherwise, push the second epsilon-transition on the fail stack. */ else if (fs != NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, eps_via_nodes)) return REG_ERROR; /* We know we are going to exit. */ break; } } return dest_node; } else { Idx naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { Idx subexp_idx = dfa->nodes[node].opr.idx + 1; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return REG_MISSING; else if (naccepted) { char *buf = (char *) re_string_get_buffer (&mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return REG_MISSING; } } if (naccepted == 0) { Idx dest_node; ok = re_node_set_insert (eps_via_nodes, node); if (BE (! ok, 0)) return REG_ERROR; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (mctx, dfa->nodes + node, *pidx)) { Idx dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return REG_MISSING; re_node_set_empty (eps_via_nodes); return dest_node; } } return REG_MISSING; } static reg_errcode_t internal_function __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { reg_errcode_t err; Idx num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc * 2)); if (new_array == NULL) return REG_ESPACE; fs->alloc *= 2; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dest_node; fs->stack[num].regs = re_malloc (regmatch_t, nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static Idx internal_function pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) { Idx num = --fs->num; assert (REG_VALID_INDEX (num)); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, bool fl_backtrack) { const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; Idx idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body = { 0, 2, NULL }; regmatch_t *prev_idx_match; bool prev_idx_match_malloced = false; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); if (fs->stack == NULL) return REG_ESPACE; } else fs = NULL; cur_node = dfa->init_node; re_node_set_init_empty (&eps_via_nodes); if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); else { prev_idx_match = re_malloc (regmatch_t, nmatch); if (prev_idx_match == NULL) { free_fail_stack_return (fs); return REG_ESPACE; } prev_idx_match_malloced = true; } memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { Idx reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, &eps_via_nodes, fs); if (BE (! REG_VALID_INDEX (cur_node), 0)) { if (BE (cur_node == REG_ERROR, 0)) { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); free_fail_stack_return (fs); return REG_ESPACE; } if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); if (prev_idx_match_malloced) re_free (prev_idx_match); return free_fail_stack_return (fs); } static reg_errcode_t internal_function free_fail_stack_return (struct re_fail_stack_t *fs) { if (fs) { Idx fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void internal_function update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) { int type = dfa->nodes[cur_node].type; if (type == OP_OPEN_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; /* We are at the first node of this sub expression. */ if (reg_num < nmatch) { pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } } else if (type == OP_CLOSE_SUBEXP) { Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx; /* This is a non-empty match or we are not inside an optional subexpression. Accept this right away. */ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); } else { if (dfa->nodes[cur_node].opt_subexp && prev_idx_match[reg_num].rm_so != -1) /* We transited through an empty match for an optional subexpression, like (a?)*, and this is not the subexp's first match. Copy back the old content of the registers so that matches of an inner subexpression are undone as well, like in ((a?))*. */ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); else /* We completed a subexpression, but it may be part of an optional one, so do not update PREV_IDX_MATCH. */ pmatch[reg_num].rm_eo = cur_idx; } } } } /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If `a' isn't the LAST_NODE and `a' can't epsilon transit to the LAST_NODE, we throw away the node `a'. 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts string `s' and transit to `b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is thrown away, we throw away the node `a'. 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, we throw away the node `a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t internal_function sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) { reg_errcode_t err; int null_cnt = 0; Idx str_idx = sctx->last_str_idx; re_node_set cur_dest; #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; if (mctx->state_log[str_idx]) { err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } static reg_errcode_t internal_function __attribute_warn_unused_result__ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *cur_dest) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; Idx i; /* Then build the next sifted state. We build the next sifted state on `cur_dest', and update `sifted_states[str_idx]' with `cur_dest'. Note: `cur_dest' is the sifted state from `state_log[str_idx + 1]'. `cur_src' points the node_set of the old `state_log[str_idx]' (with the epsilon nodes pre-filtered out). */ for (i = 0; i < cur_src->nelem; i++) { Idx prev_node = cur_src->elems[i]; int naccepted = 0; bool ok; #ifdef DEBUG re_token_type_t type = dfa->nodes[prev_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { Idx to_idx = str_idx + naccepted; if (check_dst_limits (mctx, &sctx->limits, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ok = re_node_set_insert (cur_dest, prev_node); if (BE (! ok, 0)) return REG_ESPACE; } return REG_NOERROR; } /* Helper functions. */ static reg_errcode_t internal_function clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) { Idx top = mctx->state_log_top; if (next_state_log_idx >= mctx->input.bufs_len || (next_state_log_idx >= mctx->input.valid_len && mctx->input.valid_len < mctx->input.len)) { reg_errcode_t err; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t internal_function merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, Idx num) { Idx st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t internal_function update_cur_sifted_state (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, re_node_set *dest_nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? NULL : &mctx->state_log[str_idx]->nodes); if (dest_nodes->nelem == 0) sctx->sifted_states[str_idx] = NULL; else { if (candidates) { /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; /* Then, check the limitations in the current sift_context. */ if (sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } if (candidates && mctx->state_log[str_idx]->has_backref) { err = sift_states_bkref (mctx, sctx, str_idx, candidates); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates) { reg_errcode_t err = REG_NOERROR; Idx i; re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; if (!state->inveclosure.alloc) { err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; for (i = 0; i < dest_nodes->nelem; i++) { err = re_node_set_merge (&state->inveclosure, dfa->inveclosures + dest_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) return REG_ESPACE; } } return re_node_set_add_intersect (dest_nodes, candidates, &state->inveclosure); } static reg_errcode_t internal_function sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, const re_node_set *candidates) { Idx ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { Idx edst1 = dfa->edests[cur_node].elems[0]; Idx edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : REG_MISSING); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (REG_VALID_NONZERO_INDEX (edst2) && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { Idx cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static bool internal_function check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx lim_idx, src_pos, dst_pos; Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx; dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, dst_node, dst_idx, dst_bkref_idx); src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], subexp_idx, src_node, src_idx, src_bkref_idx); /* In case of: ( ) ( ) ( ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return true; } return false; } static int internal_function check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, Idx subexp_idx, Idx from_node, Idx bkref_idx) { const re_dfa_t *const dfa = mctx->dfa; const re_node_set *eclosures = dfa->eclosures + from_node; Idx node_idx; /* Else, we are on the boundary: examine the nodes on the epsilon closure. */ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { Idx node = eclosures->elems[node_idx]; switch (dfa->nodes[node].type) { case OP_BACK_REF: if (bkref_idx != REG_MISSING) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; do { Idx dst; int cpos; if (ent->node != node) continue; if (subexp_idx < BITSET_WORD_BITS && !(ent->eps_reachable_subexps_map & ((bitset_word_t) 1 << subexp_idx))) continue; /* Recurse trying to reach the OP_OPEN_SUBEXP and OP_CLOSE_SUBEXP cases below. But, if the destination node is the same node as the source node, don't recurse because it would cause an infinite loop: a regex that exhibits this behavior is ()\1*\1* */ dst = dfa->edests[node].elems[0]; if (dst == from_node) { if (boundaries & 1) return -1; else /* if (boundaries & 2) */ return 0; } cpos = check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, dst, bkref_idx); if (cpos == -1 /* && (boundaries & 1) */) return -1; if (cpos == 0 && (boundaries & 2)) return 0; if (subexp_idx < BITSET_WORD_BITS) ent->eps_reachable_subexps_map &= ~((bitset_word_t) 1 << subexp_idx); } while (ent++->more); } break; case OP_OPEN_SUBEXP: if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) return -1; break; case OP_CLOSE_SUBEXP: if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) return 0; break; default: break; } } return (boundaries & 2) ? 1 : 0; } static int internal_function check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, Idx subexp_idx, Idx from_node, Idx str_idx, Idx bkref_idx) { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int boundaries; /* If we are outside the range of the subexpression, return -1 or 1. */ if (str_idx < lim->subexp_from) return -1; if (lim->subexp_to < str_idx) return 1; /* If we are within the subexpression, return 0. */ boundaries = (str_idx == lim->subexp_from); boundaries |= (str_idx == lim->subexp_to) << 1; if (boundaries == 0) return 0; /* Else, examine epsilon closure. */ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, from_node, bkref_idx); } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t internal_function check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, Idx str_idx) { reg_errcode_t err; Idx node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { Idx subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx; if (ent->subexp_to == str_idx) { Idx ops_node = REG_MISSING; Idx cls_node = REG_MISSING; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (REG_VALID_INDEX (ops_node)) { err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ if (REG_VALID_INDEX (cls_node)) for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { Idx node = dest_nodes->elems[node_idx]; re_token_type_t type = dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } return REG_NOERROR; } static reg_errcode_t internal_function __attribute_warn_unused_result__ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx str_idx, const re_node_set *candidates) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx node_idx, node; re_sift_context_t local_sctx; Idx first_idx = search_cur_bkref_entry (mctx, str_idx); if (first_idx == REG_MISSING) return REG_NOERROR; local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { Idx enabled_idx; re_token_type_t type; struct re_backref_cache_entry *entry; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type != OP_BACK_REF) continue; entry = mctx->bkref_ents + first_idx; enabled_idx = first_idx; do { Idx subexp_len; Idx to_idx; Idx dst_node; bool ok; re_dfastate_t *cur_state; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (mctx, &sctx->limits, node, str_idx, dst_node, to_idx)) continue; if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; ok = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (! ok, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* mctx->bkref_ents may have changed, reload the pointer. */ entry = mctx->bkref_ents + enabled_idx; } while (enabled_idx++, entry++->more); } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int internal_function sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) { const re_dfa_t *const dfa = mctx->dfa; int naccepted; /* Check the node can accept `multi byte'. */ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the `multi byte', or the destination was already thrown away, then the node could't accept the current input `multi byte'. */ naccepted = 0; /* Otherwise, it is sure that the node could accept `naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * internal_function __attribute_warn_unused_result__ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { re_dfastate_t **trtable; unsigned char ch; #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (BE (state->accept_mb, 0)) { *err = transit_state_mb (mctx, state); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 if (0) /* don't use transition table */ return transit_state_sb (err, mctx, state); #endif /* Use transition table */ ch = re_string_fetch_byte (&mctx->input); for (;;) { trtable = state->trtable; if (BE (trtable != NULL, 1)) return trtable[ch]; trtable = state->word_trtable; if (BE (trtable != NULL, 1)) { unsigned int context; context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); if (IS_WORD_CONTEXT (context)) return trtable[ch + SBC_MAX]; else return trtable[ch]; } if (!build_trtable (mctx->dfa, state)) { *err = REG_ESPACE; return NULL; } /* Retry, we now have a transition table. */ } } /* Update the state_log if we need */ static re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) { const re_dfa_t *const dfa = mctx->dfa; Idx cur_idx = re_string_cur_idx (&mctx->input); if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input) - 1, mctx->eflags); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } if (BE (dfa->nbackref, 0) && next_state != NULL) { /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ *err = check_subexp_matching_top (mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; /* If the next state has back references. */ if (next_state->has_backref) { *err = transit_state_bkref (mctx, &next_state->nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } } return next_state; } /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { re_dfastate_t *cur_state; do { Idx max = mctx->state_log_top; Idx cur_str_idx = re_string_cur_idx (&mctx->input); do { if (++cur_str_idx > max) return NULL; re_string_skip_bytes (&mctx->input, 1); } while (mctx->state_log[cur_str_idx] == NULL); cur_state = merge_state_with_log (err, mctx, NULL); } while (*err == REG_NOERROR && cur_state == NULL); return cur_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the correspoding back references. */ static reg_errcode_t internal_function check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, Idx str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { Idx node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->nodes[node].opr.idx < BITSET_WORD_BITS && (dfa->used_bkref_map & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } #if 0 /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *state) { const re_dfa_t *const dfa = mctx->dfa; re_node_set next_nodes; re_dfastate_t *next_state; Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { Idx cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (&mctx->input, 1); return next_state; } #endif #ifdef RE_ENABLE_I18N static reg_errcode_t internal_function transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; Idx cur_node_idx = pstate->nodes.elems[i]; int naccepted; Idx dest_idx; unsigned int context; re_dfastate_t *dest_state; if (!dfa->nodes[cur_node_idx].accept_mb) continue; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (&mctx->input, re_string_cur_idx (&mctx->input), mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accept? */ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, re_string_cur_idx (&mctx->input)); if (naccepted == 0) continue; /* The node can accepts `naccepted' bytes. */ dest_idx = re_string_cur_idx (&mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_needed (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != REG_MISSING); #endif new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (&mctx->input, dest_idx - 1, mctx->eflags); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t internal_function transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx i; Idx cur_str_idx = re_string_cur_idx (&mctx->input); for (i = 0; i < nodes->nelem; ++i) { Idx dest_str_idx, prev_nelem, bkc_idx; Idx node_idx = nodes->elems[i]; unsigned int context; const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether `node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* `node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is `new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != REG_MISSING); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { Idx subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (&mctx->input, dest_str_idx - 1, mctx->eflags); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add `new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (mctx, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t internal_function __attribute_warn_unused_result__ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) { const re_dfa_t *const dfa = mctx->dfa; Idx subexp_num, sub_top_idx; const char *buf = (const char *) re_string_get_buffer (&mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); if (cache_idx != REG_MISSING) { const struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; do if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ while (entry++->more); } subexp_num = dfa->nodes[bkref_node].opr.idx; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; Idx sub_last_idx, sl_str, bkref_str_off; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str_off = bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { regoff_t sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0) { if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) { /* Not enough chars for a successful match. */ if (bkref_str_off + sl_str_diff > mctx->input.len) break; err = clean_state_log_if_needed (mctx, bkref_str_off + sl_str_diff); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) /* We don't need to search this sub expression any more. */ break; } bkref_str_off += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); /* Reload buf, since the preceding call might have reallocated the buffer. */ buf = (const char *) re_string_get_buffer (&mctx->input); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { Idx cls_node; regoff_t sl_str_off; const re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0) { if (BE (bkref_str_off >= mctx->input.valid_len, 0)) { /* If we are at the end of the input, we cannot match. */ if (bkref_str_off >= mctx->input.len) break; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; buf = (const char *) re_string_get_buffer (&mctx->input); } if (buf [bkref_str_off++] != buf[sl_str - 1]) break; /* We don't need to search this sub expression any more. */ } if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, OP_CLOSE_SUBEXP); if (cls_node == REG_MISSING) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, OP_CLOSE_SUBEXP); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t internal_function get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) { reg_errcode_t err; Idx to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, OP_OPEN_SUBEXP); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; return clean_state_log_if_needed (mctx, to_idx); } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static Idx internal_function find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, Idx subexp_idx, int type) { Idx cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { Idx cls_node = nodes->elems[cls_idx]; const re_token_t *node = dfa->nodes + cls_node; if (node->type == type && node->opr.idx == subexp_idx) return cls_node; } return REG_MISSING; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, Idx top_str, Idx last_node, Idx last_str, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err = REG_NOERROR; Idx subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) { re_dfastate_t **new_array; Idx old_alloc = path->alloc; Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; if (BE (new_alloc < old_alloc, 0) || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) return REG_ESPACE; new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; path->array = new_array; path->alloc = new_alloc; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx ? path->next_idx : top_str; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input.cur_idx; mctx->state_log = path->array; mctx->input.cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE (err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes (mctx, str_idx, &cur_state->non_eps_nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (mctx, &next_nodes, str_idx, subexp_num, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input.cur_idx = backup_cur_idx; /* Then check the current node set has the node LAST_NODE. */ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) return REG_NOERROR; return REG_NOMATCH; } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, re_node_set *cur_nodes, re_node_set *next_nodes) { const re_dfa_t *const dfa = mctx->dfa; bool ok; Idx cur_idx; #ifdef RE_ENABLE_I18N reg_errcode_t err = REG_NOERROR; #endif re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; Idx cur_node = cur_nodes->elems[cur_idx]; #ifdef DEBUG re_token_type_t type = dfa->nodes[cur_node].type; assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; Idx next_node = dfa->nexts[cur_node]; Idx next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } ok = re_node_set_insert (&union_set, next_node); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (! ok, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t internal_function check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, Idx ex_subexp, int type) { reg_errcode_t err; Idx idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { Idx cur_node = cur_nodes->elems[idx]; const re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); if (outside_node == REG_MISSING) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, type); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, Idx target, Idx ex_subexp, int type) { Idx cur_node; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { bool ok; if (dfa->nodes[cur_node].type == type && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (type == OP_CLOSE_SUBEXP) { ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; } break; } ok = re_node_set_insert (dst_nodes, cur_node); if (BE (! ok, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { reg_errcode_t err; err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, type); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type) { const re_dfa_t *const dfa = mctx->dfa; reg_errcode_t err; Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); struct re_backref_cache_entry *ent; if (cache_idx_start == REG_MISSING) return REG_NOERROR; restart: ent = mctx->bkref_ents + cache_idx_start; do { Idx to_idx, next_node; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ goto restart; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { bool ok; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ok = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ! ok, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } while (ent++->more); return REG_NOERROR; } /* Build transition table for the state. Return true if successful. */ static bool internal_function build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) { reg_errcode_t err; Idx i, j; int ch; bool need_word_trtable = false; bitset_word_t elem, mask; bool dests_node_malloced = false; bool dest_states_malloced = false; Idx ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset_t *dests_ch; bitset_t acceptable; struct dests_alloc { re_node_set dests_node[SBC_MAX]; bitset_t dests_ch[SBC_MAX]; } *dests_alloc; /* We build DFA states which corresponds to the destination nodes from `state'. `dests_node[i]' represents the nodes which i-th destination state contains, and `dests_ch[i]' represents the characters which i-th destination state accepts. */ if (__libc_use_alloca (sizeof (struct dests_alloc))) dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); else { dests_alloc = re_malloc (struct dests_alloc, 1); if (BE (dests_alloc == NULL, 0)) return false; dests_node_malloced = true; } dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; /* Initialize transiton table. */ state->word_trtable = state->trtable = NULL; /* At first, group all nodes belonging to `state' into several destinations. */ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) { if (dests_node_malloced) free (dests_alloc); if (ndests == 0) { state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (state->trtable == NULL, 0)) return false; return true; } return false; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; /* Avoid arithmetic overflow in size calculation. */ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) / (3 * sizeof (re_dfastate_t *))) < ndests), 0)) goto out_free; if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return false; } dest_states_malloced = true; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { Idx next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != REG_MISSING) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) need_word_trtable = true; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } if (!BE (need_word_trtable, 0)) { /* We don't care about whether the following character is a word character, or we are in a single-byte character set so we can discern by looking at the character code: allocate a 256-entry transition table. */ trtable = state->trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ if (dfa->word_char[i] & mask) trtable[ch] = dest_states_word[j]; else trtable[ch] = dest_states[j]; } } else { /* We care about whether the following character is a word character, and we are in a multi-byte character set: discern by looking at the character code: build two 256-entry transition tables, one starting at trtable[0] and one starting at trtable[SBC_MAX]. */ trtable = state->word_trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); if (BE (trtable == NULL, 0)) goto out_free; /* For all characters ch...: */ for (i = 0; i < BITSET_WORDS; ++i) for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; elem; mask <<= 1, elem >>= 1, ++ch) if (BE (elem & 1, 0)) { /* There must be exactly one destination which accepts character ch. See group_nodes_into_DFAstates. */ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) ; /* j-th destination accepts the word character ch. */ trtable[ch] = dest_states[j]; trtable[ch + SBC_MAX] = dest_states_word[j]; } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (j = 0; j < ndests; ++j) if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[j]; if (need_word_trtable) trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_alloc); return true; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static Idx internal_function group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *dests_node, bitset_t *dests_ch) { reg_errcode_t err; bool ok; Idx i, j, k; Idx ndests; /* Number of the destinations from `state'. */ bitset_t accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to `state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else #endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { if (ASCII_CHARS % BITSET_WORD_BITS == 0) memset (accepts, -1, ASCII_CHARS / CHAR_BIT); else bitset_merge (accepts, utf8_sb_map); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } #endif else continue; /* Check the `accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_NEWLINE_CONSTRAINT) { bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } if (constraint & NEXT_ENDBUF_CONSTRAINT) { bitset_empty (accepts); continue; } if (constraint & NEXT_WORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && !node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) continue; } if (constraint & NEXT_NOTWORD_CONSTRAINT) { bitset_word_t any_set = 0; if (type == CHARACTER && node->word_char) { bitset_empty (accepts); continue; } #ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else #endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) continue; } } /* Then divide `accepts' into DFA states, or create a new state. Above, we make sure that accepts is not empty. */ for (j = 0; j < ndests; ++j) { bitset_t intersec; /* Intersection sets, see below. */ bitset_t remains; /* Flags, see below. */ bitset_word_t has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and `accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_WORDS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of `accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of `accepts', create a new group state, which has the `remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (! ok, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return REG_MISSING; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node `dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ static int internal_function check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx str_idx) { const re_token_t *node = dfa->nodes + node_idx; int char_len, elem_len; Idx i; if (BE (node->type == OP_UTF8_PERIOD, 0)) { unsigned char c = re_string_byte_at (input, str_idx), d; if (BE (c < 0xc2, 1)) return 0; if (str_idx + 2 > input->len) return 0; d = re_string_byte_at (input, str_idx + 1); if (c < 0xe0) return (d < 0x80 || d > 0xbf) ? 0 : 2; else if (c < 0xf0) { char_len = 3; if (c == 0xe0 && d < 0xa0) return 0; } else if (c < 0xf8) { char_len = 4; if (c == 0xf0 && d < 0x90) return 0; } else if (c < 0xfc) { char_len = 5; if (c == 0xf8 && d < 0x88) return 0; } else if (c < 0xfe) { char_len = 6; if (c == 0xfc && d < 0x84) return 0; } else return 0; if (str_idx + char_len > input->len) return 0; for (i = 1; i < char_len; ++i) { d = re_string_byte_at (input, str_idx + i); if (d < 0x80 || d > 0xbf) return 0; } return char_len; } char_len = re_string_char_size_at (input, str_idx); if (node->type == OP_PERIOD) { if (char_len <= 1) return 0; /* FIXME: I don't think this if is needed, as both '\n' and '\0' are char_len == 1. */ /* '.' accepts any one character except the following two cases. */ if ((!(dfa->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((dfa->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } elem_len = re_string_elem_size_at (input, str_idx); if ((elem_len <= 1 && char_len <= 1) || char_len == 0) return 0; if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); Idx j; uint32_t nrules; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; int32_t idx; /* This #include defines a local function! */ # include /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = __collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); int32_t idx = findidx (&cp); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx & 0xffffff]; if (weight_len == weights[equiv_class_idx & 0xffffff] && (idx >> 24) == (equiv_class_idx >> 24)) { Idx cnt = 0; idx &= 0xffffff; equiv_class_idx &= 0xffffff; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ #if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; cmp_buf[2] = wc; #endif for (i = 0; i < cset->nranges; ++i) { cmp_buf[0] = cset->range_starts[i]; cmp_buf[4] = cset->range_ends[i]; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); int32_t extrasize = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; for (idx = 0; idx < extrasize;) { int mbs_cnt; bool found = false; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = true; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (extra[idx] + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } return UINT_MAX; } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static bool internal_function check_node_accept (const re_match_context_t *mctx, const re_token_t *node, Idx idx) { unsigned char ch; ch = re_string_byte_at (&mctx->input, idx); switch (node->type) { case CHARACTER: if (node->opr.c != ch) return false; break; case SIMPLE_BRACKET: if (!bitset_contain (node->opr.sbcset, ch)) return false; break; #ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= ASCII_CHARS) return false; /* FALLTHROUGH */ #endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) return false; break; default: return false; } if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (&mctx->input, idx, mctx->eflags); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return false; } return true; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ extend_buffers (re_match_context_t *mctx) { reg_errcode_t ret; re_string_t *pstr = &mctx->input; /* Avoid overflow. */ if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) return REG_ESPACE; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ /* XXX We have no indication of the size of this buffer. If this allocation fail we have no indication that the state_log array does not have the right size. */ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len + 1); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) return ret; } else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) { mctx->eflags = eflags; mctx->match_last = REG_MISSING; if (n > 0) { /* Avoid overflow. */ size_t max_object_size = MAX (sizeof (struct re_backref_cache_entry), sizeof (re_sub_match_top_t *)); if (BE (SIZE_MAX / max_object_size < n, 0)) return REG_ESPACE; mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } /* Already zero-ed by the caller. else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->nsub_tops = 0; */ mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void internal_function match_ctx_clean (re_match_context_t *mctx) { Idx st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { Idx sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void internal_function match_ctx_free (re_match_context_t *mctx) { /* First, free all the memory associated with MCTX->SUB_TOPS. */ match_ctx_clean (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, Idx to) { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } if (mctx->nbkref_ents > 0 && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; /* This is a cache that saves negative results of check_dst_limits_calc_pos. If bit N is clear, means that this entry won't epsilon-transition to an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If it is set, check_dst_limits_calc_pos_1 will recurse and try to find one such node. A backreference does not epsilon-transition unless it is empty, so set to all zeros if FROM != TO. */ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map = (from == to ? -1 : 0); mctx->bkref_ents[mctx->nbkref_ents++].more = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Return the first entry with the same str_idx, or REG_MISSING if none is found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static Idx internal_function search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) { Idx left, right, mid, last; last = right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } if (left < last && mctx->bkref_ents[left].str_idx == str_idx) return left; else return REG_MISSING; } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t internal_function __attribute_warn_unused_result__ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) { Idx new_asub_tops = mctx->asub_tops * 2; re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, new_asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; mctx->asub_tops = new_asub_tops; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * internal_function match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) { re_sub_match_last_t *new_entry; if (BE (subtop->nlasts == subtop->alasts, 0)) { Idx new_alasts = 2 * subtop->alasts + 1; re_sub_match_last_t **new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, new_alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; subtop->alasts = new_alasts; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry != NULL, 1)) { subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; } return new_entry; } static void internal_function sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; re_node_set_init_empty (&sctx->limits); } dico-2.2/gnu/sha1.c000066400000000000000000000322461172612674100141020ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. Copyright (C) 2000-2001, 2003-2006, 2008-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Scott G. Miller Credits: Robert Klep -- Expansion function fix */ #include #include "sha1.h" #include #include #include #if USE_UNLOCKED_IO # include "unlocked-io.h" #endif #ifdef WORDS_BIGENDIAN # define SWAP(n) (n) #else # define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #endif #define BLOCKSIZE 32768 #if BLOCKSIZE % 64 != 0 # error "invalid BLOCKSIZE" #endif /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Take a pointer to a 160 bit block of data (five 32 bit ints) and initialize it to the start constants of the SHA1 algorithm. This must be called before using hash in the call to sha1_hash. */ void sha1_init_ctx (struct sha1_ctx *ctx) { ctx->A = 0x67452301; ctx->B = 0xefcdab89; ctx->C = 0x98badcfe; ctx->D = 0x10325476; ctx->E = 0xc3d2e1f0; ctx->total[0] = ctx->total[1] = 0; ctx->buflen = 0; } /* Copy the 4 byte value from v into the memory location pointed to by *cp, If your architecture allows unaligned access this is equivalent to * (uint32_t *) cp = v */ static inline void set_uint32 (char *cp, uint32_t v) { memcpy (cp, &v, sizeof v); } /* Put result from CTX in first 20 bytes following RESBUF. The result must be in little endian byte order. */ void * sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf) { char *r = resbuf; set_uint32 (r + 0 * sizeof ctx->A, SWAP (ctx->A)); set_uint32 (r + 1 * sizeof ctx->B, SWAP (ctx->B)); set_uint32 (r + 2 * sizeof ctx->C, SWAP (ctx->C)); set_uint32 (r + 3 * sizeof ctx->D, SWAP (ctx->D)); set_uint32 (r + 4 * sizeof ctx->E, SWAP (ctx->E)); return resbuf; } /* Process the remaining bytes in the internal buffer and the usual prolog according to the standard and write the result to RESBUF. */ void * sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf) { /* Take yet unprocessed bytes into account. */ uint32_t bytes = ctx->buflen; size_t size = (bytes < 56) ? 64 / 4 : 64 * 2 / 4; /* Now count remaining bytes. */ ctx->total[0] += bytes; if (ctx->total[0] < bytes) ++ctx->total[1]; /* Put the 64-bit file length in *bits* at the end of the buffer. */ ctx->buffer[size - 2] = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); ctx->buffer[size - 1] = SWAP (ctx->total[0] << 3); memcpy (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes); /* Process last bytes. */ sha1_process_block (ctx->buffer, size * 4, ctx); return sha1_read_ctx (ctx, resbuf); } /* Compute SHA1 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ int sha1_stream (FILE *stream, void *resblock) { struct sha1_ctx ctx; size_t sum; char *buffer = malloc (BLOCKSIZE + 72); if (!buffer) return 1; /* Initialize the computation context. */ sha1_init_ctx (&ctx); /* Iterate over full file contents. */ while (1) { /* We read the file in blocks of BLOCKSIZE bytes. One call of the computation function processes the whole buffer so that with the next round of the loop another block can be read. */ size_t n; sum = 0; /* Read block. Take care for partial reads. */ while (1) { n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); sum += n; if (sum == BLOCKSIZE) break; if (n == 0) { /* Check for the error flag IFF N == 0, so that we don't exit the loop after a partial read due to e.g., EAGAIN or EWOULDBLOCK. */ if (ferror (stream)) { free (buffer); return 1; } goto process_partial_block; } /* We've read at least one byte, so ignore errors. But always check for EOF, since feof may be true even though N > 0. Otherwise, we could end up calling fread after EOF. */ if (feof (stream)) goto process_partial_block; } /* Process buffer with BLOCKSIZE bytes. Note that BLOCKSIZE % 64 == 0 */ sha1_process_block (buffer, BLOCKSIZE, &ctx); } process_partial_block:; /* Process any remaining bytes. */ if (sum > 0) sha1_process_bytes (buffer, sum, &ctx); /* Construct result in desired memory. */ sha1_finish_ctx (&ctx, resblock); free (buffer); return 0; } /* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ void * sha1_buffer (const char *buffer, size_t len, void *resblock) { struct sha1_ctx ctx; /* Initialize the computation context. */ sha1_init_ctx (&ctx); /* Process whole buffer but last len % 64 bytes. */ sha1_process_bytes (buffer, len, &ctx); /* Put result in desired memory area. */ return sha1_finish_ctx (&ctx, resblock); } void sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) { /* When we already have some bits in our internal buffer concatenate both inputs first. */ if (ctx->buflen != 0) { size_t left_over = ctx->buflen; size_t add = 128 - left_over > len ? len : 128 - left_over; memcpy (&((char *) ctx->buffer)[left_over], buffer, add); ctx->buflen += add; if (ctx->buflen > 64) { sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ctx->buflen &= 63; /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63], ctx->buflen); } buffer = (const char *) buffer + add; len -= add; } /* Process available complete blocks. */ if (len >= 64) { #if !_STRING_ARCH_unaligned # define alignof(type) offsetof (struct { char c; type x; }, x) # define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) { sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); buffer = (const char *) buffer + 64; len -= 64; } else #endif { sha1_process_block (buffer, len & ~63, ctx); buffer = (const char *) buffer + (len & ~63); len &= 63; } } /* Move remaining bytes in internal buffer. */ if (len > 0) { size_t left_over = ctx->buflen; memcpy (&((char *) ctx->buffer)[left_over], buffer, len); left_over += len; if (left_over >= 64) { sha1_process_block (ctx->buffer, 64, ctx); left_over -= 64; memcpy (ctx->buffer, &ctx->buffer[16], left_over); } ctx->buflen = left_over; } } /* --- Code below is the primary difference between md5.c and sha1.c --- */ /* SHA1 round constants */ #define K1 0x5a827999 #define K2 0x6ed9eba1 #define K3 0x8f1bbcdc #define K4 0xca62c1d6 /* Round functions. Note that F2 is the same as F4. */ #define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) ) #define F2(B,C,D) (B ^ C ^ D) #define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) ) #define F4(B,C,D) (B ^ C ^ D) /* Process LEN bytes of BUFFER, accumulating context into CTX. It is assumed that LEN % 64 == 0. Most of this code comes from GnuPG's cipher/sha1.c. */ void sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) { const uint32_t *words = buffer; size_t nwords = len / sizeof (uint32_t); const uint32_t *endp = words + nwords; uint32_t x[16]; uint32_t a = ctx->A; uint32_t b = ctx->B; uint32_t c = ctx->C; uint32_t d = ctx->D; uint32_t e = ctx->E; /* First increment the byte count. RFC 1321 specifies the possible length of the file up to 2^64 bits. Here we only compute the number of bytes. Do a double word increment. */ ctx->total[0] += len; if (ctx->total[0] < len) ++ctx->total[1]; #define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n)))) #define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \ , (x[I&0x0f] = rol(tm, 1)) ) #define R(A,B,C,D,E,F,K,M) do { E += rol( A, 5 ) \ + F( B, C, D ) \ + K \ + M; \ B = rol( B, 30 ); \ } while(0) while (words < endp) { uint32_t tm; int t; for (t = 0; t < 16; t++) { x[t] = SWAP (*words); words++; } R( a, b, c, d, e, F1, K1, x[ 0] ); R( e, a, b, c, d, F1, K1, x[ 1] ); R( d, e, a, b, c, F1, K1, x[ 2] ); R( c, d, e, a, b, F1, K1, x[ 3] ); R( b, c, d, e, a, F1, K1, x[ 4] ); R( a, b, c, d, e, F1, K1, x[ 5] ); R( e, a, b, c, d, F1, K1, x[ 6] ); R( d, e, a, b, c, F1, K1, x[ 7] ); R( c, d, e, a, b, F1, K1, x[ 8] ); R( b, c, d, e, a, F1, K1, x[ 9] ); R( a, b, c, d, e, F1, K1, x[10] ); R( e, a, b, c, d, F1, K1, x[11] ); R( d, e, a, b, c, F1, K1, x[12] ); R( c, d, e, a, b, F1, K1, x[13] ); R( b, c, d, e, a, F1, K1, x[14] ); R( a, b, c, d, e, F1, K1, x[15] ); R( e, a, b, c, d, F1, K1, M(16) ); R( d, e, a, b, c, F1, K1, M(17) ); R( c, d, e, a, b, F1, K1, M(18) ); R( b, c, d, e, a, F1, K1, M(19) ); R( a, b, c, d, e, F2, K2, M(20) ); R( e, a, b, c, d, F2, K2, M(21) ); R( d, e, a, b, c, F2, K2, M(22) ); R( c, d, e, a, b, F2, K2, M(23) ); R( b, c, d, e, a, F2, K2, M(24) ); R( a, b, c, d, e, F2, K2, M(25) ); R( e, a, b, c, d, F2, K2, M(26) ); R( d, e, a, b, c, F2, K2, M(27) ); R( c, d, e, a, b, F2, K2, M(28) ); R( b, c, d, e, a, F2, K2, M(29) ); R( a, b, c, d, e, F2, K2, M(30) ); R( e, a, b, c, d, F2, K2, M(31) ); R( d, e, a, b, c, F2, K2, M(32) ); R( c, d, e, a, b, F2, K2, M(33) ); R( b, c, d, e, a, F2, K2, M(34) ); R( a, b, c, d, e, F2, K2, M(35) ); R( e, a, b, c, d, F2, K2, M(36) ); R( d, e, a, b, c, F2, K2, M(37) ); R( c, d, e, a, b, F2, K2, M(38) ); R( b, c, d, e, a, F2, K2, M(39) ); R( a, b, c, d, e, F3, K3, M(40) ); R( e, a, b, c, d, F3, K3, M(41) ); R( d, e, a, b, c, F3, K3, M(42) ); R( c, d, e, a, b, F3, K3, M(43) ); R( b, c, d, e, a, F3, K3, M(44) ); R( a, b, c, d, e, F3, K3, M(45) ); R( e, a, b, c, d, F3, K3, M(46) ); R( d, e, a, b, c, F3, K3, M(47) ); R( c, d, e, a, b, F3, K3, M(48) ); R( b, c, d, e, a, F3, K3, M(49) ); R( a, b, c, d, e, F3, K3, M(50) ); R( e, a, b, c, d, F3, K3, M(51) ); R( d, e, a, b, c, F3, K3, M(52) ); R( c, d, e, a, b, F3, K3, M(53) ); R( b, c, d, e, a, F3, K3, M(54) ); R( a, b, c, d, e, F3, K3, M(55) ); R( e, a, b, c, d, F3, K3, M(56) ); R( d, e, a, b, c, F3, K3, M(57) ); R( c, d, e, a, b, F3, K3, M(58) ); R( b, c, d, e, a, F3, K3, M(59) ); R( a, b, c, d, e, F4, K4, M(60) ); R( e, a, b, c, d, F4, K4, M(61) ); R( d, e, a, b, c, F4, K4, M(62) ); R( c, d, e, a, b, F4, K4, M(63) ); R( b, c, d, e, a, F4, K4, M(64) ); R( a, b, c, d, e, F4, K4, M(65) ); R( e, a, b, c, d, F4, K4, M(66) ); R( d, e, a, b, c, F4, K4, M(67) ); R( c, d, e, a, b, F4, K4, M(68) ); R( b, c, d, e, a, F4, K4, M(69) ); R( a, b, c, d, e, F4, K4, M(70) ); R( e, a, b, c, d, F4, K4, M(71) ); R( d, e, a, b, c, F4, K4, M(72) ); R( c, d, e, a, b, F4, K4, M(73) ); R( b, c, d, e, a, F4, K4, M(74) ); R( a, b, c, d, e, F4, K4, M(75) ); R( e, a, b, c, d, F4, K4, M(76) ); R( d, e, a, b, c, F4, K4, M(77) ); R( c, d, e, a, b, F4, K4, M(78) ); R( b, c, d, e, a, F4, K4, M(79) ); a = ctx->A += a; b = ctx->B += b; c = ctx->C += c; d = ctx->D += d; e = ctx->E += e; } } dico-2.2/gnu/sha1.h000066400000000000000000000063411172612674100141040ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Declarations of functions and data types used for SHA1 sum library functions. Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef SHA1_H # define SHA1_H 1 # include # include # ifdef __cplusplus extern "C" { # endif #define SHA1_DIGEST_SIZE 20 /* Structure to save state of computation between the single steps. */ struct sha1_ctx { uint32_t A; uint32_t B; uint32_t C; uint32_t D; uint32_t E; uint32_t total[2]; uint32_t buflen; uint32_t buffer[32]; }; /* Initialize structure containing state of computation. */ extern void sha1_init_ctx (struct sha1_ctx *ctx); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is necessary that LEN is a multiple of 64!!! */ extern void sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx); /* Starting with the result of former calls of this function (or the initialization function update the context for the next LEN bytes starting at BUFFER. It is NOT required that LEN is a multiple of 64. */ extern void sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx); /* Process the remaining bytes in the buffer and put result from CTX in first 20 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf); /* Put result from CTX in first 20 bytes following RESBUF. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf); /* Compute SHA1 message digest for bytes read from STREAM. The resulting message digest number will be written into the 20 bytes beginning at RESBLOCK. */ extern int sha1_stream (FILE *stream, void *resblock); /* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ extern void *sha1_buffer (const char *buffer, size_t len, void *resblock); # ifdef __cplusplus } # endif #endif dico-2.2/gnu/size_max.h000066400000000000000000000024541172612674100150700ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* size_max.h -- declare SIZE_MAX through system headers Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. Written by Simon Josefsson. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H /* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ # include /* Get SIZE_MAX declaration on systems like glibc 2. */ # if HAVE_STDINT_H # include # endif /* On systems where these include files don't define it, SIZE_MAX is defined in config.h. */ #endif /* GNULIB_SIZE_MAX_H */ dico-2.2/gnu/snprintf.c000066400000000000000000000037661172612674100151160ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Formatted output to strings. Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #include #include #include #include #include #include #include "vasnprintf.h" /* Print formatted output to string STR. Similar to sprintf, but additional length SIZE limit how much is written into STR. Returns string length of formatted string (which may be larger than SIZE). STR may be NULL, in which case nothing will be written. On error, return a negative value. */ int snprintf (char *str, size_t size, const char *format, ...) { char *output; size_t len; size_t lenbuf = size; va_list args; va_start (args, format); output = vasnprintf (str, &lenbuf, format, args); len = lenbuf; va_end (args); if (!output) return -1; if (output != str) { if (size) { size_t pruned_len = (len < size ? len : size - 1); memcpy (str, output, pruned_len); str[pruned_len] = '\0'; } free (output); } if (INT_MAX < len) { errno = EOVERFLOW; return -1; } return len; } dico-2.2/gnu/sockets.c000066400000000000000000000057361172612674100147250ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* sockets.c --- wrappers for Windows socket functions Copyright (C) 2008-2011 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 3 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, see . */ /* Written by Simon Josefsson */ #include /* Specification. */ #include "sockets.h" #if WINDOWS_SOCKETS /* This includes winsock2.h on MinGW. */ # include # include "close-hook.h" /* Get set_winsock_errno, FD_TO_SOCKET etc. */ # include "w32sock.h" static int close_fd_maybe_socket (int fd, const struct close_hook *remaining_list) { SOCKET sock; WSANETWORKEVENTS ev; /* Test whether fd refers to a socket. */ sock = FD_TO_SOCKET (fd); ev.lNetworkEvents = 0xDEADBEEF; WSAEnumNetworkEvents (sock, NULL, &ev); if (ev.lNetworkEvents != 0xDEADBEEF) { /* fd refers to a socket. */ /* FIXME: other applications, like squid, use an undocumented _free_osfhnd free function. But this is not enough: The 'osfile' flags for fd also needs to be cleared, but it is hard to access it. Instead, here we just close twice the file descriptor. */ if (closesocket (sock)) { set_winsock_errno (); return -1; } else { /* This call frees the file descriptor and does a CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ _close (fd); return 0; } } else /* Some other type of file descriptor. */ return execute_close_hooks (fd, remaining_list); } static struct close_hook close_sockets_hook; static int initialized_sockets_version /* = 0 */; #endif /* WINDOWS_SOCKETS */ int gl_sockets_startup (int version _GL_UNUSED) { #if WINDOWS_SOCKETS if (version > initialized_sockets_version) { WSADATA data; int err; err = WSAStartup (version, &data); if (err != 0) return 1; if (data.wVersion < version) return 2; if (initialized_sockets_version == 0) register_close_hook (close_fd_maybe_socket, &close_sockets_hook); initialized_sockets_version = version; } #endif return 0; } int gl_sockets_cleanup (void) { #if WINDOWS_SOCKETS int err; initialized_sockets_version = 0; unregister_close_hook (&close_sockets_hook); err = WSACleanup (); if (err != 0) return 1; #endif return 0; } dico-2.2/gnu/sockets.h000066400000000000000000000031211172612674100147140ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* sockets.h - wrappers for Windows socket functions Copyright (C) 2008-2011 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 3 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, see . */ /* Written by Simon Josefsson */ #ifndef SOCKETS_H # define SOCKETS_H 1 #define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */ #define SOCKETS_1_1 0x101 #define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */ #define SOCKETS_2_1 0x201 #define SOCKETS_2_2 0x202 int gl_sockets_startup (int version); int gl_sockets_cleanup (void); /* This function is useful it you create a socket using gnulib's Winsock wrappers but needs to pass on the socket handle to some other library that only accepts sockets. */ #if WINDOWS_SOCKETS #include static inline SOCKET gl_fd_to_handle (int fd) { return _get_osfhandle (fd); } #else #define gl_fd_to_handle(x) (x) #endif /* WINDOWS_SOCKETS */ #endif /* SOCKETS_H */ dico-2.2/gnu/stdbool.in.h000066400000000000000000000120121172612674100153130ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2001. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 for platforms that lack it. */ /* Usage suggestions: Programs that use should be aware of some limitations and standards compliance issues. Standards compliance: - must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. - C99 allows the use of (_Bool)0.0 in constant expressions, but this substitute cannot always provide this property. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include /* defines bool but not _Bool */ # undef false # undef true #endif /* For the sake of symbolic names in gdb, we define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif #endif #define bool _Bool /* The other macros must be usable in preprocessor directives. */ #define false 0 #define true 1 #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ dico-2.2/gnu/stddef.in.h000066400000000000000000000053511172612674100151260ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for POSIX 2008 , for platforms that have issues. Copyright (C) 2009-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * POSIX 2008 for platforms that have issues. * */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by . Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # undef _GL_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _GL_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # ifndef _GL_STDDEF_H # define _GL_STDDEF_H /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ #if @REPLACE_NULL@ # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif #endif /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif # endif /* _GL_STDDEF_H */ # endif /* _GL_STDDEF_H */ #endif /* __need_XXX */ dico-2.2/gnu/stdint.in.h000066400000000000000000000421701172612674100151620ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * ISO C 99 for platforms that lack it. * */ #ifndef _GL_STDINT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* When including a system file that in turn includes , use the system , not our substitute. This avoids problems with (for example) VMS, whose includes . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Get those types that are already defined in other system include files, so that we can "#define int8_t signed char" below without worrying about a later system include file containing a "typedef signed char int8_t;" that will get messed up by our macro. Our macros should all be consistent with the system versions, except for the "fast" types and macros, which we recommend against using in public interfaces due to compiler differences. */ #if @HAVE_STDINT_H@ # if defined __sgi && ! defined __c99 /* Bypass IRIX's if in C89 mode, since it merely annoys users with "This header file is to be used only for c99 mode compilations" diagnostics. */ # define __STDINT_H__ # endif /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because _GL_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #endif #if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H #define _GL_STDINT_H /* defines some of the stdint.h types as well, on glibc, IRIX 6.5, and OpenBSD 3.8 (via ). AIX 5.2 isn't needed and causes troubles. MacOS X 10.4.6 includes (which is us), but relies on the system definitions, so include after @NEXT_STDINT_H@. */ #if @HAVE_SYS_TYPES_H@ && ! defined _AIX # include #endif /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ #include #if @HAVE_INTTYPES_H@ /* In OpenBSD 3.8, includes , which defines int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. also defines intptr_t and uintptr_t. */ # include #elif @HAVE_SYS_INTTYPES_H@ /* Solaris 7 has the types except the *_fast*_t types, and the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ # include #endif #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ /* Linux libc4 >= 4.6.7 and libc5 have a that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is included by . */ # include #endif #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for a integer type under the usual assumption. Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ #define _STDINT_MIN(signed, bits, zero) \ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) #define _STDINT_MAX(signed, bits, zero) \ ((signed) \ ? ~ _STDINT_MIN (signed, bits, zero) \ : /* The expression for the unsigned case. The subtraction of (signed) \ is a nop in the unsigned case and avoids "signed integer overflow" \ warnings in the signed case. */ \ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) #if !GNULIB_defined_stdint_types /* 7.18.1.1. Exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef int8_t #undef uint8_t typedef signed char gl_int8_t; typedef unsigned char gl_uint8_t; #define int8_t gl_int8_t #define uint8_t gl_uint8_t #undef int16_t #undef uint16_t typedef short int gl_int16_t; typedef unsigned short int gl_uint16_t; #define int16_t gl_int16_t #define uint16_t gl_uint16_t #undef int32_t #undef uint32_t typedef int gl_int32_t; typedef unsigned int gl_uint32_t; #define int32_t gl_int32_t #define uint32_t gl_uint32_t /* If the system defines INT64_MAX, assume int64_t works. That way, if the underlying platform defines int64_t to be a 64-bit long long int, the code below won't mistakenly define it to be a 64-bit long int, which would mess up C++ name mangling. We must use #ifdef rather than #if, to avoid an error with HP-UX 10.20 cc. */ #ifdef INT64_MAX # define GL_INT64_T #else /* Do not undefine int64_t if gnulib is not being used with 64-bit types, since otherwise it breaks platforms like Tandem/NSK. */ # if LONG_MAX >> 31 >> 31 == 1 # undef int64_t typedef long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif defined _MSC_VER # undef int64_t typedef __int64 gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # elif @HAVE_LONG_LONG_INT@ # undef int64_t typedef long long int gl_int64_t; # define int64_t gl_int64_t # define GL_INT64_T # endif #endif #ifdef UINT64_MAX # define GL_UINT64_T #else # if ULONG_MAX >> 31 >> 31 >> 1 == 1 # undef uint64_t typedef unsigned long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif defined _MSC_VER # undef uint64_t typedef unsigned __int64 gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # elif @HAVE_UNSIGNED_LONG_LONG_INT@ # undef uint64_t typedef unsigned long long int gl_uint64_t; # define uint64_t gl_uint64_t # define GL_UINT64_T # endif #endif /* Avoid collision with Solaris 2.5.1 etc. */ #define _UINT8_T #define _UINT32_T #define _UINT64_T /* 7.18.1.2. Minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef int_least8_t #undef uint_least8_t #undef int_least16_t #undef uint_least16_t #undef int_least32_t #undef uint_least32_t #undef int_least64_t #undef uint_least64_t #define int_least8_t int8_t #define uint_least8_t uint8_t #define int_least16_t int16_t #define uint_least16_t uint16_t #define int_least32_t int32_t #define uint_least32_t uint32_t #ifdef GL_INT64_T # define int_least64_t int64_t #endif #ifdef GL_UINT64_T # define uint_least64_t uint64_t #endif /* 7.18.1.3. Fastest minimum-width integer types */ /* Note: Other substitutes may define these types differently. It is not recommended to use these types in public header files. */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. Assume that 'long int' is fast enough for all narrower integers. */ #undef int_fast8_t #undef uint_fast8_t #undef int_fast16_t #undef uint_fast16_t #undef int_fast32_t #undef uint_fast32_t #undef int_fast64_t #undef uint_fast64_t typedef long int gl_int_fast8_t; typedef unsigned long int gl_uint_fast8_t; typedef long int gl_int_fast16_t; typedef unsigned long int gl_uint_fast16_t; typedef long int gl_int_fast32_t; typedef unsigned long int gl_uint_fast32_t; #define int_fast8_t gl_int_fast8_t #define uint_fast8_t gl_uint_fast8_t #define int_fast16_t gl_int_fast16_t #define uint_fast16_t gl_uint_fast16_t #define int_fast32_t gl_int_fast32_t #define uint_fast32_t gl_uint_fast32_t #ifdef GL_INT64_T # define int_fast64_t int64_t #endif #ifdef GL_UINT64_T # define uint_fast64_t uint64_t #endif /* 7.18.1.4. Integer types capable of holding object pointers */ #undef intptr_t #undef uintptr_t typedef long int gl_intptr_t; typedef unsigned long int gl_uintptr_t; #define intptr_t gl_intptr_t #define uintptr_t gl_uintptr_t /* 7.18.1.5. Greatest-width integer types */ /* Note: These types are compiler dependent. It may be unwise to use them in public header files. */ #undef intmax_t #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 typedef long long int gl_intmax_t; # define intmax_t gl_intmax_t #elif defined GL_INT64_T # define intmax_t int64_t #else typedef long int gl_intmax_t; # define intmax_t gl_intmax_t #endif #undef uintmax_t #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 typedef unsigned long long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #elif defined GL_UINT64_T # define uintmax_t uint64_t #else typedef unsigned long int gl_uintmax_t; # define uintmax_t gl_uintmax_t #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code breaks if this is not the case. If this check fails, the reason is likely to be found in the autoconf macros. */ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) ? 1 : -1]; #define GNULIB_defined_stdint_types 1 #endif /* !GNULIB_defined_stdint_types */ /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS /* 7.18.2.1. Limits of exact-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. */ #undef INT8_MIN #undef INT8_MAX #undef UINT8_MAX #define INT8_MIN (~ INT8_MAX) #define INT8_MAX 127 #define UINT8_MAX 255 #undef INT16_MIN #undef INT16_MAX #undef UINT16_MAX #define INT16_MIN (~ INT16_MAX) #define INT16_MAX 32767 #define UINT16_MAX 65535 #undef INT32_MIN #undef INT32_MAX #undef UINT32_MAX #define INT32_MIN (~ INT32_MAX) #define INT32_MAX 2147483647 #define UINT32_MAX 4294967295U #if defined GL_INT64_T && ! defined INT64_MAX /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 evaluates the latter incorrectly in preprocessor expressions. */ # define INT64_MIN (- INTMAX_C (1) << 63) # define INT64_MAX INTMAX_C (9223372036854775807) #endif #if defined GL_UINT64_T && ! defined UINT64_MAX # define UINT64_MAX UINTMAX_C (18446744073709551615) #endif /* 7.18.2.2. Limits of minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types are the same as the corresponding N_t types. */ #undef INT_LEAST8_MIN #undef INT_LEAST8_MAX #undef UINT_LEAST8_MAX #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX #undef INT_LEAST16_MIN #undef INT_LEAST16_MAX #undef UINT_LEAST16_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define UINT_LEAST16_MAX UINT16_MAX #undef INT_LEAST32_MIN #undef INT_LEAST32_MAX #undef UINT_LEAST32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define UINT_LEAST32_MAX UINT32_MAX #undef INT_LEAST64_MIN #undef INT_LEAST64_MAX #ifdef GL_INT64_T # define INT_LEAST64_MIN INT64_MIN # define INT_LEAST64_MAX INT64_MAX #endif #undef UINT_LEAST64_MAX #ifdef GL_UINT64_T # define UINT_LEAST64_MAX UINT64_MAX #endif /* 7.18.2.3. Limits of fastest minimum-width integer types */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types are taken from the same list of types. */ #undef INT_FAST8_MIN #undef INT_FAST8_MAX #undef UINT_FAST8_MAX #define INT_FAST8_MIN LONG_MIN #define INT_FAST8_MAX LONG_MAX #define UINT_FAST8_MAX ULONG_MAX #undef INT_FAST16_MIN #undef INT_FAST16_MAX #undef UINT_FAST16_MAX #define INT_FAST16_MIN LONG_MIN #define INT_FAST16_MAX LONG_MAX #define UINT_FAST16_MAX ULONG_MAX #undef INT_FAST32_MIN #undef INT_FAST32_MAX #undef UINT_FAST32_MAX #define INT_FAST32_MIN LONG_MIN #define INT_FAST32_MAX LONG_MAX #define UINT_FAST32_MAX ULONG_MAX #undef INT_FAST64_MIN #undef INT_FAST64_MAX #ifdef GL_INT64_T # define INT_FAST64_MIN INT64_MIN # define INT_FAST64_MAX INT64_MAX #endif #undef UINT_FAST64_MAX #ifdef GL_UINT64_T # define UINT_FAST64_MAX UINT64_MAX #endif /* 7.18.2.4. Limits of integer types capable of holding object pointers */ #undef INTPTR_MIN #undef INTPTR_MAX #undef UINTPTR_MAX #define INTPTR_MIN LONG_MIN #define INTPTR_MAX LONG_MAX #define UINTPTR_MAX ULONG_MAX /* 7.18.2.5. Limits of greatest-width integer types */ #undef INTMAX_MIN #undef INTMAX_MAX #ifdef INT64_MAX # define INTMAX_MIN INT64_MIN # define INTMAX_MAX INT64_MAX #else # define INTMAX_MIN INT32_MIN # define INTMAX_MAX INT32_MAX #endif #undef UINTMAX_MAX #ifdef UINT64_MAX # define UINTMAX_MAX UINT64_MAX #else # define UINTMAX_MAX UINT32_MAX #endif /* 7.18.3. Limits of other integer types */ /* ptrdiff_t limits */ #undef PTRDIFF_MIN #undef PTRDIFF_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif #else # define PTRDIFF_MIN \ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) #endif /* sig_atomic_t limits */ #undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MAX #define SIG_ATOMIC_MIN \ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) #define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) /* size_t limit */ #undef SIZE_MAX #if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 # define SIZE_MAX _STDINT_MAX (0, 64, 0ul) # else # define SIZE_MAX _STDINT_MAX (0, 32, 0ul) # endif #else # define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #endif /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested includes -> -> -> , and the latter includes and assumes its types are already defined. */ #if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) /* BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) #define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ #undef WINT_MIN #undef WINT_MAX #define WINT_MIN \ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) #endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ /* 7.18.4. Macros for integer constants */ #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS /* 7.18.4.1. Macros for minimum-width integer constants */ /* According to ISO C 99 Technical Corrigendum 1 */ /* Here we assume a standard architecture where the hardware integer types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ #undef INT8_C #undef UINT8_C #define INT8_C(x) x #define UINT8_C(x) x #undef INT16_C #undef UINT16_C #define INT16_C(x) x #define UINT16_C(x) x #undef INT32_C #undef UINT32_C #define INT32_C(x) x #define UINT32_C(x) x ## U #undef INT64_C #undef UINT64_C #if LONG_MAX >> 31 >> 31 == 1 # define INT64_C(x) x##L #elif defined _MSC_VER # define INT64_C(x) x##i64 #elif @HAVE_LONG_LONG_INT@ # define INT64_C(x) x##LL #endif #if ULONG_MAX >> 31 >> 31 >> 1 == 1 # define UINT64_C(x) x##UL #elif defined _MSC_VER # define UINT64_C(x) x##ui64 #elif @HAVE_UNSIGNED_LONG_LONG_INT@ # define UINT64_C(x) x##ULL #endif /* 7.18.4.2. Macros for greatest-width integer constants */ #undef INTMAX_C #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # define INTMAX_C(x) x##LL #elif defined GL_INT64_T # define INTMAX_C(x) INT64_C(x) #else # define INTMAX_C(x) x##L #endif #undef UINTMAX_C #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # define UINTMAX_C(x) x##ULL #elif defined GL_UINT64_T # define UINTMAX_C(x) UINT64_C(x) #else # define UINTMAX_C(x) x##UL #endif #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ #endif /* _GL_STDINT_H */ #endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ dico-2.2/gnu/stdio-impl.h000066400000000000000000000102351172612674100153260ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Implementation details of FILE streams. Copyright (C) 2007-2008, 2010-2011 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 3 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, see . */ /* Many stdio implementations have the same logic and therefore can share the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ /* BSD stdio derived implementations. */ #if defined __NetBSD__ /* NetBSD */ /* Get __NetBSD_Version__. */ # include #endif #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ # if defined __DragonFly__ /* DragonFly */ /* See . */ # define fp_ ((struct { struct __FILE_public pub; \ struct { unsigned char *_base; int _size; } _bf; \ void *cookie; \ void *_close; \ void *_read; \ void *_seek; \ void *_write; \ struct { unsigned char *_base; int _size; } _ub; \ int _ur; \ unsigned char _ubuf[3]; \ unsigned char _nbuf[1]; \ struct { unsigned char *_base; int _size; } _lb; \ int _blksize; \ fpos_t _offset; \ /* More fields, not relevant here. */ \ } *) fp) /* See . */ # define _p pub._p # define _flags pub._flags # define _r pub._r # define _w pub._w # else # define fp_ fp # endif # if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ /* See and */ struct __sfileext { struct __sbuf _ub; /* ungetc buffer */ /* More fields, not relevant here. */ }; # define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub # else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ # define fp_ub fp_->_ub # endif # define HASUB(fp) (fp_ub._base != NULL) #endif /* SystemV derived implementations. */ #ifdef __TANDEM /* NonStop Kernel */ # ifndef _IOERR /* These values were determined by the program 'stdioext-flags' at . */ # define _IOERR 0x40 # define _IOREAD 0x80 # define _IOWRT 0x4 # define _IORW 0x100 # endif #endif #if defined _IOERR # if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ # define fp_ ((struct { unsigned char *_ptr; \ unsigned char *_base; \ unsigned char *_end; \ long _cnt; \ int _file; \ unsigned int _flag; \ } *) fp) # else # define fp_ fp # endif # if defined _SCO_DS /* OpenServer */ # define _cnt __cnt # define _ptr __ptr # define _base __base # define _flag __flag # endif #endif dico-2.2/gnu/stdio.in.h000066400000000000000000001162701172612674100150020ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . Copyright (C) 2004, 2007-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H /* Special invocation convention: - Inside glibc header files. - On OSF/1 5.1 we have a sequence of nested includes -> -> -> -> -> -> -> . In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDIO_H #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #undef _GL_ALREADY_INCLUDING_STDIO_H #ifndef _GL_STDIO_H #define _GL_STDIO_H /* Get va_list. Needed on many systems, including glibc 2.8. */ #include #include /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 and eglibc 2.11.2. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) /* Solaris 10 declares renameat in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Macros for stringification. */ #define _GL_STDIO_STRINGIZE(token) #token #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); # else # if !@HAVE_DPRINTF@ _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); # endif _GL_CXXALIASWARN (dprintf); #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " "use gnulib module dprintf for portability"); # endif #endif #if @GNULIB_FCLOSE@ /* Close STREAM and its underlying file descriptor. */ # if @REPLACE_FCLOSE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fclose rpl_fclose # endif _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); # else _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); # endif _GL_CXXALIASWARN (fclose); #elif defined GNULIB_POSIXCHECK # undef fclose /* Assume fclose is always declared. */ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif #if @GNULIB_FFLUSH@ /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ # if @REPLACE_FFLUSH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fflush rpl_fflush # endif _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); # else _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); # endif _GL_CXXALIASWARN (fflush); #elif defined GNULIB_POSIXCHECK # undef fflush /* Assume fflush is always declared. */ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " "use gnulib module fflush for portable POSIX compliance"); #endif /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning. Assume it is always declared, since it is required by C89. */ #undef gets _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); # else _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); # endif _GL_CXXALIASWARN (fopen); #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " "use gnulib module fopen for portability"); #endif #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fprintf rpl_fprintf # endif # define GNULIB_overrides_fprintf 1 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); # else _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); # endif _GL_CXXALIASWARN (fprintf); #endif #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_fprintf # undef fprintf # endif /* Assume fprintf is always declared. */ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " "use gnulib module fprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it was before the write calls. When discarding pending input, the file position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ # if @REPLACE_FPURGE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fpurge rpl_fpurge # endif _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); # else # if !@HAVE_DECL_FPURGE@ _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); # endif _GL_CXXALIASWARN (fpurge); #elif defined GNULIB_POSIXCHECK # undef fpurge # if HAVE_RAW_DECL_FPURGE _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " "use gnulib module fpurge for portability"); # endif #endif #if @GNULIB_FPUTC@ # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fputc # define fputc rpl_fputc # endif _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); # endif _GL_CXXALIASWARN (fputc); #endif #if @GNULIB_FPUTS@ # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fputs # define fputs rpl_fputs # endif _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); # else _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); # endif _GL_CXXALIASWARN (fputs); #endif #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freopen # define freopen rpl_freopen # endif _GL_FUNCDECL_RPL (freopen, FILE *, (const char *filename, const char *mode, FILE *stream) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # else _GL_CXXALIAS_SYS (freopen, FILE *, (const char *filename, const char *mode, FILE *stream)); # endif _GL_CXXALIASWARN (freopen); #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - " "use gnulib module freopen for portability"); #endif /* Set up the following warnings, based on which modules are in use. GNU Coding Standards discourage the use of fseek, since it imposes an arbitrary limitation on some 32-bit hosts. Remember that the fseek module depends on the fseeko module, so we only have three cases to consider: 1. The developer is not using either module. Issue a warning under GNULIB_POSIXCHECK for both functions, to remind them that both functions have bugs on some systems. _GL_NO_LARGE_FILES has no impact on this warning. 2. The developer is using both modules. They may be unaware of the arbitrary limitations of fseek, so issue a warning under GNULIB_POSIXCHECK. On the other hand, they may be using both modules intentionally, so the developer can define _GL_NO_LARGE_FILES in the compilation units where the use of fseek is safe, to silence the warning. 3. The developer is using the fseeko module, but not fseek. Gnulib guarantees that fseek will still work around platform bugs in that case, but we presume that the developer is aware of the pitfalls of fseek and was trying to avoid it, so issue a warning even when GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be defined to silence the warning in particular compilation units. In C++ compilations with GNULIB_NAMESPACE, in order to avoid that fseek gets defined as a macro, it is recommended that the developer uses the fseek module, even if he is not calling the fseek function. Most gnulib clients that perform stream operations should fall into category 3. */ #if @GNULIB_FSEEK@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif # if @REPLACE_FSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseek # define fseek rpl_fseek # endif _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); # else _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); # endif _GL_CXXALIASWARN (fseek); #endif #if @GNULIB_FSEEKO@ # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 3, above. */ # undef fseek # endif # if @REPLACE_FSEEKO@ /* Provide an fseeko function that is aware of a preceding fflush(), and which detects pipes. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseeko # define fseeko rpl_fseeko # endif _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); # else # if ! @HAVE_DECL_FSEEKO@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); # endif _GL_CXXALIASWARN (fseeko); # if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@ /* Provide an fseek function that is consistent with fseeko. */ /* In order to avoid that fseek gets defined as a macro here, the developer can request the 'fseek' module. */ # if !GNULIB_defined_fseek_function # undef fseek # define fseek rpl_fseek static inline int _GL_ARG_NONNULL ((1)) rpl_fseek (FILE *fp, long offset, int whence) { # if @REPLACE_FSEEKO@ return rpl_fseeko (fp, offset, whence); # else return fseeko (fp, offset, whence); # endif } # define GNULIB_defined_fseek_function 1 # endif # endif #elif defined GNULIB_POSIXCHECK # define _GL_FSEEK_WARN /* Category 1, above. */ # undef fseek # undef fseeko # if HAVE_RAW_DECL_FSEEKO _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " "use gnulib module fseeko for portability"); # endif #endif #ifdef _GL_FSEEK_WARN # undef _GL_FSEEK_WARN /* Here, either fseek is undefined (but C89 guarantees that it is declared), or it is defined as rpl_fseek (declared above). */ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " "on 32-bit platforms - " "use fseeko function for handling of large files"); #endif /* ftell, ftello. See the comments on fseek/fseeko. */ #if @GNULIB_FTELL@ # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 2, above. */ # undef ftell # endif # if @REPLACE_FTELL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftell # define ftell rpl_ftell # endif _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); # else _GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); # endif _GL_CXXALIASWARN (ftell); #endif #if @GNULIB_FTELLO@ # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 3, above. */ # undef ftell # endif # if @REPLACE_FTELLO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ftello # define ftello rpl_ftello # endif _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); # else # if ! @HAVE_DECL_FTELLO@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); # endif _GL_CXXALIASWARN (ftello); # if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ /* Provide an ftell function that is consistent with ftello. */ /* In order to avoid that ftell gets defined as a macro here, the developer can request the 'ftell' module. */ # if !GNULIB_defined_ftell_function # undef ftell # define ftell rpl_ftell static inline long _GL_ARG_NONNULL ((1)) rpl_ftell (FILE *f) { # if @REPLACE_FTELLO@ return rpl_ftello (f); # else return ftello (f); # endif } # define GNULIB_defined_ftell_function 1 # endif # endif #elif defined GNULIB_POSIXCHECK # define _GL_FTELL_WARN /* Category 1, above. */ # undef ftell # undef ftello # if HAVE_RAW_DECL_FTELLO _GL_WARN_ON_USE (ftello, "ftello is unportable - " "use gnulib module ftello for portability"); # endif #endif #ifdef _GL_FTELL_WARN # undef _GL_FTELL_WARN /* Here, either ftell is undefined (but C89 guarantees that it is declared), or it is defined as rpl_ftell (declared above). */ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " "on 32-bit platforms - " "use ftello function for handling of large files"); #endif #if @GNULIB_FWRITE@ # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fwrite # define fwrite rpl_fwrite # endif _GL_FUNCDECL_RPL (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); # else _GL_CXXALIAS_SYS (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); # endif _GL_CXXALIASWARN (fwrite); #endif #if @GNULIB_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ # if @REPLACE_GETDELIM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdelim # define getdelim rpl_getdelim # endif _GL_FUNCDECL_RPL (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4))); _GL_CXXALIAS_RPL (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream)); # else # if !@HAVE_DECL_GETDELIM@ _GL_FUNCDECL_SYS (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream) _GL_ARG_NONNULL ((1, 2, 4))); # endif _GL_CXXALIAS_SYS (getdelim, ssize_t, (char **lineptr, size_t *linesize, int delimiter, FILE *stream)); # endif _GL_CXXALIASWARN (getdelim); #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " "use gnulib module getdelim for portability"); # endif #endif #if @GNULIB_GETLINE@ /* Read a line, up to (and including) the next newline, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ # if @REPLACE_GETLINE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getline # define getline rpl_getline # endif _GL_FUNCDECL_RPL (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3))); _GL_CXXALIAS_RPL (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # else # if !@HAVE_DECL_GETLINE@ _GL_FUNCDECL_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getline, ssize_t, (char **lineptr, size_t *linesize, FILE *stream)); # endif # if @HAVE_DECL_GETLINE@ _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK # undef getline # if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is unportable - " "use gnulib module getline for portability"); # endif #endif #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ struct obstack; /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. Upon memory allocation error, call obstack_alloc_failed_handler. Upon other error, return -1. */ # if @REPLACE_OBSTACK_PRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define obstack_printf rpl_obstack_printf # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); # else # if !@HAVE_DECL_OBSTACK_PRINTF@ _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...)); # endif _GL_CXXALIASWARN (obstack_printf); # if @REPLACE_OBSTACK_PRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define obstack_vprintf rpl_obstack_vprintf # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); # else # if !@HAVE_DECL_OBSTACK_PRINTF@ _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); # endif _GL_CXXALIASWARN (obstack_vprintf); #endif #if @GNULIB_PERROR@ /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ # if @REPLACE_PERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define perror rpl_perror # endif _GL_FUNCDECL_RPL (perror, void, (const char *string)); _GL_CXXALIAS_RPL (perror, void, (const char *string)); # else _GL_CXXALIAS_SYS (perror, void, (const char *string)); # endif _GL_CXXALIASWARN (perror); #elif defined GNULIB_POSIXCHECK # undef perror /* Assume perror is always declared. */ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " "use gnulib module perror for portability"); #endif #if @GNULIB_POPEN@ # if @REPLACE_POPEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef popen # define popen rpl_popen # endif _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); #elif defined GNULIB_POSIXCHECK # undef popen # if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); # endif #endif #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) # if defined __GNUC__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ # endif _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *format, ...) __asm__ (@ASM_SYMBOL_PREFIX@ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # else # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define printf rpl_printf # endif _GL_FUNCDECL_RPL (printf, int, (const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); # endif # define GNULIB_overrides_printf 1 # else _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); # endif _GL_CXXALIASWARN (printf); #endif #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_printf # undef printf # endif /* Assume printf is always declared. */ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " "use gnulib module printf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_PUTC@ # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putc # define putc rpl_fputc # endif _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); # else _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); # endif _GL_CXXALIASWARN (putc); #endif #if @GNULIB_PUTCHAR@ # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putchar # define putchar rpl_putchar # endif _GL_FUNCDECL_RPL (putchar, int, (int c)); _GL_CXXALIAS_RPL (putchar, int, (int c)); # else _GL_CXXALIAS_SYS (putchar, int, (int c)); # endif _GL_CXXALIASWARN (putchar); #endif #if @GNULIB_PUTS@ # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef puts # define puts rpl_puts # endif _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (puts, int, (const char *string)); # else _GL_CXXALIAS_SYS (puts, int, (const char *string)); # endif _GL_CXXALIASWARN (puts); #endif #if @GNULIB_REMOVE@ # if @REPLACE_REMOVE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef remove # define remove rpl_remove # endif _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (remove, int, (const char *name)); # else _GL_CXXALIAS_SYS (remove, int, (const char *name)); # endif _GL_CXXALIASWARN (remove); #elif defined GNULIB_POSIXCHECK # undef remove /* Assume remove is always declared. */ _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " "use gnulib module remove for more portability"); #endif #if @GNULIB_RENAME@ # if @REPLACE_RENAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef rename # define rename rpl_rename # endif _GL_FUNCDECL_RPL (rename, int, (const char *old_filename, const char *new_filename) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (rename, int, (const char *old_filename, const char *new_filename)); # else _GL_CXXALIAS_SYS (rename, int, (const char *old_filename, const char *new_filename)); # endif _GL_CXXALIASWARN (rename); #elif defined GNULIB_POSIXCHECK # undef rename /* Assume rename is always declared. */ _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " "use gnulib module rename for more portability"); #endif #if @GNULIB_RENAMEAT@ # if @REPLACE_RENAMEAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef renameat # define renameat rpl_renameat # endif _GL_FUNCDECL_RPL (renameat, int, (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (renameat, int, (int fd1, char const *file1, int fd2, char const *file2)); # else # if !@HAVE_RENAMEAT@ _GL_FUNCDECL_SYS (renameat, int, (int fd1, char const *file1, int fd2, char const *file2) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (renameat, int, (int fd1, char const *file1, int fd2, char const *file2)); # endif _GL_CXXALIASWARN (renameat); #elif defined GNULIB_POSIXCHECK # undef renameat # if HAVE_RAW_DECL_RENAMEAT _GL_WARN_ON_USE (renameat, "renameat is not portable - " "use gnulib module renameat for portability"); # endif #endif #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif _GL_FUNCDECL_RPL (snprintf, int, (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *str, size_t size, const char *format, ...)); # else # if !@HAVE_DECL_SNPRINTF@ _GL_FUNCDECL_SYS (snprintf, int, (char *str, size_t size, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *str, size_t size, const char *format, ...)); # endif _GL_CXXALIASWARN (snprintf); #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " "use gnulib module snprintf for portability"); # endif #endif /* Some people would argue that sprintf should be handled like gets (for example, OpenBSD issues a link warning for both functions), since both can cause security holes due to buffer overruns. However, we believe that sprintf can be used safely, and is more efficient than snprintf in those safe cases; and as proof of our belief, we use sprintf in several gnulib modules. So this header intentionally avoids adding a warning to sprintf except when GNULIB_POSIXCHECK is defined. */ #if @GNULIB_SPRINTF_POSIX@ # if @REPLACE_SPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); # else _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); # endif _GL_CXXALIASWARN (sprintf); #elif defined GNULIB_POSIXCHECK # undef sprintf /* Assume sprintf is always declared. */ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "use gnulib module sprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_TMPFILE@ # if @REPLACE_TMPFILE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif _GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif _GL_CXXALIASWARN (tmpfile); #elif defined GNULIB_POSIXCHECK # undef tmpfile # if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); # endif #endif #if @GNULIB_VASPRINTF@ /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ # if @REPLACE_VASPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); # else # if !@HAVE_VASPRINTF@ _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, (char **result, const char *format, ...)); # endif _GL_CXXALIASWARN (asprintf); # if @REPLACE_VASPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); # else # if !@HAVE_VASPRINTF@ _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, (char **result, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vasprintf); #endif #if @GNULIB_VDPRINTF@ # if @REPLACE_VDPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vdprintf rpl_vdprintf # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); # else # if !@HAVE_VDPRINTF@ _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be __va_list args. */ _GL_CXXALIAS_SYS_CAST (vdprintf, int, (int fd, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vdprintf); #elif defined GNULIB_POSIXCHECK # undef vdprintf # if HAVE_RAW_DECL_VDPRINTF _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " "use gnulib module vdprintf for portability"); # endif #endif #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vfprintf rpl_vfprintf # endif # define GNULIB_overrides_vfprintf 1 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); # else /* Need to cast, because on Solaris, the third parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vfprintf, int, (FILE *fp, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vfprintf); #endif #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vfprintf # undef vfprintf # endif /* Assume vfprintf is always declared. */ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " "use gnulib module vfprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vprintf rpl_vprintf # endif # define GNULIB_overrides_vprintf 1 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); # else /* Need to cast, because on Solaris, the second parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); # endif _GL_CXXALIASWARN (vprintf); #endif #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK # if !GNULIB_overrides_vprintf # undef vprintf # endif /* Assume vprintf is always declared. */ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " "use gnulib module vprintf-posix for portable " "POSIX compliance"); #endif #if @GNULIB_VSNPRINTF@ # if @REPLACE_VSNPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif _GL_FUNCDECL_RPL (vsnprintf, int, (char *str, size_t size, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *str, size_t size, const char *format, va_list args)); # else # if !@HAVE_DECL_VSNPRINTF@ _GL_FUNCDECL_SYS (vsnprintf, int, (char *str, size_t size, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *str, size_t size, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsnprintf); #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " "use gnulib module vsnprintf for portability"); # endif #endif #if @GNULIB_VSPRINTF_POSIX@ # if @REPLACE_VSPRINTF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif _GL_FUNCDECL_RPL (vsprintf, int, (char *str, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *str, const char *format, va_list args)); # else /* Need to cast, because on Solaris, the third parameter is __va_list args and GCC's fixincludes did not change this to __gnuc_va_list. */ _GL_CXXALIAS_SYS_CAST (vsprintf, int, (char *str, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsprintf); #elif defined GNULIB_POSIXCHECK # undef vsprintf /* Assume vsprintf is always declared. */ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "use gnulib module vsprintf-posix for portable " "POSIX compliance"); #endif #endif /* _GL_STDIO_H */ #endif /* _GL_STDIO_H */ #endif dico-2.2/gnu/stdlib.in.h000066400000000000000000000634441172612674100151450ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . Copyright (C) 1995, 2001-2004, 2006-2011 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 3 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, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_malloc_and_calloc /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _GL_STDLIB_H #define _GL_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD 10 defines WEXITSTATUS in , not in . */ #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS # include #endif /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ # include #endif #if @GNULIB_RANDOM_R@ /* OSF/1 5.1 declares 'struct random_data' in , which is included from if _REENTRANT is defined. Include it whenever we need 'struct random_data'. */ # if @HAVE_RANDOM_H@ # include # endif # if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@ # include # endif # if !@HAVE_STRUCT_RANDOM_DATA@ /* Define 'struct random_data'. But allow multiple gnulib generated replacements to coexist. */ # if !GNULIB_defined_struct_random_data struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; # define GNULIB_defined_struct_random_data 1 # endif # endif #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only declares mkstemp. */ /* On Cygwin 1.7.1, only declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include #endif #if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__ # define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #else # define _GL_ATTRIBUTE_NORETURN #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #if @GNULIB__EXIT@ /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ # if !@HAVE__EXIT@ _GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN); # endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); _GL_CXXALIASWARN (_Exit); #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " "use gnulib module _Exit for portability"); # endif #endif #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ # if !@HAVE_ATOLL@ _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); _GL_CXXALIASWARN (atoll); #elif defined GNULIB_POSIXCHECK # undef atoll # if HAVE_RAW_DECL_ATOLL _GL_WARN_ON_USE (atoll, "atoll is unportable - " "use gnulib module atoll for portability"); # endif #endif #if @GNULIB_CALLOC_POSIX@ # if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif _GL_CXXALIASWARN (calloc); #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ # if @REPLACE_CANONICALIZE_FILE_NAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else # if !@HAVE_CANONICALIZE_FILE_NAME@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ # if !@HAVE_DECL_GETLOADAVG@ _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); _GL_CXXALIASWARN (getloadavg); #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " "use gnulib module getloadavg for portability"); # endif #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); _GL_CXXALIASWARN (getsubopt); #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " "use gnulib module getsubopt for portability"); # endif #endif #if @GNULIB_GRANTPT@ /* Change the ownership and access permission of the slave side of the pseudo-terminal whose master side is specified by FD. */ # if !@HAVE_GRANTPT@ _GL_FUNCDECL_SYS (grantpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (grantpt, int, (int fd)); _GL_CXXALIASWARN (grantpt); #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT _GL_WARN_ON_USE (ptsname, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif #if @GNULIB_MALLOC_POSIX@ # if @REPLACE_MALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef malloc # define malloc rpl_malloc # endif _GL_FUNCDECL_RPL (malloc, void *, (size_t size)); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif _GL_CXXALIASWARN (malloc); #elif defined GNULIB_POSIXCHECK # undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBTOWC@ # if @REPLACE_MBTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbtowc # define mbtowc rpl_mbtowc # endif _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # else _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif _GL_CXXALIASWARN (mbtowc); #endif #if @GNULIB_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ # if !@HAVE_MKDTEMP@ _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); _GL_CXXALIASWARN (mkdtemp); #elif defined GNULIB_POSIXCHECK # undef mkdtemp # if HAVE_RAW_DECL_MKDTEMP _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " "use gnulib module mkdtemp for portability"); # endif #endif #if @GNULIB_MKOSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMP@ _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemp); #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " "use gnulib module mkostemp for portability"); # endif #endif #if @GNULIB_MKOSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE before a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMPS@ _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemps); #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " "use gnulib module mkostemps for portability"); # endif #endif #if @GNULIB_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if @REPLACE_MKSTEMP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkstemp rpl_mkstemp # endif _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else # if ! @HAVE_MKSTEMP@ _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); #elif defined GNULIB_POSIXCHECK # undef mkstemp # if HAVE_RAW_DECL_MKSTEMP _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " "use gnulib module mkstemp for portability"); # endif #endif #if @GNULIB_MKSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE prior to a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKSTEMPS@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); _GL_CXXALIASWARN (mkstemps); #elif defined GNULIB_POSIXCHECK # undef mkstemps # if HAVE_RAW_DECL_MKSTEMPS _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " "use gnulib module mkstemps for portability"); # endif #endif #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ # if !@HAVE_PTSNAME@ _GL_FUNCDECL_SYS (ptsname, char *, (int fd)); # endif _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); _GL_CXXALIASWARN (ptsname); #elif defined GNULIB_POSIXCHECK # undef ptsname # if HAVE_RAW_DECL_PTSNAME _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " "use gnulib module ptsname for portability"); # endif #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putenv # define putenv rpl_putenv # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif _GL_CXXALIASWARN (putenv); #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); _GL_CXXALIASWARN (random_r); #elif defined GNULIB_POSIXCHECK # undef random_r # if HAVE_RAW_DECL_RANDOM_R _GL_WARN_ON_USE (random_r, "random_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); _GL_CXXALIASWARN (srandom_r); #elif defined GNULIB_POSIXCHECK # undef srandom_r # if HAVE_RAW_DECL_SRANDOM_R _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK # undef initstate_r # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state)); _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK # undef setstate_r # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_REALLOC_POSIX@ # if @REPLACE_REALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef realloc # define realloc rpl_realloc # endif _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif _GL_CXXALIASWARN (realloc); #elif defined GNULIB_POSIXCHECK # undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define realpath rpl_realpath # endif _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); # else # if !@HAVE_REALPATH@ _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); # endif _GL_CXXALIASWARN (realpath); #elif defined GNULIB_POSIXCHECK # undef realpath # if HAVE_RAW_DECL_REALPATH _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " "canonicalize or canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ # if !@HAVE_RPMATCH@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); _GL_CXXALIASWARN (rpmatch); #elif defined GNULIB_POSIXCHECK # undef rpmatch # if HAVE_RAW_DECL_RPMATCH _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " "use gnulib module rpmatch for portability"); # endif #endif #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ # if @REPLACE_SETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setenv # define setenv rpl_setenv # endif _GL_FUNCDECL_RPL (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (setenv, int, (const char *name, const char *value, int replace)); # else # if !@HAVE_DECL_SETENV@ _GL_FUNCDECL_SYS (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setenv, int, (const char *name, const char *value, int replace)); # endif # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) _GL_CXXALIASWARN (setenv); # endif #elif defined GNULIB_POSIXCHECK # undef setenv # if HAVE_RAW_DECL_SETENV _GL_WARN_ON_USE (setenv, "setenv is unportable - " "use gnulib module setenv for portability"); # endif #endif #if @GNULIB_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ # if @REPLACE_STRTOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strtod rpl_strtod # endif _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); # else # if !@HAVE_STRTOD@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); # endif _GL_CXXALIASWARN (strtod); #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD _GL_WARN_ON_USE (strtod, "strtod is unportable - " "use gnulib module strtod for portability"); # endif #endif #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ # if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll # if HAVE_RAW_DECL_STRTOLL _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " "use gnulib module strtoll for portability"); # endif #endif #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ # if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull # if HAVE_RAW_DECL_STRTOULL _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " "use gnulib module strtoull for portability"); # endif #endif #if @GNULIB_UNLOCKPT@ /* Unlock the slave side of the pseudo-terminal whose master side is specified by FD, so that it can be opened. */ # if !@HAVE_UNLOCKPT@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); _GL_CXXALIASWARN (unlockpt); #elif defined GNULIB_POSIXCHECK # undef unlockpt # if HAVE_RAW_DECL_UNLOCKPT _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " "use gnulib module unlockpt for portability"); # endif #endif #if @GNULIB_UNSETENV@ /* Remove the variable NAME from the environment. */ # if @REPLACE_UNSETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unsetenv # define unsetenv rpl_unsetenv # endif _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); # else # if !@HAVE_DECL_UNSETENV@ _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); # endif # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) _GL_CXXALIASWARN (unsetenv); # endif #elif defined GNULIB_POSIXCHECK # undef unsetenv # if HAVE_RAW_DECL_UNSETENV _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " "use gnulib module unsetenv for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCTOMB@ # if @REPLACE_WCTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctomb # define wctomb rpl_wctomb # endif _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); # else _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); # endif _GL_CXXALIASWARN (wctomb); #endif #endif /* _GL_STDLIB_H */ #endif /* _GL_STDLIB_H */ #endif dico-2.2/gnu/streq.h000066400000000000000000000077501172612674100144130ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Optimized string comparison. Copyright (C) 2001-2002, 2007, 2009-2011 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 3 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, see . */ /* Written by Bruno Haible . */ #ifndef _GL_STREQ_H #define _GL_STREQ_H #include /* STREQ allows to optimize string comparison with a small literal string. STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) is semantically equivalent to strcmp (s, "EUC-KR") == 0 just faster. */ /* Help GCC to generate good code for string comparisons with immediate strings. */ #if defined (__GNUC__) && defined (__OPTIMIZE__) static inline int streq9 (const char *s1, const char *s2) { return strcmp (s1 + 9, s2 + 9) == 0; } static inline int streq8 (const char *s1, const char *s2, char s28) { if (s1[8] == s28) { if (s28 == 0) return 1; else return streq9 (s1, s2); } else return 0; } static inline int streq7 (const char *s1, const char *s2, char s27, char s28) { if (s1[7] == s27) { if (s27 == 0) return 1; else return streq8 (s1, s2, s28); } else return 0; } static inline int streq6 (const char *s1, const char *s2, char s26, char s27, char s28) { if (s1[6] == s26) { if (s26 == 0) return 1; else return streq7 (s1, s2, s27, s28); } else return 0; } static inline int streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) { if (s1[5] == s25) { if (s25 == 0) return 1; else return streq6 (s1, s2, s26, s27, s28); } else return 0; } static inline int streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) { if (s1[4] == s24) { if (s24 == 0) return 1; else return streq5 (s1, s2, s25, s26, s27, s28); } else return 0; } static inline int streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[3] == s23) { if (s23 == 0) return 1; else return streq4 (s1, s2, s24, s25, s26, s27, s28); } else return 0; } static inline int streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[2] == s22) { if (s22 == 0) return 1; else return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[1] == s21) { if (s21 == 0) return 1; else return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); } else return 0; } static inline int streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) { if (s1[0] == s20) { if (s20 == 0) return 1; else return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); } else return 0; } #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) #else #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (strcmp (s1, s2) == 0) #endif #endif /* _GL_STREQ_H */ dico-2.2/gnu/strerror.c000066400000000000000000000217651172612674100151340ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* strerror.c --- POSIX compatible system error routine Copyright (C) 2007-2011 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 3 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, see . */ #include #include #if REPLACE_STRERROR # include # include # if GNULIB_defined_ESOCK /* native Windows platforms */ # if HAVE_WINSOCK2_H # include # endif # endif # include "intprops.h" /* Use the system functions, not the gnulib overrides in this file. */ # undef sprintf # undef strerror # if ! HAVE_DECL_STRERROR # define strerror(n) NULL # endif char * rpl_strerror (int n) { char const *msg = NULL; /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ switch (n) { # if GNULIB_defined_ETXTBSY case ETXTBSY: msg = "Text file busy"; break; # endif # if GNULIB_defined_ESOCK /* native Windows platforms */ /* EWOULDBLOCK is the same as EAGAIN. */ case EINPROGRESS: msg = "Operation now in progress"; break; case EALREADY: msg = "Operation already in progress"; break; case ENOTSOCK: msg = "Socket operation on non-socket"; break; case EDESTADDRREQ: msg = "Destination address required"; break; case EMSGSIZE: msg = "Message too long"; break; case EPROTOTYPE: msg = "Protocol wrong type for socket"; break; case ENOPROTOOPT: msg = "Protocol not available"; break; case EPROTONOSUPPORT: msg = "Protocol not supported"; break; case ESOCKTNOSUPPORT: msg = "Socket type not supported"; break; case EOPNOTSUPP: msg = "Operation not supported"; break; case EPFNOSUPPORT: msg = "Protocol family not supported"; break; case EAFNOSUPPORT: msg = "Address family not supported by protocol"; break; case EADDRINUSE: msg = "Address already in use"; break; case EADDRNOTAVAIL: msg = "Cannot assign requested address"; break; case ENETDOWN: msg = "Network is down"; break; case ENETUNREACH: msg = "Network is unreachable"; break; case ENETRESET: msg = "Network dropped connection on reset"; break; case ECONNABORTED: msg = "Software caused connection abort"; break; case ECONNRESET: msg = "Connection reset by peer"; break; case ENOBUFS: msg = "No buffer space available"; break; case EISCONN: msg = "Transport endpoint is already connected"; break; case ENOTCONN: msg = "Transport endpoint is not connected"; break; case ESHUTDOWN: msg = "Cannot send after transport endpoint shutdown"; break; case ETOOMANYREFS: msg = "Too many references: cannot splice"; break; case ETIMEDOUT: msg = "Connection timed out"; break; case ECONNREFUSED: msg = "Connection refused"; break; case ELOOP: msg = "Too many levels of symbolic links"; break; case EHOSTDOWN: msg = "Host is down"; break; case EHOSTUNREACH: msg = "No route to host"; break; case EPROCLIM: msg = "Too many processes"; break; case EUSERS: msg = "Too many users"; break; case EDQUOT: msg = "Disk quota exceeded"; break; case ESTALE: msg = "Stale NFS file handle"; break; case EREMOTE: msg = "Object is remote"; break; # if HAVE_WINSOCK2_H /* WSA_INVALID_HANDLE maps to EBADF */ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ /* WSA_INVALID_PARAMETER maps to EINVAL */ case WSA_OPERATION_ABORTED: msg = "Overlapped operation aborted"; break; case WSA_IO_INCOMPLETE: msg = "Overlapped I/O event object not in signaled state"; break; case WSA_IO_PENDING: msg = "Overlapped operations will complete later"; break; /* WSAEINTR maps to EINTR */ /* WSAEBADF maps to EBADF */ /* WSAEACCES maps to EACCES */ /* WSAEFAULT maps to EFAULT */ /* WSAEINVAL maps to EINVAL */ /* WSAEMFILE maps to EMFILE */ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ /* WSAEINPROGRESS is EINPROGRESS */ /* WSAEALREADY is EALREADY */ /* WSAENOTSOCK is ENOTSOCK */ /* WSAEDESTADDRREQ is EDESTADDRREQ */ /* WSAEMSGSIZE is EMSGSIZE */ /* WSAEPROTOTYPE is EPROTOTYPE */ /* WSAENOPROTOOPT is ENOPROTOOPT */ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ /* WSAEOPNOTSUPP is EOPNOTSUPP */ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */ /* WSAEADDRINUSE is EADDRINUSE */ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */ /* WSAENETDOWN is ENETDOWN */ /* WSAENETUNREACH is ENETUNREACH */ /* WSAENETRESET is ENETRESET */ /* WSAECONNABORTED is ECONNABORTED */ /* WSAECONNRESET is ECONNRESET */ /* WSAENOBUFS is ENOBUFS */ /* WSAEISCONN is EISCONN */ /* WSAENOTCONN is ENOTCONN */ /* WSAESHUTDOWN is ESHUTDOWN */ /* WSAETOOMANYREFS is ETOOMANYREFS */ /* WSAETIMEDOUT is ETIMEDOUT */ /* WSAECONNREFUSED is ECONNREFUSED */ /* WSAELOOP is ELOOP */ /* WSAENAMETOOLONG maps to ENAMETOOLONG */ /* WSAEHOSTDOWN is EHOSTDOWN */ /* WSAEHOSTUNREACH is EHOSTUNREACH */ /* WSAENOTEMPTY maps to ENOTEMPTY */ /* WSAEPROCLIM is EPROCLIM */ /* WSAEUSERS is EUSERS */ /* WSAEDQUOT is EDQUOT */ /* WSAESTALE is ESTALE */ /* WSAEREMOTE is EREMOTE */ case WSASYSNOTREADY: msg = "Network subsystem is unavailable"; break; case WSAVERNOTSUPPORTED: msg = "Winsock.dll version out of range"; break; case WSANOTINITIALISED: msg = "Successful WSAStartup not yet performed"; break; case WSAEDISCON: msg = "Graceful shutdown in progress"; break; case WSAENOMORE: case WSA_E_NO_MORE: msg = "No more results"; break; case WSAECANCELLED: case WSA_E_CANCELLED: msg = "Call was canceled"; break; case WSAEINVALIDPROCTABLE: msg = "Procedure call table is invalid"; break; case WSAEINVALIDPROVIDER: msg = "Service provider is invalid"; break; case WSAEPROVIDERFAILEDINIT: msg = "Service provider failed to initialize"; break; case WSASYSCALLFAILURE: msg = "System call failure"; break; case WSASERVICE_NOT_FOUND: msg = "Service not found"; break; case WSATYPE_NOT_FOUND: msg = "Class type not found"; break; case WSAEREFUSED: msg = "Database query was refused"; break; case WSAHOST_NOT_FOUND: msg = "Host not found"; break; case WSATRY_AGAIN: msg = "Nonauthoritative host not found"; break; case WSANO_RECOVERY: msg = "Nonrecoverable error"; break; case WSANO_DATA: msg = "Valid name, no data record of requested type"; break; /* WSA_QOS_* omitted */ # endif # endif # if GNULIB_defined_ENOMSG case ENOMSG: msg = "No message of desired type"; break; # endif # if GNULIB_defined_EIDRM case EIDRM: msg = "Identifier removed"; break; # endif # if GNULIB_defined_ENOLINK case ENOLINK: msg = "Link has been severed"; break; # endif # if GNULIB_defined_EPROTO case EPROTO: msg = "Protocol error"; break; # endif # if GNULIB_defined_EMULTIHOP case EMULTIHOP: msg = "Multihop attempted"; break; # endif # if GNULIB_defined_EBADMSG case EBADMSG: msg = "Bad message"; break; # endif # if GNULIB_defined_EOVERFLOW case EOVERFLOW: msg = "Value too large for defined data type"; break; # endif # if GNULIB_defined_ENOTSUP case ENOTSUP: msg = "Not supported"; break; # endif # if GNULIB_defined_ESTALE case ESTALE: msg = "Stale NFS file handle"; break; # endif # if GNULIB_defined_EDQUOT case EDQUOT: msg = "Disk quota exceeded"; break; # endif # if GNULIB_defined_ECANCELED case ECANCELED: msg = "Operation canceled"; break; # endif } if (msg) return (char *) msg; { char *result = strerror (n); if (result == NULL || result[0] == '\0') { static char const fmt[] = "Unknown error (%d)"; static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)]; sprintf (msg_buf, fmt, n); return msg_buf; } return result; } } #endif dico-2.2/gnu/strftime.c000066400000000000000000001335721172612674100151070ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 1991-2001, 2003-2007, 2009-2011 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 3 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, see . */ #ifdef _LIBC # define HAVE_STRUCT_ERA_ENTRY 1 # define HAVE_TM_GMTOFF 1 # define HAVE_TM_ZONE 1 # define HAVE_TZNAME 1 # define HAVE_TZSET 1 # include "../locale/localeinfo.h" #else # include # if FPRINTFTIME # include "ignore-value.h" # include "fprintftime.h" # else # include "strftime.h" # endif #endif #include #include #if HAVE_TZNAME && !HAVE_DECL_TZNAME extern char *tzname[]; #endif /* Do multibyte processing if multibytes are supported, unless multibyte sequences are safe in formats. Multibyte sequences are safe if they cannot contain byte sequences that look like format conversion specifications. The multibyte encodings used by the C library on the various platforms (UTF-8, GB2312, GBK, CP936, GB18030, EUC-TW, BIG5, BIG5-HKSCS, CP950, EUC-JP, EUC-KR, CP949, SHIFT_JIS, CP932, JOHAB) are safe for formats, because the byte '%' cannot occur in a multibyte character except in the first byte. The DEC-HANYU encoding used on OSF/1 is not safe for formats, but this encoding has never been seen in real-life use, so we ignore it. */ #if !(defined __osf__ && 0) # define MULTIBYTE_IS_FORMAT_SAFE 1 #endif #define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE) #if DO_MULTIBYTE # include static const mbstate_t mbstate_zero; #endif #include #include #include #include #include #ifdef COMPILE_WIDE # include # define CHAR_T wchar_t # define UCHAR_T unsigned int # define L_(Str) L##Str # define NLW(Sym) _NL_W##Sym # define MEMCPY(d, s, n) __wmemcpy (d, s, n) # define STRLEN(s) __wcslen (s) #else # define CHAR_T char # define UCHAR_T unsigned char # define L_(Str) Str # define NLW(Sym) Sym # define MEMCPY(d, s, n) memcpy (d, s, n) # define STRLEN(s) strlen (s) #endif /* Shift A right by B bits portably, by dividing A by 2**B and truncating towards minus infinity. A and B should be free of side effects, and B should be in the range 0 <= B <= INT_BITS - 2, where INT_BITS is the number of useful bits in an int. GNU code can assume that INT_BITS is at least 32. ISO C99 says that A >> B is implementation-defined if A < 0. Some implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift right in the usual way when A < 0, so SHR falls back on division if ordinary A >> B doesn't seem to be the usual signed shift. */ #define SHR(a, b) \ (-1 >> 1 == -1 \ ? (a) >> (b) \ : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) /* Bound on length of the string representing an integer type or expression T. Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485; add 1 for integer division truncation; add 1 more for a minus sign if needed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) #define TM_YEAR_BASE 1900 #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif #ifdef _LIBC # define tzname __tzname # define tzset __tzset #endif #if !HAVE_TM_GMTOFF /* Portable standalone applications should supply a "time.h" that declares a POSIX-compliant localtime_r, for the benefit of older implementations that lack localtime_r or have a nonstandard one. See the gnulib time_r module for one way to implement this. */ # undef __gmtime_r # undef __localtime_r # define __gmtime_r gmtime_r # define __localtime_r localtime_r #endif #ifndef FPRINTFTIME # define FPRINTFTIME 0 #endif #if FPRINTFTIME # define STREAM_OR_CHAR_T FILE # define STRFTIME_ARG(x) /* empty */ #else # define STREAM_OR_CHAR_T CHAR_T # define STRFTIME_ARG(x) x, #endif #if FPRINTFTIME # define memset_byte(P, Len, Byte) \ do { size_t _i; for (_i = 0; _i < Len; _i++) fputc (Byte, P); } while (0) # define memset_space(P, Len) memset_byte (P, Len, ' ') # define memset_zero(P, Len) memset_byte (P, Len, '0') #elif defined COMPILE_WIDE # define memset_space(P, Len) (wmemset (P, L' ', Len), (P) += (Len)) # define memset_zero(P, Len) (wmemset (P, L'0', Len), (P) += (Len)) #else # define memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len)) # define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len)) #endif #if FPRINTFTIME # define advance(P, N) #else # define advance(P, N) ((P) += (N)) #endif #define add(n, f) \ do \ { \ int _n = (n); \ int _delta = width - _n; \ int _incr = _n + (_delta > 0 ? _delta : 0); \ if ((size_t) _incr >= maxsize - i) \ return 0; \ if (p) \ { \ if (digits == 0 && _delta > 0) \ { \ if (pad == L_('0')) \ memset_zero (p, _delta); \ else \ memset_space (p, _delta); \ } \ f; \ advance (p, _n); \ } \ i += _incr; \ } while (0) #if FPRINTFTIME # define add1(C) add (1, fputc (C, p)) #else # define add1(C) add (1, *p = C) #endif #if FPRINTFTIME # define cpy(n, s) \ add ((n), \ do \ { \ if (to_lowcase) \ fwrite_lowcase (p, (s), _n); \ else if (to_uppcase) \ fwrite_uppcase (p, (s), _n); \ else \ { \ /* We are ignoring the value of fwrite here, in spite of the \ fact that technically, that may not be valid: the fwrite \ specification in POSIX 2008 defers to that of fputc, which \ is intended to be consistent with the one from ISO C, \ which permits failure due to ENOMEM *without* setting the \ stream's error indicator. */ \ ignore_value (fwrite ((s), _n, 1, p)); \ } \ } \ while (0) \ ) #else # define cpy(n, s) \ add ((n), \ if (to_lowcase) \ memcpy_lowcase (p, (s), _n LOCALE_ARG); \ else if (to_uppcase) \ memcpy_uppcase (p, (s), _n LOCALE_ARG); \ else \ MEMCPY ((void *) p, (void const *) (s), _n)) #endif #ifdef COMPILE_WIDE # ifndef USE_IN_EXTENDED_LOCALE_MODEL # undef __mbsrtowcs_l # define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) # endif # define widen(os, ws, l) \ { \ mbstate_t __st; \ const char *__s = os; \ memset (&__st, '\0', sizeof (__st)); \ l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t)); \ (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ } #endif #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL /* 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. */ # define strftime __strftime_l # define wcsftime __wcsftime_l # undef _NL_CURRENT # define _NL_CURRENT(category, item) \ (current->values[_NL_ITEM_INDEX (item)].string) # define LOCALE_ARG , loc # define LOCALE_PARAM_PROTO , __locale_t loc # define HELPER_LOCALE_ARG , current #else # define LOCALE_PARAM_PROTO # define LOCALE_ARG # ifdef _LIBC # define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) # else # define HELPER_LOCALE_ARG # endif #endif #ifdef COMPILE_WIDE # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define TOUPPER(Ch, L) __towupper_l (Ch, L) # define TOLOWER(Ch, L) __towlower_l (Ch, L) # else # define TOUPPER(Ch, L) towupper (Ch) # define TOLOWER(Ch, L) towlower (Ch) # endif #else # ifdef USE_IN_EXTENDED_LOCALE_MODEL # define TOUPPER(Ch, L) __toupper_l (Ch, L) # define TOLOWER(Ch, L) __tolower_l (Ch, L) # else # define TOUPPER(Ch, L) toupper (Ch) # define TOLOWER(Ch, L) tolower (Ch) # endif #endif /* We don't use `isdigit' here since the locale dependent interpretation is not what we want here. We only need to accept the arabic digits in the ASCII range. One day there is perhaps a more reliable way to accept other sets of digits. */ #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) #if FPRINTFTIME static void fwrite_lowcase (FILE *fp, const CHAR_T *src, size_t len) { while (len-- > 0) { fputc (TOLOWER ((UCHAR_T) *src, loc), fp); ++src; } } static void fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len) { while (len-- > 0) { fputc (TOUPPER ((UCHAR_T) *src, loc), fp); ++src; } } #else static CHAR_T * memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM_PROTO) { while (len-- > 0) dest[len] = TOLOWER ((UCHAR_T) src[len], loc); return dest; } static CHAR_T * memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, size_t len LOCALE_PARAM_PROTO) { while (len-- > 0) dest[len] = TOUPPER ((UCHAR_T) src[len], loc); return dest; } #endif #if ! HAVE_TM_GMTOFF /* Yield the difference between *A and *B, measured in seconds, ignoring leap seconds. */ # define tm_diff ftime_tm_diff static int tm_diff (const struct tm *a, const struct tm *b) { /* Compute intervening leap days correctly even if year is negative. Take care to avoid int overflow in leap day calculations, but it's OK to assume that A and B are close to each other. */ int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); int a100 = a4 / 25 - (a4 % 25 < 0); int b100 = b4 / 25 - (b4 % 25 < 0); int a400 = SHR (a100, 2); int b400 = SHR (b100, 2); int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); int years = a->tm_year - b->tm_year; int days = (365 * years + intervening_leap_days + (a->tm_yday - b->tm_yday)); return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + (a->tm_min - b->tm_min)) + (a->tm_sec - b->tm_sec)); } #endif /* ! HAVE_TM_GMTOFF */ /* The number of days from the first day of the first ISO week of this year to the year day YDAY with week day WDAY. ISO weeks start on Monday; the first ISO week has the year's first Thursday. YDAY may be as small as YDAY_MINIMUM. */ #define ISO_WEEK_START_WDAY 1 /* Monday */ #define ISO_WEEK1_WDAY 4 /* Thursday */ #define YDAY_MINIMUM (-366) #ifdef __GNUC__ __inline__ #endif static int iso_week_days (int yday, int wday) { /* Add enough to the first operand of % to make it nonnegative. */ int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; return (yday - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); } /* When compiling this file, GNU applications can #define my_strftime to a symbol (typically nstrftime) to get an extended strftime with extra arguments UT and NS. Emacs is a special case for now, but this Emacs-specific code can be removed once Emacs's config.h defines my_strftime. */ #if defined emacs && !defined my_strftime # define my_strftime nstrftime #endif #if FPRINTFTIME # undef my_strftime # define my_strftime fprintftime #endif #ifdef my_strftime # define extra_args , ut, ns # define extra_args_spec , int ut, int ns #else # if defined COMPILE_WIDE # define my_strftime wcsftime # define nl_get_alt_digit _nl_get_walt_digit # else # define my_strftime strftime # define nl_get_alt_digit _nl_get_alt_digit # endif # define extra_args # define extra_args_spec /* We don't have this information in general. */ # define ut 0 # define ns 0 #endif /* Just like my_strftime, below, but with one more parameter, UPCASE, to indicate that the result should be converted to upper case. */ static size_t strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) const CHAR_T *format, const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) { #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL struct locale_data *const current = loc->__locales[LC_TIME]; #endif #if FPRINTFTIME size_t maxsize = (size_t) -1; #endif int hour12 = tp->tm_hour; #ifdef _NL_CURRENT /* We cannot make the following values variables since we must delay the evaluation of these values until really needed since some expressions might not be valid in every situation. The `struct tm' might be generated by a strptime() call that initialized only a few elements. Dereference the pointers only if the format requires this. Then it is ok to fail if the pointers are invalid. */ # define a_wkday \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)) # define f_wkday \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)) # define a_month \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)) # define f_month \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)) # define ampm \ ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ ? NLW(PM_STR) : NLW(AM_STR))) # define aw_len STRLEN (a_wkday) # define am_len STRLEN (a_month) # define ap_len STRLEN (ampm) #endif const char *zone; size_t i = 0; STREAM_OR_CHAR_T *p = s; const CHAR_T *f; #if DO_MULTIBYTE && !defined COMPILE_WIDE const char *format_end = NULL; #endif #if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned by localtime. On such systems, we must either use the tzset and localtime wrappers to work around the bug (which sets HAVE_RUN_TZSET_TEST) or make a copy of the structure. */ struct tm copy = *tp; tp = © #endif zone = NULL; #if HAVE_TM_ZONE /* The POSIX test suite assumes that setting the environment variable TZ to a new value before calling strftime() will influence the result (the %Z format) even if the information in TP is computed with a totally different time zone. This is bogus: though POSIX allows bad behavior like this, POSIX does not require it. Do the right thing instead. */ zone = (const char *) tp->tm_zone; #endif #if HAVE_TZNAME if (ut) { if (! (zone && *zone)) zone = "GMT"; } else { /* POSIX.1 requires that local time zone information be used as though strftime called tzset. */ # if HAVE_TZSET tzset (); # endif } #endif if (hour12 > 12) hour12 -= 12; else if (hour12 == 0) hour12 = 12; for (f = format; *f != '\0'; ++f) { int pad = 0; /* Padding for number ('-', '_', or 0). */ int modifier; /* Field modifier ('E', 'O', or 0). */ int digits = 0; /* Max digits for numeric format. */ int number_value; /* Numeric value to be printed. */ unsigned int u_number_value; /* (unsigned int) number_value. */ bool negative_number; /* The number is negative. */ bool always_output_a_sign; /* +/- should always be output. */ int tz_colon_mask; /* Bitmask of where ':' should appear. */ const CHAR_T *subfmt; CHAR_T sign_char; CHAR_T *bufp; CHAR_T buf[1 + 2 /* for the two colons in a %::z or %:::z time zone */ + (sizeof (int) < sizeof (time_t) ? INT_STRLEN_BOUND (time_t) : INT_STRLEN_BOUND (int))]; int width = -1; bool to_lowcase = false; bool to_uppcase = upcase; size_t colons; bool change_case = false; int format_char; #if DO_MULTIBYTE && !defined COMPILE_WIDE switch (*f) { case L_('%'): break; case L_('\b'): case L_('\t'): case L_('\n'): case L_('\v'): case L_('\f'): case L_('\r'): case L_(' '): case L_('!'): case L_('"'): case L_('#'): case L_('&'): case L_('\''): case L_('('): case L_(')'): case L_('*'): case L_('+'): case L_(','): case L_('-'): case L_('.'): case L_('/'): case L_('0'): case L_('1'): case L_('2'): case L_('3'): case L_('4'): case L_('5'): case L_('6'): case L_('7'): case L_('8'): case L_('9'): case L_(':'): case L_(';'): case L_('<'): case L_('='): case L_('>'): case L_('?'): case L_('A'): case L_('B'): case L_('C'): case L_('D'): case L_('E'): case L_('F'): case L_('G'): case L_('H'): case L_('I'): case L_('J'): case L_('K'): case L_('L'): case L_('M'): case L_('N'): case L_('O'): case L_('P'): case L_('Q'): case L_('R'): case L_('S'): case L_('T'): case L_('U'): case L_('V'): case L_('W'): case L_('X'): case L_('Y'): case L_('Z'): case L_('['): case L_('\\'): case L_(']'): case L_('^'): case L_('_'): case L_('a'): case L_('b'): case L_('c'): case L_('d'): case L_('e'): case L_('f'): case L_('g'): case L_('h'): case L_('i'): case L_('j'): case L_('k'): case L_('l'): case L_('m'): case L_('n'): case L_('o'): case L_('p'): case L_('q'): case L_('r'): case L_('s'): case L_('t'): case L_('u'): case L_('v'): case L_('w'): case L_('x'): case L_('y'): case L_('z'): case L_('{'): case L_('|'): case L_('}'): case L_('~'): /* The C Standard requires these 98 characters (plus '%') to be in the basic execution character set. None of these characters can start a multibyte sequence, so they need not be analyzed further. */ add1 (*f); continue; default: /* Copy this multibyte sequence until we reach its end, find an error, or come back to the initial shift state. */ { mbstate_t mbstate = mbstate_zero; size_t len = 0; size_t fsize; if (! format_end) format_end = f + strlen (f) + 1; fsize = format_end - f; do { size_t bytes = mbrlen (f + len, fsize - len, &mbstate); if (bytes == 0) break; if (bytes == (size_t) -2) { len += strlen (f + len); break; } if (bytes == (size_t) -1) { len++; break; } len += bytes; } while (! mbsinit (&mbstate)); cpy (len, f); f += len - 1; continue; } } #else /* ! DO_MULTIBYTE */ /* Either multibyte encodings are not supported, they are safe for formats, so any non-'%' byte can be copied through, or this is the wide character version. */ if (*f != L_('%')) { add1 (*f); continue; } #endif /* ! DO_MULTIBYTE */ /* Check for flags that can modify a format. */ while (1) { switch (*++f) { /* This influences the number formats. */ case L_('_'): case L_('-'): case L_('0'): pad = *f; continue; /* This changes textual output. */ case L_('^'): to_uppcase = true; continue; case L_('#'): change_case = true; continue; default: break; } break; } /* As a GNU extension we allow to specify the field width. */ if (ISDIGIT (*f)) { width = 0; do { if (width > INT_MAX / 10 || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) /* Avoid overflow. */ width = INT_MAX; else { width *= 10; width += *f - L_('0'); } ++f; } while (ISDIGIT (*f)); } /* Check for modifiers. */ switch (*f) { case L_('E'): case L_('O'): modifier = *f++; break; default: modifier = 0; break; } /* Now do the specified format. */ format_char = *f; switch (format_char) { #define DO_NUMBER(d, v) \ digits = d; \ number_value = v; goto do_number #define DO_SIGNED_NUMBER(d, negative, v) \ digits = d; \ negative_number = negative; \ u_number_value = v; goto do_signed_number /* The mask is not what you might think. When the ordinal i'th bit is set, insert a colon before the i'th digit of the time zone representation. */ #define DO_TZ_OFFSET(d, negative, mask, v) \ digits = d; \ negative_number = negative; \ tz_colon_mask = mask; \ u_number_value = v; goto do_tz_offset #define DO_NUMBER_SPACEPAD(d, v) \ digits = d; \ number_value = v; goto do_number_spacepad case L_('%'): if (modifier != 0) goto bad_format; add1 (*f); break; case L_('a'): if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = true; to_lowcase = false; } #ifdef _NL_CURRENT cpy (aw_len, a_wkday); break; #else goto underlying_strftime; #endif case 'A': if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = true; to_lowcase = false; } #ifdef _NL_CURRENT cpy (STRLEN (f_wkday), f_wkday); break; #else goto underlying_strftime; #endif case L_('b'): case L_('h'): if (change_case) { to_uppcase = true; to_lowcase = false; } if (modifier != 0) goto bad_format; #ifdef _NL_CURRENT cpy (am_len, a_month); break; #else goto underlying_strftime; #endif case L_('B'): if (modifier != 0) goto bad_format; if (change_case) { to_uppcase = true; to_lowcase = false; } #ifdef _NL_CURRENT cpy (STRLEN (f_month), f_month); break; #else goto underlying_strftime; #endif case L_('c'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == 'E' && (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_D_T_FMT))) != '\0'))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT)); #else goto underlying_strftime; #endif subformat: { size_t len = strftime_case_ (to_uppcase, NULL, STRFTIME_ARG ((size_t) -1) subfmt, tp extra_args LOCALE_ARG); add (len, strftime_case_ (to_uppcase, p, STRFTIME_ARG (maxsize - i) subfmt, tp extra_args LOCALE_ARG)); } break; #if !(defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY) underlying_strftime: { /* The relevant information is available only via the underlying strftime implementation, so use that. */ char ufmt[5]; char *u = ufmt; char ubuf[1024]; /* enough for any single format in practice */ size_t len; /* Make sure we're calling the actual underlying strftime. In some cases, config.h contains something like "#define strftime rpl_strftime". */ # ifdef strftime # undef strftime size_t strftime (); # endif /* The space helps distinguish strftime failure from empty output. */ *u++ = ' '; *u++ = '%'; if (modifier != 0) *u++ = modifier; *u++ = format_char; *u = '\0'; len = strftime (ubuf, sizeof ubuf, ufmt, tp); if (len != 0) cpy (len - 1, ubuf + 1); } break; #endif case L_('C'): if (modifier == L_('O')) goto bad_format; if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE size_t len = __wcslen (era->era_wname); cpy (len, era->era_wname); # else size_t len = strlen (era->era_name); cpy (len, era->era_name); # endif break; } #else goto underlying_strftime; #endif } { int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; century -= tp->tm_year % 100 < 0 && 0 < century; DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century); } case L_('x'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == L_('E') && (*(subfmt = (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) != L_('\0')))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); goto subformat; #else goto underlying_strftime; #endif case L_('D'): if (modifier != 0) goto bad_format; subfmt = L_("%m/%d/%y"); goto subformat; case L_('d'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_mday); case L_('e'): if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, tp->tm_mday); /* All numeric formats set DIGITS and NUMBER_VALUE (or U_NUMBER_VALUE) and then jump to one of these labels. */ do_tz_offset: always_output_a_sign = true; goto do_number_body; do_number_spacepad: /* Force `_' flag unless overridden by `0' or `-' flag. */ if (pad != L_('0') && pad != L_('-')) pad = L_('_'); do_number: /* Format NUMBER_VALUE according to the MODIFIER flag. */ negative_number = number_value < 0; u_number_value = number_value; do_signed_number: always_output_a_sign = false; tz_colon_mask = 0; do_number_body: /* Format U_NUMBER_VALUE according to the MODIFIER flag. NEGATIVE_NUMBER is nonzero if the original number was negative; in this case it was converted directly to unsigned int (i.e., modulo (UINT_MAX + 1)) without negating it. */ if (modifier == L_('O') && !negative_number) { #ifdef _NL_CURRENT /* Get the locale specific alternate representation of the number. If none exist NULL is returned. */ const CHAR_T *cp = nl_get_alt_digit (u_number_value HELPER_LOCALE_ARG); if (cp != NULL) { size_t digitlen = STRLEN (cp); if (digitlen != 0) { cpy (digitlen, cp); break; } } #else goto underlying_strftime; #endif } bufp = buf + sizeof (buf) / sizeof (buf[0]); if (negative_number) u_number_value = - u_number_value; do { if (tz_colon_mask & 1) *--bufp = ':'; tz_colon_mask >>= 1; *--bufp = u_number_value % 10 + L_('0'); u_number_value /= 10; } while (u_number_value != 0 || tz_colon_mask != 0); do_number_sign_and_padding: if (digits < width) digits = width; sign_char = (negative_number ? L_('-') : always_output_a_sign ? L_('+') : 0); if (pad == L_('-')) { if (sign_char) add1 (sign_char); } else { int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) - bufp) - !!sign_char; if (padding > 0) { if (pad == L_('_')) { if ((size_t) padding >= maxsize - i) return 0; if (p) memset_space (p, padding); i += padding; width = width > padding ? width - padding : 0; if (sign_char) add1 (sign_char); } else { if ((size_t) digits >= maxsize - i) return 0; if (sign_char) add1 (sign_char); if (p) memset_zero (p, padding); i += padding; width = 0; } } else { if (sign_char) add1 (sign_char); } } cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); break; case L_('F'): if (modifier != 0) goto bad_format; subfmt = L_("%Y-%m-%d"); goto subformat; case L_('H'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_hour); case L_('I'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, hour12); case L_('k'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, tp->tm_hour); case L_('l'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; DO_NUMBER_SPACEPAD (2, hour12); case L_('j'): if (modifier == L_('E')) goto bad_format; DO_SIGNED_NUMBER (3, tp->tm_yday < -1, tp->tm_yday + 1U); case L_('M'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_min); case L_('m'): if (modifier == L_('E')) goto bad_format; DO_SIGNED_NUMBER (2, tp->tm_mon < -1, tp->tm_mon + 1U); #ifndef _LIBC case L_('N'): /* GNU extension. */ if (modifier == L_('E')) goto bad_format; number_value = ns; if (width == -1) width = 9; else { /* Take an explicit width less than 9 as a precision. */ int j; for (j = width; j < 9; j++) number_value /= 10; } DO_NUMBER (width, number_value); #endif case L_('n'): add1 (L_('\n')); break; case L_('P'): to_lowcase = true; #ifndef _NL_CURRENT format_char = L_('p'); #endif /* FALLTHROUGH */ case L_('p'): if (change_case) { to_uppcase = false; to_lowcase = true; } #ifdef _NL_CURRENT cpy (ap_len, ampm); break; #else goto underlying_strftime; #endif case L_('R'): subfmt = L_("%H:%M"); goto subformat; case L_('r'): #ifdef _NL_CURRENT if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT_AMPM))) == L_('\0')) subfmt = L_("%I:%M:%S %p"); goto subformat; #else goto underlying_strftime; #endif case L_('S'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, tp->tm_sec); case L_('s'): /* GNU extension. */ { struct tm ltm; time_t t; ltm = *tp; t = mktime (<m); /* Generate string value for T using time_t arithmetic; this works even if sizeof (long) < sizeof (time_t). */ bufp = buf + sizeof (buf) / sizeof (buf[0]); negative_number = t < 0; do { int d = t % 10; t /= 10; *--bufp = (negative_number ? -d : d) + L_('0'); } while (t != 0); digits = 1; always_output_a_sign = false; goto do_number_sign_and_padding; } case L_('X'): if (modifier == L_('O')) goto bad_format; #ifdef _NL_CURRENT if (! (modifier == L_('E') && (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT))) != L_('\0')))) subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT)); goto subformat; #else goto underlying_strftime; #endif case L_('T'): subfmt = L_("%H:%M:%S"); goto subformat; case L_('t'): add1 (L_('\t')); break; case L_('u'): DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); case L_('U'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); case L_('V'): case L_('g'): case L_('G'): if (modifier == L_('E')) goto bad_format; { /* YEAR is a leap year if and only if (tp->tm_year + TM_YEAR_BASE) is a leap year, except that YEAR and YEAR - 1 both work correctly even when (tp->tm_year + TM_YEAR_BASE) would overflow. */ int year = (tp->tm_year + (tp->tm_year < 0 ? TM_YEAR_BASE % 400 : TM_YEAR_BASE % 400 - 400)); int year_adjust = 0; int days = iso_week_days (tp->tm_yday, tp->tm_wday); if (days < 0) { /* This ISO week belongs to the previous year. */ year_adjust = -1; days = iso_week_days (tp->tm_yday + (365 + __isleap (year - 1)), tp->tm_wday); } else { int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)), tp->tm_wday); if (0 <= d) { /* This ISO week belongs to the next year. */ year_adjust = 1; days = d; } } switch (*f) { case L_('g'): { int yy = (tp->tm_year % 100 + year_adjust) % 100; DO_NUMBER (2, (0 <= yy ? yy : tp->tm_year < -TM_YEAR_BASE - year_adjust ? -yy : yy + 100)); } case L_('G'): DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, (tp->tm_year + (unsigned int) TM_YEAR_BASE + year_adjust)); default: DO_NUMBER (2, days / 7 + 1); } } case L_('W'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7); case L_('w'): if (modifier == L_('E')) goto bad_format; DO_NUMBER (1, tp->tm_wday); case L_('Y'): if (modifier == 'E') { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE subfmt = era->era_wformat; # else subfmt = era->era_format; # endif goto subformat; } #else goto underlying_strftime; #endif } if (modifier == L_('O')) goto bad_format; else DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, tp->tm_year + (unsigned int) TM_YEAR_BASE); case L_('y'): if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { int delta = tp->tm_year - era->start_date[0]; DO_NUMBER (1, (era->offset + delta * era->absolute_direction)); } #else goto underlying_strftime; #endif } { int yy = tp->tm_year % 100; if (yy < 0) yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; DO_NUMBER (2, yy); } case L_('Z'): if (change_case) { to_uppcase = false; to_lowcase = true; } #if HAVE_TZNAME /* The tzset() call might have changed the value. */ if (!(zone && *zone) && tp->tm_isdst >= 0) zone = tzname[tp->tm_isdst != 0]; #endif if (! zone) zone = ""; #ifdef COMPILE_WIDE { /* The zone string is always given in multibyte form. We have to transform it first. */ wchar_t *wczone; size_t len; widen (zone, wczone, len); cpy (len, wczone); } #else cpy (strlen (zone), zone); #endif break; case L_(':'): /* :, ::, and ::: are valid only just before 'z'. :::: etc. are rejected later. */ for (colons = 1; f[colons] == L_(':'); colons++) continue; if (f[colons] != L_('z')) goto bad_format; f += colons; goto do_z_conversion; case L_('z'): colons = 0; do_z_conversion: if (tp->tm_isdst < 0) break; { int diff; int hour_diff; int min_diff; int sec_diff; #if HAVE_TM_GMTOFF diff = tp->tm_gmtoff; #else if (ut) diff = 0; else { struct tm gtm; struct tm ltm; time_t lt; ltm = *tp; lt = mktime (<m); if (lt == (time_t) -1) { /* mktime returns -1 for errors, but -1 is also a valid time_t value. Check whether an error really occurred. */ struct tm tm; if (! __localtime_r (<, &tm) || ((ltm.tm_sec ^ tm.tm_sec) | (ltm.tm_min ^ tm.tm_min) | (ltm.tm_hour ^ tm.tm_hour) | (ltm.tm_mday ^ tm.tm_mday) | (ltm.tm_mon ^ tm.tm_mon) | (ltm.tm_year ^ tm.tm_year))) break; } if (! __gmtime_r (<, >m)) break; diff = tm_diff (<m, >m); } #endif hour_diff = diff / 60 / 60; min_diff = diff / 60 % 60; sec_diff = diff % 60; switch (colons) { case 0: /* +hhmm */ DO_TZ_OFFSET (5, diff < 0, 0, hour_diff * 100 + min_diff); case 1: tz_hh_mm: /* +hh:mm */ DO_TZ_OFFSET (6, diff < 0, 04, hour_diff * 100 + min_diff); case 2: tz_hh_mm_ss: /* +hh:mm:ss */ DO_TZ_OFFSET (9, diff < 0, 024, hour_diff * 10000 + min_diff * 100 + sec_diff); case 3: /* +hh if possible, else +hh:mm, else +hh:mm:ss */ if (sec_diff != 0) goto tz_hh_mm_ss; if (min_diff != 0) goto tz_hh_mm; DO_TZ_OFFSET (3, diff < 0, 0, hour_diff); default: goto bad_format; } } case L_('\0'): /* GNU extension: % at end of format. */ --f; /* Fall through. */ default: /* Unknown format; output the format, including the '%', since this is most likely the right thing to do if a multibyte string has been misparsed. */ bad_format: { int flen; for (flen = 1; f[1 - flen] != L_('%'); flen++) continue; cpy (flen, &f[1 - flen]); } break; } } #if ! FPRINTFTIME if (p && maxsize != 0) *p = L_('\0'); #endif return i; } /* Write information from TP into S according to the format string FORMAT, writing no more that MAXSIZE characters (including the terminating '\0') and returning number of characters written. If S is NULL, nothing will be written anywhere, so to determine how many characters would be written, use NULL for S and (size_t) -1 for MAXSIZE. */ size_t my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) const CHAR_T *format, const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) { return strftime_case_ (false, s, STRFTIME_ARG (maxsize) format, tp extra_args LOCALE_ARG); } #if defined _LIBC && ! FPRINTFTIME libc_hidden_def (my_strftime) #endif #if defined emacs && ! FPRINTFTIME /* For Emacs we have a separate interface which corresponds to the normal strftime function plus the ut argument, but without the ns argument. */ size_t emacs_strftimeu (char *s, size_t maxsize, const char *format, const struct tm *tp, int ut) { return my_strftime (s, maxsize, format, tp, ut, 0); } #endif dico-2.2/gnu/strftime.h000066400000000000000000000024401172612674100151010ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* declarations for strftime.c Copyright (C) 2002, 2004, 2008-2011 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 3 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, see . */ #include #ifdef __cplusplus extern "C" { #endif /* Just like strftime, but with two more arguments: POSIX requires that strftime use the local timezone information. When __UTC is nonzero and tm->tm_zone is NULL or the empty string, use UTC instead. Use __NS as the number of nanoseconds in the %N directive. */ size_t nstrftime (char *, size_t, char const *, struct tm const *, int __utc, int __ns); #ifdef __cplusplus } #endif dico-2.2/gnu/string.in.h000066400000000000000000001130141172612674100151570ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . Copyright (C) 1995-1996, 2001-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #ifndef _GL_STRING_H #define _GL_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD defines mbslen as a macro. */ #if @GNULIB_MBSLEN@ && defined __MirBSD__ # include #endif /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* NetBSD 5.0 declares strsignal in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); # else # if ! @HAVE_MEMCHR@ _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const void * std::memchr (const void *, int, size_t); } extern "C++" { void * std::memchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memchr, void *, (void const *__s, int __c, size_t __n), void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); _GL_CXXALIASWARN1 (memchr, void const *, (void const *__s, int __c, size_t __n)); # else _GL_CXXALIASWARN (memchr); # endif #elif defined GNULIB_POSIXCHECK # undef memchr /* Assume memchr is always declared. */ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " "use gnulib module memchr for portability" ); #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memmem rpl_memmem # endif _GL_FUNCDECL_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # else # if ! @HAVE_DECL_MEMMEM@ _GL_FUNCDECL_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # endif _GL_CXXALIASWARN (memmem); #elif defined GNULIB_POSIXCHECK # undef memmem # if HAVE_RAW_DECL_MEMMEM _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " "use gnulib module memmem-simple for portability, " "and module memmem for speed" ); # endif #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); _GL_CXXALIASWARN (mempcpy); #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " "use gnulib module mempcpy for portability"); # endif #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::memrchr (const void *, int, size_t); } extern "C++" { void * std::memrchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); # else _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # if HAVE_RAW_DECL_MEMRCHR _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " "use gnulib module memrchr for portability"); # endif #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::rawmemchr (const void *, int); } extern "C++" { void * std::rawmemchr (void *, int); } */ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); # else _GL_CXXALIASWARN (rawmemchr); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # if HAVE_RAW_DECL_RAWMEMCHR _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " "use gnulib module rawmemchr for portability"); # endif #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); _GL_CXXALIASWARN (stpcpy); #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " "use gnulib module stpcpy for portability"); # endif #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if @REPLACE_STPNCPY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef stpncpy # define stpncpy rpl_stpncpy # endif _GL_FUNCDECL_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # else # if ! @HAVE_STPNCPY@ _GL_FUNCDECL_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif _GL_CXXALIASWARN (stpncpy); #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " "use gnulib module stpncpy for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if ! @HAVE_STRCHRNUL@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * std::strchrnul (const char *, int); } extern "C++" { char * std::strchrnul (char *, int); } */ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char *, (char const *__s, int __c_in), char const *, (char const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); # else _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # if HAVE_RAW_DECL_STRCHRNUL _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " "use gnulib module strchrnul for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup # define strdup rpl_strdup # endif _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); #elif defined GNULIB_POSIXCHECK # undef strdup # if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif #endif /* Append no more than N characters from SRC onto DEST. */ #if @GNULIB_STRNCAT@ # if @REPLACE_STRNCAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strncat # define strncat rpl_strncat # endif _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); # else _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); # endif _GL_CXXALIASWARN (strncat); #elif defined GNULIB_POSIXCHECK # undef strncat # if HAVE_RAW_DECL_STRNCAT _GL_WARN_ON_USE (strncat, "strncat is unportable - " "use gnulib module strncat for portability"); # endif #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if @REPLACE_STRNDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strndup # define strndup rpl_strndup # endif _GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); # else # if ! @HAVE_DECL_STRNDUP@ _GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); # endif _GL_CXXALIASWARN (strndup); #elif defined GNULIB_POSIXCHECK # undef strndup # if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if @REPLACE_STRNLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strnlen # define strnlen rpl_strnlen # endif _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); # else # if ! @HAVE_DECL_STRNLEN@ _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); # endif _GL_CXXALIASWARN (strnlen); #elif defined GNULIB_POSIXCHECK # undef strnlen # if HAVE_RAW_DECL_STRNLEN _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " "use gnulib module strnlen for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn /* Assume strcspn is always declared. */ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " "in multibyte locales - " "use mbscspn if you care about internationalization"); #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const char * strpbrk (const char *, const char *); } extern "C++" { char * strpbrk (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); _GL_CXXALIASWARN1 (strpbrk, char const *, (char const *__s, char const *__accept)); # else _GL_CXXALIASWARN (strpbrk); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn /* Assume strspn is always declared. */ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " "in multibyte locales - " "use mbsspn if you care about internationalization"); #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ _GL_FUNCDECL_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim)); _GL_CXXALIASWARN (strsep); # if defined GNULIB_POSIXCHECK # undef strsep _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " "in multibyte locales - " "use mbssep if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strsep # if HAVE_RAW_DECL_STRSEP _GL_WARN_ON_USE (strsep, "strsep is unportable - " "use gnulib module strsep for portability"); # endif #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strstr rpl_strstr # endif _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); # else /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strstr (const char *, const char *); } extern "C++" { char * strstr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strstr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strstr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strstr); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr /* Assume strstr is always declared. */ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " "work correctly on character strings in most " "multibyte locales - " "use mbsstr if you care about internationalization, " "or use strstr if you care about speed"); #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strcasestr rpl_strcasestr # endif _GL_FUNCDECL_RPL (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strcasestr, char *, (const char *haystack, const char *needle)); # else # if ! @HAVE_STRCASESTR@ _GL_FUNCDECL_SYS (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strcasestr (const char *, const char *); } extern "C++" { char * strcasestr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strcasestr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strcasestr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # if HAVE_RAW_DECL_STRCASESTR _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " "strings in multibyte locales - " "use mbscasestr if you care about " "internationalization, or use c-strcasestr if you want " "a locale independent function"); # endif #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if @REPLACE_STRTOK_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strtok_r # define strtok_r rpl_strtok_r # endif _GL_FUNCDECL_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # else # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK # undef strtok_r # endif # if ! @HAVE_DECL_STRTOK_R@ _GL_FUNCDECL_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # endif _GL_CXXALIASWARN (strtok_r); # if defined GNULIB_POSIXCHECK _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " "strings in multibyte locales - " "use mbstok_r if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # if HAVE_RAW_DECL_STRTOK_R _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " "use gnulib module strtok_r for portability"); # endif #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ # undef mbslen # endif # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbslen rpl_mbslen # endif _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); # else _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif _GL_CXXALIASWARN (mbslen); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbschr); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbsrchr); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings 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. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case. If the two match, return a pointer to the first byte after this prefix in STRING. Otherwise, return NULL. Note: This function may, in multibyte locales, return non-NULL if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); # else _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); # endif _GL_CXXALIASWARN (mbspbrk); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ _GL_EXTERN_C char * mbssep (char **stringp, const char *delim) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) _GL_ARG_NONNULL ((2, 3)); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror # define strerror rpl_strerror # endif _GL_FUNCDECL_RPL (strerror, char *, (int)); _GL_CXXALIAS_RPL (strerror, char *, (int)); # else _GL_CXXALIAS_SYS (strerror, char *, (int)); # endif _GL_CXXALIASWARN (strerror); #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif /* Map any int, typically from errno, into an error message. Multithread-safe. Uses the POSIX declaration, not the glibc declaration. */ #if @GNULIB_STRERROR_R@ # if @REPLACE_STRERROR_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror_r # define strerror_r rpl_strerror_r # endif _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); # else # if !@HAVE_DECL_STRERROR_R@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif # if @HAVE_DECL_STRERROR_R@ _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK # undef strerror_r # if HAVE_RAW_DECL_STRERROR_R _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " "use gnulib module strerror_r-posix for portability"); # endif #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strsignal rpl_strsignal # endif _GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); _GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); # else # if ! @HAVE_DECL_STRSIGNAL@ _GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is 'const char *'. */ _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); # endif _GL_CXXALIASWARN (strsignal); #elif defined GNULIB_POSIXCHECK # undef strsignal # if HAVE_RAW_DECL_STRSIGNAL _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " "use gnulib module strsignal for portability"); # endif #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); _GL_CXXALIASWARN (strverscmp); #elif defined GNULIB_POSIXCHECK # undef strverscmp # if HAVE_RAW_DECL_STRVERSCMP _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " "use gnulib module strverscmp for portability"); # endif #endif #endif /* _GL_STRING_H */ #endif /* _GL_STRING_H */ dico-2.2/gnu/strtoimax.c000066400000000000000000000041561172612674100152770ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert string representation of a number into an intmax_t value. Copyright (C) 1999, 2001-2004, 2006, 2009-2011 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 3 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, see . */ /* Written by Paul Eggert. */ #include /* Verify interface. */ #include #include #include "verify.h" #ifdef UNSIGNED # ifndef HAVE_DECL_STRTOULL "this configure-time declaration test was not run" # endif # if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG_INT unsigned long long int strtoull (char const *, char **, int); # endif #else # ifndef HAVE_DECL_STRTOLL "this configure-time declaration test was not run" # endif # if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG_INT long long int strtoll (char const *, char **, int); # endif #endif #ifdef UNSIGNED # define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT # define Int uintmax_t # define Unsigned unsigned # define strtoimax strtoumax # define strtol strtoul # define strtoll strtoull #else # define Have_long_long HAVE_LONG_LONG_INT # define Int intmax_t # define Unsigned #endif Int strtoimax (char const *ptr, char **endptr, int base) { #if Have_long_long verify (sizeof (Int) == sizeof (Unsigned long int) || sizeof (Int) == sizeof (Unsigned long long int)); if (sizeof (Int) != sizeof (Unsigned long int)) return strtoll (ptr, endptr, base); #else verify (sizeof (Int) == sizeof (Unsigned long int)); #endif return strtol (ptr, endptr, base); } dico-2.2/gnu/strtol.c000066400000000000000000000260201172612674100145660ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert string representation of a number into an integer value. Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2011 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@gnu.org. 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 3 of the License, or 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, see . */ #ifdef _LIBC # define USE_NUMBER_GROUPING #else # include #endif #include #include #ifndef __set_errno # define __set_errno(Val) errno = (Val) #endif #include #include #include #include #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 # define STRTOL_LONG_MIN LLONG_MIN # define STRTOL_LONG_MAX LLONG_MAX # define STRTOL_ULONG_MAX ULLONG_MAX /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ /* True if negative values of the signed integer type T use two's complement, ones' complement, or signed magnitude representation, respectively. Much GNU code assumes two's complement, but some people like to be portable to all possible C hosts. */ # define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) # define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) /* True if the arithmetic type T is signed. */ # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* The maximum and minimum values for the integer type T. These macros have undefined behavior if T is signed and has padding bits. If this is a problem for you, please let us know how to fix it for your host. */ # define TYPE_MINIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) 0 \ : TYPE_SIGNED_MAGNITUDE (t) \ ? ~ (t) 0 \ : ~ TYPE_MAXIMUM (t))) # define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) # ifndef ULLONG_MAX # define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) # endif # ifndef LLONG_MAX # define LLONG_MAX TYPE_MAXIMUM (long long int) # endif # ifndef LLONG_MIN # define LLONG_MIN TYPE_MINIMUM (long long int) # endif # if __GNUC__ == 2 && __GNUC_MINOR__ < 7 /* Work around gcc bug with using this constant. */ static const unsigned long long int maxquad = ULLONG_MAX; # undef STRTOL_ULONG_MAX # define STRTOL_ULONG_MAX maxquad # endif #else # define LONG long # define STRTOL_LONG_MIN LONG_MIN # define STRTOL_LONG_MAX LONG_MAX # define STRTOL_ULONG_MAX ULONG_MAX #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_PROTO , __locale_t loc #else # define LOCALE_PARAM # define LOCALE_PARAM_PROTO #endif #include #ifdef USE_WIDE_CHAR # include # 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 # 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) isspace (Ch) # define ISALPHA(Ch) isalpha (Ch) # define TOUPPER(Ch) toupper (Ch) # endif #endif #define INTERNAL(X) INTERNAL1(X) #define INTERNAL1(X) __##X##_internal #define WEAKNAME(X) WEAKNAME1(X) #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) (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base, int group LOCALE_PARAM_PROTO) { 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 . */ 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 ((base == 0 || base == 16) && 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 = STRTOL_ULONG_MAX / (unsigned LONG int) base; cutlim = STRTOL_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) (STRTOL_LONG_MIN + 1)) + 1 : (unsigned LONG int) STRTOL_LONG_MAX)) overflow = 1; #endif if (overflow) { __set_errno (ERANGE); #if UNSIGNED return STRTOL_ULONG_MAX; #else return negative ? STRTOL_LONG_MIN : STRTOL_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. */ INT #ifdef weak_function weak_function #endif strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base LOCALE_PARAM_PROTO) { return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); } dico-2.2/gnu/strtoll.c000066400000000000000000000022421172612674100147420ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Function to parse a `long long int' from text. Copyright (C) 1995-1997, 1999, 2001, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #define QUAD 1 #include #ifdef _LIBC # ifdef SHARED # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0); # endif # endif weak_alias (strtoll, strtoq) #endif dico-2.2/gnu/strtoul.c000066400000000000000000000016021172612674100147520ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Copyright (C) 1991, 1997, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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, see . */ #define UNSIGNED 1 #include "strtol.c" dico-2.2/gnu/strtoull.c000066400000000000000000000021501172612674100151250ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Function to parse an `unsigned long long int' from text. Copyright (C) 1995-1997, 1999, 2009-2011 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@gnu.org. 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 3 of the License, or 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, see . */ #define QUAD 1 #include "strtoul.c" #ifdef _LIBC strong_alias (__strtoull_internal, __strtouq_internal) weak_alias (strtoull, strtouq) #endif dico-2.2/gnu/strtoumax.c000066400000000000000000000002041172612674100153010ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define UNSIGNED 1 #include "strtoimax.c" dico-2.2/gnu/sys_socket.in.h000066400000000000000000000531751172612674100160520ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. Copyright (C) 2005-2011 Free Software Foundation, Inc. Written by Simon Josefsson. 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file is supposed to be used on platforms that lack , on platforms where cannot be included standalone, and on platforms where does not provide all necessary definitions. It is intended to provide definitions and prototypes needed by an application. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H /* Special invocation convention: - On Cygwin 1.5.x we have a sequence of nested includes -> -> -> , and the latter includes . In this situation, the functions are not yet declared, therefore we cannot provide the C++ aliases. */ #@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ #else /* Normal invocation convention. */ #ifndef _GL_SYS_SOCKET_H #if @HAVE_SYS_SOCKET_H@ # define _GL_ALREADY_INCLUDING_SYS_SOCKET_H /* On many platforms, assumes prior inclusion of . */ # include /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ # undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H #endif #ifndef _GL_SYS_SOCKET_H #define _GL_SYS_SOCKET_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #if !@HAVE_SA_FAMILY_T@ # if !GNULIB_defined_sa_family_t typedef unsigned short sa_family_t; # define GNULIB_defined_sa_family_t 1 # endif #endif #if @HAVE_STRUCT_SOCKADDR_STORAGE@ /* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */ # if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ # ifndef ss_family # define ss_family __ss_family # endif # endif #else # include /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ # define __ss_aligntype unsigned long int # define _SS_SIZE 256 # define _SS_PADSIZE \ (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ ? sizeof (sa_family_t) \ : alignof (__ss_aligntype)) \ + sizeof (__ss_aligntype))) # if !GNULIB_defined_struct_sockaddr_storage struct sockaddr_storage { sa_family_t ss_family; /* Address family, etc. */ __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; # define GNULIB_defined_struct_sockaddr_storage 1 # endif #endif #if @HAVE_SYS_SOCKET_H@ /* A platform that has . */ /* For shutdown(). */ # if !defined SHUT_RD # define SHUT_RD 0 # endif # if !defined SHUT_WR # define SHUT_WR 1 # endif # if !defined SHUT_RDWR # define SHUT_RDWR 2 # endif #else # ifdef __CYGWIN__ # error "Cygwin does have a sys/socket.h, doesn't it?!?" # endif /* A platform that lacks . Currently only MinGW is supported. See the gnulib manual regarding Windows sockets. MinGW has the header files winsock2.h and ws2tcpip.h that declare the sys/socket.h definitions we need. Note that you can influence which definitions you get by setting the WINVER symbol before including these two files. For example, getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that symbol is set indiriectly through WINVER). You can set this by adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your code may not run on older Windows releases then. My Windows 2000 box was not able to run the code, for example. The situation is slightly confusing because suggests that getaddrinfo should be available on all Windows releases. */ # if @HAVE_WINSOCK2_H@ # include # endif # if @HAVE_WS2TCPIP_H@ # include # endif /* For shutdown(). */ # if !defined SHUT_RD && defined SD_RECEIVE # define SHUT_RD SD_RECEIVE # endif # if !defined SHUT_WR && defined SD_SEND # define SHUT_WR SD_SEND # endif # if !defined SHUT_RDWR && defined SD_BOTH # define SHUT_RDWR SD_BOTH # endif # if @HAVE_WINSOCK2_H@ /* Include headers needed by the emulation code. */ # include # include # if !GNULIB_defined_socklen_t typedef int socklen_t; # define GNULIB_defined_socklen_t 1 # endif # endif #endif #if @HAVE_WINSOCK2_H@ # if !GNULIB_defined_rpl_fd_isset /* Re-define FD_ISSET to avoid a WSA call while we are not using network sockets. */ static inline int rpl_fd_isset (SOCKET fd, fd_set * set) { u_int i; if (set == NULL) return 0; for (i = 0; i < set->fd_count; i++) if (set->fd_array[i] == fd) return 1; return 0; } # define GNULIB_defined_rpl_fd_isset 1 # endif # undef FD_ISSET # define FD_ISSET(fd, set) rpl_fd_isset(fd, set) #endif /* Wrap everything else to use libc file descriptors for sockets. */ #if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h # else _GL_WARN_ON_USE (close, "close() used without including "); # endif #endif #if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname gethostname_used_without_including_unistd_h # else _GL_WARN_ON_USE (gethostname, "gethostname() used without including "); # endif #endif #if @GNULIB_SOCKET@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket rpl_socket # endif _GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol)); _GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol)); # else _GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); # endif _GL_CXXALIASWARN (socket); #elif @HAVE_WINSOCK2_H@ # undef socket # define socket socket_used_without_requesting_gnulib_module_socket #elif defined GNULIB_POSIXCHECK # undef socket # if HAVE_RAW_DECL_SOCKET _GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " "use gnulib module socket for portability"); # endif #endif #if @GNULIB_CONNECT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef connect # define connect rpl_connect # endif _GL_FUNCDECL_RPL (connect, int, (int fd, const struct sockaddr *addr, socklen_t addrlen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (connect, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # else /* Need to cast, because on NonStop Kernel, the third parameter is size_t addrlen. */ _GL_CXXALIAS_SYS_CAST (connect, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # endif _GL_CXXALIASWARN (connect); #elif @HAVE_WINSOCK2_H@ # undef connect # define connect socket_used_without_requesting_gnulib_module_connect #elif defined GNULIB_POSIXCHECK # undef connect # if HAVE_RAW_DECL_CONNECT _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " "use gnulib module connect for portability"); # endif #endif #if @GNULIB_ACCEPT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef accept # define accept rpl_accept # endif _GL_FUNCDECL_RPL (accept, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); _GL_CXXALIAS_RPL (accept, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # else /* Need to cast, because on Solaris 10 systems, the third parameter is void *addrlen. */ _GL_CXXALIAS_SYS_CAST (accept, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # endif _GL_CXXALIASWARN (accept); #elif @HAVE_WINSOCK2_H@ # undef accept # define accept accept_used_without_requesting_gnulib_module_accept #elif defined GNULIB_POSIXCHECK # undef accept # if HAVE_RAW_DECL_ACCEPT _GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " "use gnulib module accept for portability"); # endif #endif #if @GNULIB_BIND@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef bind # define bind rpl_bind # endif _GL_FUNCDECL_RPL (bind, int, (int fd, const struct sockaddr *addr, socklen_t addrlen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (bind, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # else /* Need to cast, because on NonStop Kernel, the third parameter is size_t addrlen. */ _GL_CXXALIAS_SYS_CAST (bind, int, (int fd, const struct sockaddr *addr, socklen_t addrlen)); # endif _GL_CXXALIASWARN (bind); #elif @HAVE_WINSOCK2_H@ # undef bind # define bind bind_used_without_requesting_gnulib_module_bind #elif defined GNULIB_POSIXCHECK # undef bind # if HAVE_RAW_DECL_BIND _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " "use gnulib module bind for portability"); # endif #endif #if @GNULIB_GETPEERNAME@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpeername # define getpeername rpl_getpeername # endif _GL_FUNCDECL_RPL (getpeername, int, (int fd, struct sockaddr *addr, socklen_t *addrlen) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (getpeername, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # else /* Need to cast, because on Solaris 10 systems, the third parameter is void *addrlen. */ _GL_CXXALIAS_SYS_CAST (getpeername, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # endif _GL_CXXALIASWARN (getpeername); #elif @HAVE_WINSOCK2_H@ # undef getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername #elif defined GNULIB_POSIXCHECK # undef getpeername # if HAVE_RAW_DECL_GETPEERNAME _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " "use gnulib module getpeername for portability"); # endif #endif #if @GNULIB_GETSOCKNAME@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getsockname # define getsockname rpl_getsockname # endif _GL_FUNCDECL_RPL (getsockname, int, (int fd, struct sockaddr *addr, socklen_t *addrlen) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (getsockname, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # else /* Need to cast, because on Solaris 10 systems, the third parameter is void *addrlen. */ _GL_CXXALIAS_SYS_CAST (getsockname, int, (int fd, struct sockaddr *addr, socklen_t *addrlen)); # endif _GL_CXXALIASWARN (getsockname); #elif @HAVE_WINSOCK2_H@ # undef getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname #elif defined GNULIB_POSIXCHECK # undef getsockname # if HAVE_RAW_DECL_GETSOCKNAME _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " "use gnulib module getsockname for portability"); # endif #endif #if @GNULIB_GETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getsockopt # define getsockopt rpl_getsockopt # endif _GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname, void *optval, socklen_t *optlen) _GL_ARG_NONNULL ((4, 5))); _GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname, void *optval, socklen_t *optlen)); # else /* Need to cast, because on Solaris 10 systems, the fifth parameter is void *optlen. */ _GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname, void *optval, socklen_t *optlen)); # endif _GL_CXXALIASWARN (getsockopt); #elif @HAVE_WINSOCK2_H@ # undef getsockopt # define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt #elif defined GNULIB_POSIXCHECK # undef getsockopt # if HAVE_RAW_DECL_GETSOCKOPT _GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " "use gnulib module getsockopt for portability"); # endif #endif #if @GNULIB_LISTEN@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef listen # define listen rpl_listen # endif _GL_FUNCDECL_RPL (listen, int, (int fd, int backlog)); _GL_CXXALIAS_RPL (listen, int, (int fd, int backlog)); # else _GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); # endif _GL_CXXALIASWARN (listen); #elif @HAVE_WINSOCK2_H@ # undef listen # define listen listen_used_without_requesting_gnulib_module_listen #elif defined GNULIB_POSIXCHECK # undef listen # if HAVE_RAW_DECL_LISTEN _GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " "use gnulib module listen for portability"); # endif #endif #if @GNULIB_RECV@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef recv # define recv rpl_recv # endif _GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); # else _GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); # endif _GL_CXXALIASWARN (recv); #elif @HAVE_WINSOCK2_H@ # undef recv # define recv recv_used_without_requesting_gnulib_module_recv #elif defined GNULIB_POSIXCHECK # undef recv # if HAVE_RAW_DECL_RECV _GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " "use gnulib module recv for portability"); # endif #endif #if @GNULIB_SEND@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef send # define send rpl_send # endif _GL_FUNCDECL_RPL (send, ssize_t, (int fd, const void *buf, size_t len, int flags) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (send, ssize_t, (int fd, const void *buf, size_t len, int flags)); # else _GL_CXXALIAS_SYS (send, ssize_t, (int fd, const void *buf, size_t len, int flags)); # endif _GL_CXXALIASWARN (send); #elif @HAVE_WINSOCK2_H@ # undef send # define send send_used_without_requesting_gnulib_module_send #elif defined GNULIB_POSIXCHECK # undef send # if HAVE_RAW_DECL_SEND _GL_WARN_ON_USE (send, "send is not always POSIX compliant - " "use gnulib module send for portability"); # endif #endif #if @GNULIB_RECVFROM@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef recvfrom # define recvfrom rpl_recvfrom # endif _GL_FUNCDECL_RPL (recvfrom, ssize_t, (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (recvfrom, ssize_t, (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)); # else /* Need to cast, because on Solaris 10 systems, the sixth parameter is void *fromlen. */ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)); # endif _GL_CXXALIASWARN (recvfrom); #elif @HAVE_WINSOCK2_H@ # undef recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom #elif defined GNULIB_POSIXCHECK # undef recvfrom # if HAVE_RAW_DECL_RECVFROM _GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " "use gnulib module recvfrom for portability"); # endif #endif #if @GNULIB_SENDTO@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sendto # define sendto rpl_sendto # endif _GL_FUNCDECL_RPL (sendto, ssize_t, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (sendto, ssize_t, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)); # else /* Need to cast, because on NonStop Kernel, the sixth parameter is size_t tolen. */ _GL_CXXALIAS_SYS_CAST (sendto, ssize_t, (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)); # endif _GL_CXXALIASWARN (sendto); #elif @HAVE_WINSOCK2_H@ # undef sendto # define sendto sendto_used_without_requesting_gnulib_module_sendto #elif defined GNULIB_POSIXCHECK # undef sendto # if HAVE_RAW_DECL_SENDTO _GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " "use gnulib module sendto for portability"); # endif #endif #if @GNULIB_SETSOCKOPT@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setsockopt # define setsockopt rpl_setsockopt # endif _GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname, const void * optval, socklen_t optlen) _GL_ARG_NONNULL ((4))); _GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname, const void * optval, socklen_t optlen)); # else /* Need to cast, because on NonStop Kernel, the fifth parameter is size_t optlen. */ _GL_CXXALIAS_SYS_CAST (setsockopt, int, (int fd, int level, int optname, const void * optval, socklen_t optlen)); # endif _GL_CXXALIASWARN (setsockopt); #elif @HAVE_WINSOCK2_H@ # undef setsockopt # define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt #elif defined GNULIB_POSIXCHECK # undef setsockopt # if HAVE_RAW_DECL_SETSOCKOPT _GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " "use gnulib module setsockopt for portability"); # endif #endif #if @GNULIB_SHUTDOWN@ # if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef shutdown # define shutdown rpl_shutdown # endif _GL_FUNCDECL_RPL (shutdown, int, (int fd, int how)); _GL_CXXALIAS_RPL (shutdown, int, (int fd, int how)); # else _GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); # endif _GL_CXXALIASWARN (shutdown); #elif @HAVE_WINSOCK2_H@ # undef shutdown # define shutdown shutdown_used_without_requesting_gnulib_module_shutdown #elif defined GNULIB_POSIXCHECK # undef shutdown # if HAVE_RAW_DECL_SHUTDOWN _GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " "use gnulib module shutdown for portability"); # endif #endif #if @HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including "); # endif #endif #if @GNULIB_ACCEPT4@ /* Accept a connection on a socket, with specific opening flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). See also the Linux man page at . */ # if @HAVE_ACCEPT4@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define accept4 rpl_accept4 # endif _GL_FUNCDECL_RPL (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); _GL_CXXALIAS_RPL (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); # else _GL_FUNCDECL_SYS (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); _GL_CXXALIAS_SYS (accept4, int, (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags)); # endif _GL_CXXALIASWARN (accept4); #elif defined GNULIB_POSIXCHECK # undef accept4 # if HAVE_RAW_DECL_ACCEPT4 _GL_WARN_ON_USE (accept4, "accept4 is unportable - " "use gnulib module accept4 for portability"); # endif #endif #endif /* _GL_SYS_SOCKET_H */ #endif /* _GL_SYS_SOCKET_H */ #endif dico-2.2/gnu/sys_time.in.h000066400000000000000000000055371172612674100155170ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/time.h. Copyright (C) 2007-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined _GL_SYS_TIME_H /* Simply delegate to the system's header, without adding anything. */ # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # endif #else # define _GL_SYS_TIME_H # if @HAVE_SYS_TIME_H@ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ # else # include # endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ # ifdef __cplusplus extern "C" { # endif # if ! @HAVE_STRUCT_TIMEVAL@ # if !GNULIB_defined_struct_timeval struct timeval { time_t tv_sec; long int tv_usec; }; # define GNULIB_defined_struct_timeval 1 # endif # endif # ifdef __cplusplus } # endif # if @GNULIB_GETTIMEOFDAY@ # if @REPLACE_GETTIMEOFDAY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gettimeofday # define gettimeofday rpl_gettimeofday # endif _GL_FUNCDECL_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gettimeofday, int, (struct timeval *restrict, void *restrict)); # else # if !@HAVE_GETTIMEOFDAY@ _GL_FUNCDECL_SYS (gettimeofday, int, (struct timeval *restrict, void *restrict) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on glibc systems, by default, the second argument is struct timezone *. */ _GL_CXXALIAS_SYS_CAST (gettimeofday, int, (struct timeval *restrict, void *restrict)); # endif _GL_CXXALIASWARN (gettimeofday); # elif defined GNULIB_POSIXCHECK # undef gettimeofday # if HAVE_RAW_DECL_GETTIMEOFDAY _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " "use gnulib module gettimeofday for portability"); # endif # endif #endif /* _GL_SYS_TIME_H */ dico-2.2/gnu/sysexits.in.h000066400000000000000000000037251172612674100155530ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* exit() exit codes for some BSD system programs. Copyright (C) 2003, 2006-2011 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 3 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, see . */ /* Written by Simon Josefsson based on sysexits(3) man page */ #ifndef _GL_SYSEXITS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if @HAVE_SYSEXITS_H@ /* IRIX 6.5 has an that defines a macro EX_OK with a nonzero value. Override it. See */ # ifdef __sgi # include # undef EX_OK # endif /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYSEXITS_H@ /* HP-UX 11 ends at EX_NOPERM. */ # ifndef EX_CONFIG # define EX_CONFIG 78 # endif #endif #ifndef _GL_SYSEXITS_H #define _GL_SYSEXITS_H #if !@HAVE_SYSEXITS_H@ # define EX_OK 0 /* same value as EXIT_SUCCESS */ # define EX_USAGE 64 # define EX_DATAERR 65 # define EX_NOINPUT 66 # define EX_NOUSER 67 # define EX_NOHOST 68 # define EX_UNAVAILABLE 69 # define EX_SOFTWARE 70 # define EX_OSERR 71 # define EX_OSFILE 72 # define EX_CANTCREAT 73 # define EX_IOERR 74 # define EX_TEMPFAIL 75 # define EX_PROTOCOL 76 # define EX_NOPERM 77 # define EX_CONFIG 78 #endif #endif /* _GL_SYSEXITS_H */ #endif /* _GL_SYSEXITS_H */ dico-2.2/gnu/time.in.h000066400000000000000000000217271172612674100146200ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A more-standard . Copyright (C) 2007-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _GL_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _GL_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the pthreads-win32 library defines it in . */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include /* The pthreads-win32 also defines a couple of broken macros. */ # undef asctime_r # undef ctime_r # undef gmtime_r # undef localtime_r # undef rand_r # undef strtok_r # else # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_struct_timespec # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # define GNULIB_defined_struct_timespec 1 # endif # ifdef __cplusplus } # endif # endif # endif # if !GNULIB_defined_struct_time_t_must_be_integral /* Per http://austingroupbugs.net/view.php?id=327, POSIX requires time_t to be an integer type, even though C99 permits floating point. We don't know of any implementation that uses floating point, and it is much easier to write code that doesn't have to worry about that corner case, so we force the issue. */ struct __time_t_must_be_integral { unsigned int __floating_time_t_unsupported : (time_t) 1; }; # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if @GNULIB_NANOSLEEP@ # if @REPLACE_NANOSLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif _GL_FUNCDECL_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # else # if ! @HAVE_NANOSLEEP@ _GL_FUNCDECL_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif _GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); # else _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # endif _GL_CXXALIASWARN (mktime); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if @GNULIB_TIME_R@ # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r # endif _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (localtime_r); # endif # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r # endif _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (gmtime_r); # endif # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @GNULIB_STRPTIME@ # if ! @HAVE_STRPTIME@ _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm # endif _GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); # else # if ! @HAVE_TIMEGM@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif _GL_CXXALIASWARN (timegm); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef asctime_r _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif #endif dico-2.2/gnu/time_r.c000066400000000000000000000025361172612674100145240ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Reentrant time functions like localtime_r. Copyright (C) 2003, 2006-2007, 2010-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ #include #include static struct tm * copy_tm_result (struct tm *dest, struct tm const *src) { if (! src) return 0; *dest = *src; return dest; } struct tm * gmtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, gmtime (t)); } struct tm * localtime_r (time_t const * restrict t, struct tm * restrict tp) { return copy_tm_result (tp, localtime (t)); } dico-2.2/gnu/uinttostr.c000066400000000000000000000002501172612674100153070ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define anytostr uinttostr #define inttype unsigned int #include "anytostr.c" dico-2.2/gnu/umaxtostr.c000066400000000000000000000002451172612674100153060ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ #define anytostr umaxtostr #define inttype uintmax_t #include "anytostr.c" dico-2.2/gnu/unistd.in.h000066400000000000000000001335201172612674100151630ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . Copyright (C) 2003-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Special invocation convention: - On mingw, several headers, including , include , but we need to ensure that both the system and are completely included before we replace gethostname. */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H /* is being indirectly included for the first time from ; avoid declaring any overrides. */ # if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ # else # error unexpected; report this to bug-gnulib@gnu.org # endif # define _GL_WINSOCK2_H_WITNESS /* Normal invocation. */ #elif !defined _GL_UNISTD_H /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ #endif /* Get all possible declarations of gethostname(). */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include # undef _GL_INCLUDING_WINSOCK2_H #endif #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _GL_UNISTD_H /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ #include /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include #endif /* Cygwin 1.7.1 declares unlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ && ! defined __GLIBC__ # include #endif /* mingw fails to declare _exit in . */ /* mingw, BeOS, Haiku declare environ in , not in . */ /* Solaris declares getcwd not only in but also in . */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include #endif /* mingw declares getcwd in , not in . */ #if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . NonStop Kernel declares gethostname in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ && !defined __GLIBC__ # include #endif #if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include #endif /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ #if @GNULIB_GETHOSTNAME@ /* Get all possible declarations of gethostname(). */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !defined _GL_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including "); _GL_WARN_ON_USE (connect, "connect() used without including "); _GL_WARN_ON_USE (accept, "accept() used without including "); _GL_WARN_ON_USE (bind, "bind() used without including "); _GL_WARN_ON_USE (getpeername, "getpeername() used without including "); _GL_WARN_ON_USE (getsockname, "getsockname() used without including "); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including "); _GL_WARN_ON_USE (listen, "listen() used without including "); _GL_WARN_ON_USE (recv, "recv() used without including "); _GL_WARN_ON_USE (send, "send() used without including "); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including "); _GL_WARN_ON_USE (sendto, "sendto() used without including "); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including "); _GL_WARN_ON_USE (shutdown, "shutdown() used without including "); # endif # endif # if !defined _GL_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including "); # endif # endif # endif #endif /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Ensure *_OK macros exist. */ #ifndef F_OK # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 #endif /* Declare overridden functions. */ #if defined GNULIB_POSIXCHECK /* The access() function is a security risk. */ _GL_WARN_ON_USE (access, "the access function is a security risk - " "use the gnulib module faccessat instead"); #endif #if @GNULIB_CHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_CHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef chown # define chown rpl_chown # endif _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); # else # if !@HAVE_CHOWN@ _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); # endif _GL_CXXALIASWARN (chown); #elif defined GNULIB_POSIXCHECK # undef chown # if HAVE_RAW_DECL_CHOWN _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " "doesn't treat a uid or gid of -1 on some systems - " "use gnulib module chown for portability"); # endif #endif #if @GNULIB_CLOSE@ # if @REPLACE_CLOSE@ /* Automatically included by modules that need a replacement for close. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close rpl_close # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif _GL_CXXALIASWARN (close); #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK # undef close /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); #endif #if @REPLACE_DUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup rpl_dup # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); #else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); #endif _GL_CXXALIASWARN (dup); #if @GNULIB_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); # else # if !@HAVE_DUP2@ _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIASWARN (dup2); #elif defined GNULIB_POSIXCHECK # undef dup2 # if HAVE_RAW_DECL_DUP2 _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif #endif #if @GNULIB_DUP3@ /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the specified flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif _GL_CXXALIASWARN (dup3); #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 _GL_WARN_ON_USE (dup3, "dup3 is unportable - " "use gnulib module dup3 for portability"); # endif #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include # define environ (*_NSGetEnviron ()) # else # ifdef __cplusplus extern "C" { # endif extern char **environ; # ifdef __cplusplus } # endif # endif # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON static inline char *** rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is unportable - " "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif #endif #if @GNULIB_EUIDACCESS@ /* Like access(), except that it uses the effective user id and group id of the current process. */ # if !@HAVE_EUIDACCESS@ _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); _GL_CXXALIASWARN (euidaccess); # if defined GNULIB_POSIXCHECK /* Like access(), this function is a security risk. */ _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " "use the gnulib module faccessat instead"); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # if HAVE_RAW_DECL_EUIDACCESS _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " "use gnulib module euidaccess for portability"); # endif #endif #if @GNULIB_FACCESSAT@ # if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " "use gnulib module faccessat for portability"); # endif #endif #if @GNULIB_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); # else # if !@HAVE_DECL_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); # endif # endif _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); _GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " "use gnulib module fchdir for portability"); # endif #endif #if @GNULIB_FCHOWNAT@ # if @REPLACE_FCHOWNAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fchownat # define fchownat rpl_fchownat # endif _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # else # if !@HAVE_FCHOWNAT@ _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # endif _GL_CXXALIASWARN (fchownat); #elif defined GNULIB_POSIXCHECK # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FSYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fsync, int, (int fd)); _GL_CXXALIASWARN (fsync); #elif defined GNULIB_POSIXCHECK # undef fsync # if HAVE_RAW_DECL_FSYNC _GL_WARN_ON_USE (fsync, "fsync is unportable - " "use gnulib module fsync for portability"); # endif #endif #if @GNULIB_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if !@HAVE_FTRUNCATE@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); _GL_CXXALIASWARN (ftruncate); #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " "use gnulib module ftruncate for portability"); # endif #endif #if @GNULIB_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2001 specification . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # if @REPLACE_GETCWD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); # endif _GL_CXXALIASWARN (getcwd); #elif defined GNULIB_POSIXCHECK # undef getcwd # if HAVE_RAW_DECL_GETCWD _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @REPLACE_GETDOMAINNAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdomainname # define getdomainname rpl_getdomainname # endif _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); # else # if !@HAVE_DECL_GETDOMAINNAME@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (getdomainname); #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " "use gnulib module getdomainname for portability"); # endif #endif #if @GNULIB_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ # if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); # endif _GL_CXXALIAS_SYS (getdtablesize, int, (void)); _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK # undef getdtablesize # if HAVE_RAW_DECL_GETDTABLESIZE _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " "use gnulib module getdtablesize for portability"); # endif #endif #if @GNULIB_GETGROUPS@ /* Return the supplemental groups that the current process belongs to. It is unspecified whether the effective group id is in the list. If N is 0, return the group count; otherwise, N describes how many entries are available in GROUPS. Return -1 and set errno if N is not 0 and not large enough. Fails with ENOSYS on some systems. */ # if @REPLACE_GETGROUPS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getgroups # define getgroups rpl_getgroups # endif _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); # else # if !@HAVE_GETGROUPS@ _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIASWARN (getgroups); #elif defined GNULIB_POSIXCHECK # undef getgroups # if HAVE_RAW_DECL_GETGROUPS _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " "use gnulib module getgroups for portability"); # endif #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname rpl_gethostname # endif _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); # else # if !@HAVE_GETHOSTNAME@ _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second parameter is int len. */ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (gethostname); #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " "use gnulib module gethostname for portability"); # endif #endif #if @GNULIB_GETLOGIN@ /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_GETLOGIN@ _GL_FUNCDECL_SYS (getlogin, char *, (void)); # endif _GL_CXXALIAS_SYS (getlogin, char *, (void)); _GL_CXXALIASWARN (getlogin); #elif defined GNULIB_POSIXCHECK # undef getlogin # if HAVE_RAW_DECL_GETLOGIN _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " "use gnulib module getlogin for portability"); # endif #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See . Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if @REPLACE_GETLOGIN_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getlogin_r rpl_getlogin_r # endif _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); # else # if !@HAVE_DECL_GETLOGIN_R@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 systems, the second argument is int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif _GL_CXXALIASWARN (getlogin_r); #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " "use gnulib module getlogin_r for portability"); # endif #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize rpl_getpagesize # endif _GL_FUNCDECL_RPL (getpagesize, int, (void)); _GL_CXXALIAS_RPL (getpagesize, int, (void)); # else # if !@HAVE_GETPAGESIZE@ # if !defined getpagesize /* This is for POSIX systems. */ # if !defined _gl_getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define _gl_getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined _gl_getpagesize && defined __VMS # ifdef __ALPHA # define _gl_getpagesize() 8192 # else # define _gl_getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined _gl_getpagesize && @HAVE_OS_H@ # include # if defined B_PAGE_SIZE # define _gl_getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined _gl_getpagesize && defined __amigaos4__ # define _gl_getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ # include # ifdef EXEC_PAGESIZE # define _gl_getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define _gl_getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define _gl_getpagesize() NBPC # endif # endif # endif # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize() _gl_getpagesize () # else # if !GNULIB_defined_getpagesize_function static inline int getpagesize () { return _gl_getpagesize (); } # define GNULIB_defined_getpagesize_function 1 # endif # endif # endif # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); # endif # if @HAVE_DECL_GETPAGESIZE@ _GL_CXXALIASWARN (getpagesize); # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " "use gnulib module getpagesize for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (getusershell, char *, (void)); # endif _GL_CXXALIAS_SYS (getusershell, char *, (void)); _GL_CXXALIASWARN (getusershell); #elif defined GNULIB_POSIXCHECK # undef getusershell # if HAVE_RAW_DECL_GETUSERSHELL _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Rewind to pointer that is advanced at each getusershell() call. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (setusershell, void, (void)); # endif _GL_CXXALIAS_SYS (setusershell, void, (void)); _GL_CXXALIASWARN (setusershell); #elif defined GNULIB_POSIXCHECK # undef setusershell # if HAVE_RAW_DECL_SETUSERSHELL _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Free the pointer that is advanced at each getusershell() call and associated resources. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (endusershell, void, (void)); # endif _GL_CXXALIAS_SYS (endusershell, void, (void)); _GL_CXXALIASWARN (endusershell); #elif defined GNULIB_POSIXCHECK # undef endusershell # if HAVE_RAW_DECL_ENDUSERSHELL _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown # define lchown rpl_lchown # endif _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); # else # if !@HAVE_LCHOWN@ _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); # endif _GL_CXXALIASWARN (lchown); #elif defined GNULIB_POSIXCHECK # undef lchown # if HAVE_RAW_DECL_LCHOWN _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " "use gnulib module lchown for portability"); # endif #endif #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2001 specification . */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link # endif _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); # else # if !@HAVE_LINK@ _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); # endif _GL_CXXALIASWARN (link); #elif defined GNULIB_POSIXCHECK # undef link # if HAVE_RAW_DECL_LINK _GL_WARN_ON_USE (link, "link is unportable - " "use gnulib module link for portability"); # endif #endif #if @GNULIB_LINKAT@ /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ # if @REPLACE_LINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef linkat # define linkat rpl_linkat # endif _GL_FUNCDECL_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # else # if !@HAVE_LINKAT@ _GL_FUNCDECL_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif _GL_CXXALIASWARN (linkat); #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT _GL_WARN_ON_USE (linkat, "linkat is unportable - " "use gnulib module linkat for portability"); # endif #endif #if @GNULIB_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif _GL_CXXALIASWARN (lseek); #elif defined GNULIB_POSIXCHECK # undef lseek # if HAVE_RAW_DECL_LSEEK _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif #endif #if @GNULIB_PIPE@ /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ # if !@HAVE_PIPE@ _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); _GL_CXXALIASWARN (pipe); #elif defined GNULIB_POSIXCHECK # undef pipe # if HAVE_RAW_DECL_PIPE _GL_WARN_ON_USE (pipe, "pipe is unportable - " "use gnulib module pipe-posix for portability"); # endif #endif #if @GNULIB_PIPE2@ /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) and O_TEXT, O_BINARY (defined in "binary-io.h"). Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at . */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); # else _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif _GL_CXXALIASWARN (pipe2); #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " "use gnulib module pipe2 for portability"); # endif #endif #if @GNULIB_PREAD@ /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2001 specification . */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pread rpl_pread # endif _GL_FUNCDECL_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PREAD@ _GL_FUNCDECL_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pread); #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD _GL_WARN_ON_USE (pread, "pread is unportable - " "use gnulib module pread for portability"); # endif #endif #if @GNULIB_PWRITE@ /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the POSIX:2001 specification . */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pwrite rpl_pwrite # endif _GL_FUNCDECL_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PWRITE@ _GL_FUNCDECL_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pwrite); #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " "use gnulib module pwrite for portability"); # endif #endif #if @GNULIB_READLINK@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2001 specification . */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink # endif _GL_FUNCDECL_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # else # if !@HAVE_READLINK@ _GL_FUNCDECL_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # endif _GL_CXXALIASWARN (readlink); #elif defined GNULIB_POSIXCHECK # undef readlink # if HAVE_RAW_DECL_READLINK _GL_WARN_ON_USE (readlink, "readlink is unportable - " "use gnulib module readlink for portability"); # endif #endif #if @GNULIB_READLINKAT@ # if !@HAVE_READLINKAT@ _GL_FUNCDECL_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); _GL_CXXALIASWARN (readlinkat); #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " "use gnulib module readlinkat for portability"); # endif #endif #if @GNULIB_RMDIR@ /* Remove the directory DIR. */ # if @REPLACE_RMDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define rmdir rpl_rmdir # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif _GL_CXXALIASWARN (rmdir); #elif defined GNULIB_POSIXCHECK # undef rmdir # if HAVE_RAW_DECL_RMDIR _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif #endif #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2001 specification . */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep # define sleep rpl_sleep # endif _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); # else # if !@HAVE_SLEEP@ _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIASWARN (sleep); #elif defined GNULIB_POSIXCHECK # undef sleep # if HAVE_RAW_DECL_SLEEP _GL_WARN_ON_USE (sleep, "sleep is unportable - " "use gnulib module sleep for portability"); # endif #endif #if @GNULIB_SYMLINK@ # if @REPLACE_SYMLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlink # define symlink rpl_symlink # endif _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); # else # if !@HAVE_SYMLINK@ _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); # endif _GL_CXXALIASWARN (symlink); #elif defined GNULIB_POSIXCHECK # undef symlink # if HAVE_RAW_DECL_SYMLINK _GL_WARN_ON_USE (symlink, "symlink is not portable - " "use gnulib module symlink for portability"); # endif #endif #if @GNULIB_SYMLINKAT@ # if !@HAVE_SYMLINKAT@ _GL_FUNCDECL_SYS (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); _GL_CXXALIASWARN (symlinkat); #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ # if @REPLACE_TTYNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ttyname_r # define ttyname_r rpl_ttyname_r # endif _GL_FUNCDECL_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen)); # else # if !@HAVE_DECL_TTYNAME_R@ _GL_FUNCDECL_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif _GL_CXXALIASWARN (ttyname_r); #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " "use gnulib module ttyname_r for portability"); # endif #endif #if @GNULIB_UNLINK@ # if @REPLACE_UNLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlink # define unlink rpl_unlink # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif _GL_CXXALIASWARN (unlink); #elif defined GNULIB_POSIXCHECK # undef unlink # if HAVE_RAW_DECL_UNLINK _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif #endif #if @GNULIB_UNLINKAT@ # if @REPLACE_UNLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlinkat # define unlinkat rpl_unlinkat # endif _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); # else # if !@HAVE_UNLINKAT@ _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); # endif _GL_CXXALIASWARN (unlinkat); #elif defined GNULIB_POSIXCHECK # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_USLEEP@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification . */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep # define usleep rpl_usleep # endif _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); # else # if !@HAVE_USLEEP@ _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIASWARN (usleep); #elif defined GNULIB_POSIXCHECK # undef usleep # if HAVE_RAW_DECL_USLEEP _GL_WARN_ON_USE (usleep, "usleep is unportable - " "use gnulib module usleep for portability"); # endif #endif #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2001 specification . */ # if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write # define write rpl_write # endif _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif #endif /* _GL_UNISTD_H */ #endif /* _GL_UNISTD_H */ dico-2.2/gnu/vasnprintf.c000066400000000000000000006627141172612674100154510ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* vsprintf with automatic memory allocation. Copyright (C) 1999, 2002-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. FCHAR_T The element type of the format string. DCHAR_T The element type of the destination (result) string. FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. DIRECTIVE Structure denoting a format directive. Depends on FCHAR_T. DIRECTIVES Structure denoting the set of format directives of a format string. Depends on FCHAR_T. PRINTF_PARSE Function that parses a format string. Depends on FCHAR_T. DCHAR_CPY memcpy like function for DCHAR_T[] arrays. DCHAR_SET memset like function for DCHAR_T[] arrays. DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. SNPRINTF The system's snprintf (or similar) function. This may be either snprintf or swprintf. TCHAR_T The element type of the argument and result string of the said SNPRINTF function. This may be either char or wchar_t. The code exploits that sizeof (TCHAR_T) | sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ /* Tell glibc's to provide a prototype for snprintf(). This must come before because may include , and once has been included, it's too late. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifndef VASNPRINTF # include #endif #ifndef IN_LIBINTL # include #endif /* Specification. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "vasnwprintf.h" # else # include "vasnprintf.h" # endif #endif #include /* localeconv() */ #include /* snprintf(), sprintf() */ #include /* abort(), malloc(), realloc(), free() */ #include /* memcpy(), strlen() */ #include /* errno */ #include /* CHAR_BIT */ #include /* DBL_MAX_EXP, LDBL_MAX_EXP */ #if HAVE_NL_LANGINFO # include #endif #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # include "wprintf-parse.h" # else # include "printf-parse.h" # endif #endif /* Checked size_t computations. */ #include "xsize.h" #include "verify.h" #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "float+.h" #endif #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "fpucw.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include # include "isnand-nolibm.h" # include "printf-frexp.h" #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL # include # include "isnanl-nolibm.h" # include "printf-frexpl.h" # include "fpucw.h" #endif /* Default parameters. */ #ifndef VASNPRINTF # if WIDE_CHAR_VERSION # define VASNPRINTF vasnwprintf # define FCHAR_T wchar_t # define DCHAR_T wchar_t # define TCHAR_T wchar_t # define DCHAR_IS_TCHAR 1 # define DIRECTIVE wchar_t_directive # define DIRECTIVES wchar_t_directives # define PRINTF_PARSE wprintf_parse # define DCHAR_CPY wmemcpy # define DCHAR_SET wmemset # else # define VASNPRINTF vasnprintf # define FCHAR_T char # define DCHAR_T char # define TCHAR_T char # define DCHAR_IS_TCHAR 1 # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse # define DCHAR_CPY memcpy # define DCHAR_SET memset # endif #endif #if WIDE_CHAR_VERSION /* TCHAR_T is wchar_t. */ # define USE_SNPRINTF 1 # if HAVE_DECL__SNWPRINTF /* On Windows, the function swprintf() has a different signature than on Unix; we use the function _snwprintf() or - on mingw - snwprintf() instead. The mingw function snwprintf() has fewer bugs than the MSVCRT function _snwprintf(), so prefer that. */ # if defined __MINGW32__ # define SNPRINTF snwprintf # else # define SNPRINTF _snwprintf # endif # else /* Unix. */ # define SNPRINTF swprintf # endif #else /* TCHAR_T is char. */ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. Also don't use it on Linux libc5, since there snprintf with size = 1 writes any output without bounds, like sprintf. */ # if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 # endif # if HAVE_DECL__SNPRINTF /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT function _snprintf(), so prefer that. */ # if defined __MINGW32__ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # else # define SNPRINTF _snprintf # endif # else /* Unix. */ # define SNPRINTF snprintf /* Here we need to call the native snprintf, not rpl_snprintf. */ # undef snprintf # endif #endif /* Here we need to call the native sprintf, not rpl_sprintf. */ #undef sprintf /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" warnings in this file. Use -Dlint to suppress them. */ #ifdef lint # define IF_LINT(Code) Code #else # define IF_LINT(Code) /* empty */ #endif /* Avoid some warnings from "gcc -Wshadow". This file doesn't use the exp() and remainder() functions. */ #undef exp #define exp expo #undef remainder #define remainder rem #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION # if (HAVE_STRNLEN && !defined _AIX) # define local_strnlen strnlen # else # ifndef local_strnlen_defined # define local_strnlen_defined 1 static size_t local_strnlen (const char *string, size_t maxlen) { const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; } # endif # endif #endif #if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T # if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid a dependency towards this library, here is a local substitute. Define this substitute only once, even if this file is included twice in the same compilation unit. */ # ifndef local_wcslen_defined # define local_wcslen_defined 1 static size_t local_wcslen (const wchar_t *s) { const wchar_t *ptr; for (ptr = s; *ptr != (wchar_t) 0; ptr++) ; return ptr - s; } # endif # endif #endif #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION # if HAVE_WCSNLEN # define local_wcsnlen wcsnlen # else # ifndef local_wcsnlen_defined # define local_wcsnlen_defined 1 static size_t local_wcsnlen (const wchar_t *s, size_t maxlen) { const wchar_t *ptr; for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) ; return ptr - s; } # endif # endif #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL /* Determine the decimal-point character according to the current locale. */ # ifndef decimal_point_char_defined # define decimal_point_char_defined 1 static char decimal_point_char (void) { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is multithread-safe on glibc systems and MacOS X systems, but is not required to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__)) point = nl_langinfo (RADIXCHAR); # elif 1 char pointbuf[5]; sprintf (pointbuf, "%#.0f", 1.0); point = &pointbuf[1]; # else point = localeconv () -> decimal_point; # endif /* The decimal point is always a single byte: either '.' or ','. */ return (point[0] != '\0' ? point[0] : '.'); } # endif #endif #if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zero (double x) { return isnand (x) || x + x == x; } #endif #if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL /* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ static int is_infinite_or_zerol (long double x) { return isnanl (x) || x + x == x; } #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL /* Converting 'long double' to decimal without rare rounding bugs requires real bignums. We use the naming conventions of GNU gmp, but vastly simpler (and slower) algorithms. */ typedef unsigned int mp_limb_t; # define GMP_LIMB_BITS 32 verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); typedef unsigned long long mp_twolimb_t; # define GMP_TWOLIMB_BITS 64 verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); /* Representation of a bignum >= 0. */ typedef struct { size_t nlimbs; mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ } mpn_t; /* Compute the product of two bignums >= 0. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * multiply (mpn_t src1, mpn_t src2, mpn_t *dest) { const mp_limb_t *p1; const mp_limb_t *p2; size_t len1; size_t len2; if (src1.nlimbs <= src2.nlimbs) { len1 = src1.nlimbs; p1 = src1.limbs; len2 = src2.nlimbs; p2 = src2.limbs; } else { len1 = src2.nlimbs; p1 = src2.limbs; len2 = src1.nlimbs; p2 = src1.limbs; } /* Now 0 <= len1 <= len2. */ if (len1 == 0) { /* src1 or src2 is zero. */ dest->nlimbs = 0; dest->limbs = (mp_limb_t *) malloc (1); } else { /* Here 1 <= len1 <= len2. */ size_t dlen; mp_limb_t *dp; size_t k, i, j; dlen = len1 + len2; dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); if (dp == NULL) return NULL; for (k = len2; k > 0; ) dp[--k] = 0; for (i = 0; i < len1; i++) { mp_limb_t digit1 = p1[i]; mp_twolimb_t carry = 0; for (j = 0; j < len2; j++) { mp_limb_t digit2 = p2[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; carry += dp[i + j]; dp[i + j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } dp[i + len2] = (mp_limb_t) carry; } /* Normalise. */ while (dlen > 0 && dp[dlen - 1] == 0) dlen--; dest->nlimbs = dlen; dest->limbs = dp; } return dest->limbs; } /* Compute the quotient of a bignum a >= 0 and a bignum b > 0. a is written as a = q * b + r with 0 <= r < b. q is the quotient, r the remainder. Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, q is incremented. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * divide (mpn_t a, mpn_t b, mpn_t *q) { /* Algorithm: First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). If m=n=1, perform a single-precision division: r:=0, j:=m, while j>0 do {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: We have a/b < beta^(m-n+1). s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} Compute q* : q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). In case of overflow (q* >= beta) set q* := beta-1. Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] and c3 := b[n-2] * q*. {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow occurred. Furthermore 0 <= c3 < beta^2. If there was overflow and r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, the next test can be skipped.} While c3 > c2, {Here 0 <= c2 < c3 < beta^2} Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. If q* > 0: Put r := r - b * q* * beta^j. In detail: [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. hence: u:=0, for i:=0 to n-1 do u := u + q* * b[i], r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), u:=u div beta (+ 1, if carry in subtraction) r[n+j]:=r[n+j]-u. {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 < q* + 1 <= beta, the carry u does not overflow.} If a negative carry occurs, put q* := q* - 1 and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. Set q[j] := q*. Normalise [q[m-n],..,q[0]]; this yields the quotient q. Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the rest r. The room for q[j] can be allocated at the memory location of r[n+j]. Finally, round-to-even: Shift r left by 1 bit. If r > b or if r = b and q[0] is odd, q := q+1. */ const mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; const mp_limb_t *b_ptr = b.limbs; size_t b_len = b.nlimbs; mp_limb_t *roomptr; mp_limb_t *tmp_roomptr = NULL; mp_limb_t *q_ptr; size_t q_len; mp_limb_t *r_ptr; size_t r_len; /* Allocate room for a_len+2 digits. (Need a_len+1 digits for the real division and 1 more digit for the final rounding of q.) */ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); if (roomptr == NULL) return NULL; /* Normalise a. */ while (a_len > 0 && a_ptr[a_len - 1] == 0) a_len--; /* Normalise b. */ for (;;) { if (b_len == 0) /* Division by zero. */ abort (); if (b_ptr[b_len - 1] == 0) b_len--; else break; } /* Here m = a_len >= 0 and n = b_len > 0. */ if (a_len < b_len) { /* m beta^(m-2) <= a/b < beta^m */ r_ptr = roomptr; q_ptr = roomptr + 1; { mp_limb_t den = b_ptr[0]; mp_limb_t remainder = 0; const mp_limb_t *sourceptr = a_ptr + a_len; mp_limb_t *destptr = q_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; *--destptr = num / den; remainder = num % den; } /* Normalise and store r. */ if (remainder > 0) { r_ptr[0] = remainder; r_len = 1; } else r_len = 0; /* Normalise q. */ q_len = a_len; if (q_ptr[q_len - 1] == 0) q_len--; } } else { /* n>1: multiple precision division. beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> beta^(m-n-1) <= a/b < beta^(m-n+1). */ /* Determine s. */ size_t s; { mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ s = 31; if (msd >= 0x10000) { msd = msd >> 16; s -= 16; } if (msd >= 0x100) { msd = msd >> 8; s -= 8; } if (msd >= 0x10) { msd = msd >> 4; s -= 4; } if (msd >= 0x4) { msd = msd >> 2; s -= 2; } if (msd >= 0x2) { msd = msd >> 1; s -= 1; } } /* 0 <= s < GMP_LIMB_BITS. Copy b, shifting it left by s bits. */ if (s > 0) { tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); if (tmp_roomptr == NULL) { free (roomptr); return NULL; } { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = tmp_roomptr; mp_twolimb_t accu = 0; size_t count; for (count = b_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } /* accu must be zero, since that was how s was determined. */ if (accu != 0) abort (); } b_ptr = tmp_roomptr; } /* Copy a, shifting it left by s bits, yields r. Memory layout: At the beginning: r = roomptr[0..a_len], at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ r_ptr = roomptr; if (s == 0) { memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); r_ptr[a_len] = 0; } else { const mp_limb_t *sourceptr = a_ptr; mp_limb_t *destptr = r_ptr; mp_twolimb_t accu = 0; size_t count; for (count = a_len; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } *destptr++ = (mp_limb_t) accu; } q_ptr = roomptr + b_len; q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ { size_t j = a_len - b_len; /* m-n */ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; /* Division loop, traversed m-n+1 times. j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ for (;;) { mp_limb_t q_star; mp_limb_t c1; if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ { /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ mp_twolimb_t num = ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) | r_ptr[j + b_len - 1]; q_star = num / b_msd; c1 = num % b_msd; } else { /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !}. If yes, jump directly to the subtraction loop. (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ if (r_ptr[j + b_len] > b_msd || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) /* r[j+n] >= b[n-1]+1 or r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a carry. */ goto subtract; } /* q_star = q*, c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 this can happen only twice. */ if (c3 > c2) { q_star = q_star - 1; /* q* := q* - 1 */ if (c3 - c2 > b_msdd) q_star = q_star - 1; /* q* := q* - 1 */ } } if (q_star > 0) subtract: { /* Subtract r := r - b * q* * beta^j. */ mp_limb_t cr; { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_twolimb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { /* Here 0 <= carry <= q*. */ carry = carry + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + (mp_limb_t) ~(*destptr); /* Here 0 <= carry <= beta*q* + beta-1. */ *destptr++ = ~(mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; /* <= q* */ } cr = (mp_limb_t) carry; } /* Subtract cr from r_ptr[j + b_len], then forget about r_ptr[j + b_len]. */ if (cr > r_ptr[j + b_len]) { /* Subtraction gave a carry. */ q_star = q_star - 1; /* q* := q* - 1 */ /* Add b back. */ { const mp_limb_t *sourceptr = b_ptr; mp_limb_t *destptr = r_ptr + j; mp_limb_t carry = 0; size_t count; for (count = b_len; count > 0; count--) { mp_limb_t source1 = *sourceptr++; mp_limb_t source2 = *destptr; *destptr++ = source1 + source2 + carry; carry = (carry ? source1 >= (mp_limb_t) ~source2 : source1 > (mp_limb_t) ~source2); } } /* Forget about the carry and about r[j+n]. */ } } /* q* is determined. Store it as q[j]. */ q_ptr[j] = q_star; if (j == 0) break; j--; } } r_len = b_len; /* Normalise q. */ if (q_ptr[q_len - 1] == 0) q_len--; # if 0 /* Not needed here, since we need r only to compare it with b/2, and b is shifted left by s bits. */ /* Shift r right by s bits. */ if (s > 0) { mp_limb_t ptr = r_ptr + r_len; mp_twolimb_t accu = 0; size_t count; for (count = r_len; count > 0; count--) { accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); } } # endif /* Normalise r. */ while (r_len > 0 && r_ptr[r_len - 1] == 0) r_len--; } /* Compare r << 1 with b. */ if (r_len > b_len) goto increment_q; { size_t i; for (i = b_len;;) { mp_limb_t r_i = (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) | (i < r_len ? r_ptr[i] << 1 : 0); mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); if (r_i > b_i) goto increment_q; if (r_i < b_i) goto keep_q; if (i == 0) break; i--; } } if (q_len > 0 && ((q_ptr[0] & 1) != 0)) /* q is odd. */ increment_q: { size_t i; for (i = 0; i < q_len; i++) if (++(q_ptr[i]) != 0) goto keep_q; q_ptr[q_len++] = 1; } keep_q: if (tmp_roomptr != NULL) free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; } /* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal representation. Destroys the contents of a. Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * convert_to_decimal (mpn_t a, size_t extra_zeroes) { mp_limb_t *a_ptr = a.limbs; size_t a_len = a.nlimbs; /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); if (c_ptr != NULL) { char *d_ptr = c_ptr; for (; extra_zeroes > 0; extra_zeroes--) *d_ptr++ = '0'; while (a_len > 0) { /* Divide a by 10^9, in-place. */ mp_limb_t remainder = 0; mp_limb_t *ptr = a_ptr + a_len; size_t count; for (count = a_len; count > 0; count--) { mp_twolimb_t num = ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; *ptr = num / 1000000000; remainder = num % 1000000000; } /* Store the remainder as 9 decimal digits. */ for (count = 9; count > 0; count--) { *d_ptr++ = '0' + (remainder % 10); remainder = remainder / 10; } /* Normalize a. */ if (a_ptr[a_len - 1] == 0) a_len--; } /* Remove leading zeroes. */ while (d_ptr > c_ptr && d_ptr[-1] == '0') d_ptr--; /* But keep at least one zero. */ if (d_ptr == c_ptr) *d_ptr++ = '0'; /* Terminate the string. */ *d_ptr = '\0'; } return c_ptr; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_long_double (long double x, int *ep, mpn_t *mp) { mpn_t m; int exp; long double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'long double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0L && y < 1.0L)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0L && y < 1.0L)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess precision. */ if (!(y == 0.0L)) abort (); # endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - LDBL_MANT_BIT; return m.limbs; } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0: write x as x = 2^e * m, where m is a bignum. Return the allocated memory in case of success, NULL in case of memory allocation failure. */ static void * decode_double (double x, int *ep, mpn_t *mp) { mpn_t m; int exp; double y; size_t i; /* Allocate memory for result. */ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); if (m.limbs == NULL) return NULL; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the latter is an integer. */ /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. I'm not sure whether it's safe to cast a 'double' value between 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', doesn't matter). */ # if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 # if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; } # else { mp_limb_t d; y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); d = (int) y; y -= d; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; } # endif # endif for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) { mp_limb_t hi, lo; y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); hi = (int) y; y -= hi; if (!(y >= 0.0 && y < 1.0)) abort (); y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); lo = (int) y; y -= lo; if (!(y >= 0.0 && y < 1.0)) abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } if (!(y == 0.0)) abort (); /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--; *mp = m; *ep = exp - DBL_MANT_BIT; return m.limbs; } # endif /* Assuming x = 2^e * m is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) { int s; size_t extra_zeroes; unsigned int abs_n; unsigned int abs_s; mp_limb_t *pow5_ptr; size_t pow5_len; unsigned int s_limbs; unsigned int s_bits; mpn_t pow5; mpn_t z; void *z_memory; char *digits; if (memory == NULL) return NULL; /* x = 2^e * m, hence y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) = round (2^s * 5^n * m). */ s = e + n; extra_zeroes = 0; /* Factor out a common power of 10 if possible. */ if (s > 0 && n > 0) { extra_zeroes = (s < n ? s : n); s -= extra_zeroes; n -= extra_zeroes; } /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. Before converting to decimal, we need to compute z = round (2^s * 5^n * m). */ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same sign. 2.322 is slightly larger than log(5)/log(2). */ abs_n = (n >= 0 ? n : -n); abs_s = (s >= 0 ? s : -s); pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + abs_s / GMP_LIMB_BITS + 1) * sizeof (mp_limb_t)); if (pow5_ptr == NULL) { free (memory); return NULL; } /* Initialize with 1. */ pow5_ptr[0] = 1; pow5_len = 1; /* Multiply with 5^|n|. */ if (abs_n > 0) { static mp_limb_t const small_pow5[13 + 1] = { 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125 }; unsigned int n13; for (n13 = 0; n13 <= abs_n; n13 += 13) { mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; size_t j; mp_twolimb_t carry = 0; for (j = 0; j < pow5_len; j++) { mp_limb_t digit2 = pow5_ptr[j]; carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; pow5_ptr[j] = (mp_limb_t) carry; carry = carry >> GMP_LIMB_BITS; } if (carry > 0) pow5_ptr[pow5_len++] = (mp_limb_t) carry; } } s_limbs = abs_s / GMP_LIMB_BITS; s_bits = abs_s % GMP_LIMB_BITS; if (n >= 0 ? s >= 0 : s <= 0) { /* Multiply with 2^|s|. */ if (s_bits > 0) { mp_limb_t *ptr = pow5_ptr; mp_twolimb_t accu = 0; size_t count; for (count = pow5_len; count > 0; count--) { accu += (mp_twolimb_t) *ptr << s_bits; *ptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) { *ptr = (mp_limb_t) accu; pow5_len++; } } if (s_limbs > 0) { size_t count; for (count = pow5_len; count > 0;) { count--; pow5_ptr[s_limbs + count] = pow5_ptr[count]; } for (count = s_limbs; count > 0;) { count--; pow5_ptr[count] = 0; } pow5_len += s_limbs; } pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* Multiply m with pow5. No division needed. */ z_memory = multiply (m, pow5, &z); } else { /* Divide m by pow5 and round. */ z_memory = divide (m, pow5, &z); } } else { pow5.limbs = pow5_ptr; pow5.nlimbs = pow5_len; if (n >= 0) { /* n >= 0, s < 0. Multiply m with pow5, then divide by 2^|s|. */ mpn_t numerator; mpn_t denominator; void *tmp_memory; tmp_memory = multiply (m, pow5, &numerator); if (tmp_memory == NULL) { free (pow5_ptr); free (memory); return NULL; } /* Construct 2^|s|. */ { mp_limb_t *ptr = pow5_ptr + pow5_len; size_t i; for (i = 0; i < s_limbs; i++) ptr[i] = 0; ptr[s_limbs] = (mp_limb_t) 1 << s_bits; denominator.limbs = ptr; denominator.nlimbs = s_limbs + 1; } z_memory = divide (numerator, denominator, &z); free (tmp_memory); } else { /* n < 0, s > 0. Multiply m with 2^s, then divide by pow5. */ mpn_t numerator; mp_limb_t *num_ptr; num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) * sizeof (mp_limb_t)); if (num_ptr == NULL) { free (pow5_ptr); free (memory); return NULL; } { mp_limb_t *destptr = num_ptr; { size_t i; for (i = 0; i < s_limbs; i++) *destptr++ = 0; } if (s_bits > 0) { const mp_limb_t *sourceptr = m.limbs; mp_twolimb_t accu = 0; size_t count; for (count = m.nlimbs; count > 0; count--) { accu += (mp_twolimb_t) *sourceptr++ << s_bits; *destptr++ = (mp_limb_t) accu; accu = accu >> GMP_LIMB_BITS; } if (accu > 0) *destptr++ = (mp_limb_t) accu; } else { const mp_limb_t *sourceptr = m.limbs; size_t count; for (count = m.nlimbs; count > 0; count--) *destptr++ = *sourceptr++; } numerator.limbs = num_ptr; numerator.nlimbs = destptr - num_ptr; } z_memory = divide (numerator, pow5, &z); free (num_ptr); } } free (pow5_ptr); free (memory); /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ if (z_memory == NULL) return NULL; digits = convert_to_decimal (z, extra_zeroes); free (z_memory); return digits; } # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_long_double (long double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_long_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and >= 0, and n is an integer: Returns the decimal representation of round (x * 10^n). Return the allocated memory - containing the decimal digits in low-to-high order, terminated with a NUL character - in case of success, NULL in case of memory allocation failure. */ static char * scale10_round_decimal_double (double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); } # endif # if NEED_PRINTF_LONG_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10l (long double x) { int exp; long double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexpl (x, &exp); if (!(y >= 0.0L && y < 1.0L)) abort (); if (y == 0.0L) return INT_MIN; if (y < 0.5L) { while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0L / (1 << 16))) { y *= 1.0L * (1 << 16); exp -= 16; } if (y < (1.0L / (1 << 8))) { y *= 1.0L * (1 << 8); exp -= 8; } if (y < (1.0L / (1 << 4))) { y *= 1.0L * (1 << 4); exp -= 4; } if (y < (1.0L / (1 << 2))) { y *= 1.0L * (1 << 2); exp -= 2; } if (y < (1.0L / (1 << 1))) { y *= 1.0L * (1 << 1); exp -= 1; } } if (!(y >= 0.5L && y < 1.0L)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif # if NEED_PRINTF_DOUBLE /* Assuming x is finite and > 0: Return an approximation for n with 10^n <= x < 10^(n+1). The approximation is usually the right n, but may be off by 1 sometimes. */ static int floorlog10 (double x) { int exp; double y; double z; double l; /* Split into exponential part and mantissa. */ y = frexp (x, &exp); if (!(y >= 0.0 && y < 1.0)) abort (); if (y == 0.0) return INT_MIN; if (y < 0.5) { while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) { y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); exp -= GMP_LIMB_BITS; } if (y < (1.0 / (1 << 16))) { y *= 1.0 * (1 << 16); exp -= 16; } if (y < (1.0 / (1 << 8))) { y *= 1.0 * (1 << 8); exp -= 8; } if (y < (1.0 / (1 << 4))) { y *= 1.0 * (1 << 4); exp -= 4; } if (y < (1.0 / (1 << 2))) { y *= 1.0 * (1 << 2); exp -= 2; } if (y < (1.0 / (1 << 1))) { y *= 1.0 * (1 << 1); exp -= 1; } } if (!(y >= 0.5 && y < 1.0)) abort (); /* Compute an approximation for l = log2(x) = exp + log2(y). */ l = exp; z = y; if (z < 0.70710678118654752444) { z *= 1.4142135623730950488; l -= 0.5; } if (z < 0.8408964152537145431) { z *= 1.1892071150027210667; l -= 0.25; } if (z < 0.91700404320467123175) { z *= 1.0905077326652576592; l -= 0.125; } if (z < 0.9576032806985736469) { z *= 1.0442737824274138403; l -= 0.0625; } /* Now 0.95 <= z <= 1.01. */ z = 1 - z; /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) Four terms are enough to get an approximation with error < 10^-7. */ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); /* Finally multiply with log(2)/log(10), yields an approximation for log10(x). */ l *= 0.30102999566398119523; /* Round down to the next integer. */ return (int) l + (l < 0 ? -1 : 0); } # endif /* Tests whether a string of digits consists of exactly PRECISION zeroes and a single '1' digit. */ static int is_borderline (const char *digits, size_t precision) { for (; precision > 0; precision--, digits++) if (*digits != '0') return 0; if (*digits != '1') return 0; digits++; return *digits == '\0'; } #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 /* Use a different function name, to make it possible that the 'wchar_t' parametrization and the 'char' parametrization get compiled in the same translation unit. */ # if WIDE_CHAR_VERSION # define MAX_ROOM_NEEDED wmax_room_needed # else # define MAX_ROOM_NEEDED max_room_needed # endif /* Returns the number of TCHAR_T units needed as temporary space for the result of sprintf or SNPRINTF of a single conversion directive. */ static inline size_t MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion, arg_type type, int flags, size_t width, int has_precision, size_t precision, int pad_ourselves) { size_t tmp_length; switch (conversion) { case 'd': case 'i': case 'u': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.30103 /* binary -> decimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Multiply by 2, as an estimate for FLAG_GROUP. */ tmp_length = xsum (tmp_length, tmp_length); /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'o': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.333334 /* binary -> octal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 1, to account for a leading sign. */ tmp_length = xsum (tmp_length, 1); break; case 'x': case 'X': # if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else # endif if (type == TYPE_LONGINT || type == TYPE_ULONGINT) tmp_length = (unsigned int) (sizeof (unsigned long) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (sizeof (unsigned int) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Add 2, to account for a leading sign or alternate form. */ tmp_length = xsum (tmp_length, 2); break; case 'f': case 'F': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ else tmp_length = (unsigned int) (DBL_MAX_EXP * 0.30103 /* binary -> decimal */ * 2 /* estimate for FLAG_GROUP */ ) + 1 /* turn floor into ceil */ + 10; /* sign, decimal point etc. */ tmp_length = xsum (tmp_length, precision); break; case 'e': case 'E': case 'g': case 'G': tmp_length = 12; /* sign, decimal point, exponent etc. */ tmp_length = xsum (tmp_length, precision); break; case 'a': case 'A': if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) (DBL_DIG * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); break; case 'c': # if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else # endif tmp_length = 1; break; case 's': # if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { # if WIDE_CHAR_VERSION /* ISO C says about %ls in fwprintf: "If the precision is not specified or is greater than the size of the array, the array shall contain a null wide character." So if there is a precision, we must not use wcslen. */ const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; if (has_precision) tmp_length = local_wcsnlen (arg, precision); else tmp_length = local_wcslen (arg); # else /* ISO C says about %ls in fprintf: "If a precision is specified, no more than that many bytes are written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the end of the array." So if there is a precision, we must not use wcslen. */ /* This case has already been handled separately in VASNPRINTF. */ abort (); # endif } else # endif { # if WIDE_CHAR_VERSION /* ISO C says about %s in fwprintf: "If the precision is not specified or is greater than the size of the converted array, the converted array shall contain a null wide character." So if there is a precision, we must not use strlen. */ /* This case has already been handled separately in VASNPRINTF. */ abort (); # else /* ISO C says about %s in fprintf: "If the precision is not specified or greater than the size of the array, the array shall contain a null character." So if there is a precision, we must not use strlen. */ const char *arg = ap->arg[arg_index].a.a_string; if (has_precision) tmp_length = local_strnlen (arg, precision); else tmp_length = strlen (arg); # endif } break; case 'p': tmp_length = (unsigned int) (sizeof (void *) * CHAR_BIT * 0.25 /* binary -> hexadecimal */ ) + 1 /* turn floor into ceil */ + 2; /* account for leading 0x */ break; default: abort (); } if (!pad_ourselves) { # if ENABLE_UNISTDIO /* Padding considers the number of characters, therefore the number of elements after padding may be > max (tmp_length, width) but is certainly <= tmp_length + width. */ tmp_length = xsum (tmp_length, width); # else /* Padding considers the number of elements, says POSIX. */ if (tmp_length < width) tmp_length = width; # endif } tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ return tmp_length; } #endif DCHAR_T * VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list args) { DIRECTIVES d; arguments a; if (PRINTF_PARSE (format, &d, &a) < 0) /* errno is already set. */ return NULL; #define CLEANUP() \ if (d.dir != d.direct_alloc_dir) \ free (d.dir); \ if (a.arg != a.direct_alloc_arg) \ free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) { CLEANUP (); errno = EINVAL; return NULL; } { size_t buf_neededlength; TCHAR_T *buf; TCHAR_T *buf_malloced; const FCHAR_T *cp; size_t i; DIRECTIVE *dp; /* Output string accumulator. */ DCHAR_T *result; size_t allocated; size_t length; /* Allocate a small buffer that will hold a directive passed to sprintf or snprintf. */ buf_neededlength = xsum4 (7, d.max_width_length, d.max_precision_length, 6); #if HAVE_ALLOCA if (buf_neededlength < 4000 / sizeof (TCHAR_T)) { buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); buf_malloced = NULL; } else #endif { size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); if (size_overflow_p (buf_memsize)) goto out_of_memory_1; buf = (TCHAR_T *) malloc (buf_memsize); if (buf == NULL) goto out_of_memory_1; buf_malloced = buf; } if (resultbuf != NULL) { result = resultbuf; allocated = *lengthp; } else { result = NULL; allocated = 0; } length = 0; /* Invariants: result is either == resultbuf or == NULL or malloc-allocated. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to out_of_memory if needed is SIZE_MAX or otherwise too big. */ #define ENSURE_ALLOCATION(needed) \ if ((needed) > allocated) \ { \ size_t memory_size; \ DCHAR_T *memory; \ \ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ if ((needed) > allocated) \ allocated = (needed); \ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ goto out_of_memory; \ if (result == resultbuf || result == NULL) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ if (memory == NULL) \ goto out_of_memory; \ if (result == resultbuf && length > 0) \ DCHAR_CPY (memory, result, length); \ result = memory; \ } for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) { if (cp != dp->dir_start) { size_t n = dp->dir_start - cp; size_t augmented_length = xsum (length, n); ENSURE_ALLOCATION (augmented_length); /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we need that the format string contains only ASCII characters if FCHAR_T and DCHAR_T are not the same type. */ if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) { DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); length = augmented_length; } else { do result[length++] = (unsigned char) *cp++; while (--n > 0); } } if (i == d.count) break; /* Execute a single directive. */ if (dp->conversion == '%') { size_t augmented_length; if (!(dp->arg_index == ARG_NONE)) abort (); augmented_length = xsum (length, 1); ENSURE_ALLOCATION (augmented_length); result[length] = '%'; length = augmented_length; } else { if (!(dp->arg_index != ARG_NONE)) abort (); if (dp->conversion == 'n') { switch (a.arg[dp->arg_index].type) { case TYPE_COUNT_SCHAR_POINTER: *a.arg[dp->arg_index].a.a_count_schar_pointer = length; break; case TYPE_COUNT_SHORT_POINTER: *a.arg[dp->arg_index].a.a_count_short_pointer = length; break; case TYPE_COUNT_INT_POINTER: *a.arg[dp->arg_index].a.a_count_int_pointer = length; break; case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; #if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; #endif default: abort (); } } #if ENABLE_UNISTDIO /* The unistdio extensions. */ else if (dp->conversion == 'U') { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } switch (type) { case TYPE_U8_STRING: { const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; const uint8_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u8_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u8_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT8_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-8 to locale encoding. */ converted = u8_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-8 to UTF-16/UTF-32. */ converted = U8_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U16_STRING: { const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; const uint16_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u16_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u16_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT16_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-16 to locale encoding. */ converted = u16_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-16 to UTF-8/UTF-32. */ converted = U16_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; case TYPE_U32_STRING: { const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; const uint32_t *arg_end; size_t characters; if (has_precision) { /* Use only PRECISION characters, from the left. */ arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of characters. */ arg_end = arg; characters = 0; for (;;) { int count = u32_strmblen (arg_end); if (count == 0) break; if (count < 0) { if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + u32_strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_UINT32_T { size_t n = arg_end - arg; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_CPY (result + length, arg, n); length += n; } # else { /* Convert. */ DCHAR_T *converted = result + length; size_t converted_len = allocated - length; # if DCHAR_IS_TCHAR /* Convert from UTF-32 to locale encoding. */ converted = u32_conv_to_encoding (locale_charset (), iconveh_question_mark, arg, arg_end - arg, NULL, converted, &converted_len); # else /* Convert from UTF-32 to UTF-8/UTF-16. */ converted = U32_TO_DCHAR (arg, arg_end - arg, converted, &converted_len); # endif if (converted == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } if (converted != result + length) { ENSURE_ALLOCATION (xsum (length, converted_len)); DCHAR_CPY (result + length, converted, converted_len); free (converted); } length += converted_len; } # endif if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } break; default: abort (); } } #endif #if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T else if (dp->conversion == 's' # if WIDE_CHAR_VERSION && a.arg[dp->arg_index].type != TYPE_WIDE_STRING # else && a.arg[dp->arg_index].type == TYPE_WIDE_STRING # endif ) { /* The normal handling of the 's' directive below requires allocating a temporary buffer. The determination of its length (tmp_length), in the case when a precision is specified, below requires a conversion between a char[] string and a wchar_t[] wide string. It could be done, but we have no guarantee that the implementation of sprintf will use the exactly same algorithm. Without this guarantee, it is possible to have buffer overrun bugs. In order to avoid such bugs, we implement the entire processing of the 's' directive ourselves. */ int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } # if WIDE_CHAR_VERSION /* %s in vasnwprintf. See the specification of fwprintf. */ { const char *arg = a.arg[dp->arg_index].a.a_string; const char *arg_end; size_t characters; if (has_precision) { /* Use only as many bytes as needed to produce PRECISION wide characters, from the left. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (; precision > 0; precision--) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else if (has_width) { /* Use the entire string, and count the number of wide characters. */ # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { int count; # if HAVE_MBRTOWC count = mbrlen (arg_end, MB_CUR_MAX, &state); # else count = mblen (arg_end, MB_CUR_MAX); # endif if (count == 0) /* Found the terminating NUL. */ break; if (count < 0) { /* Invalid or incomplete multibyte character. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end += count; characters++; } } else { /* Use the entire string. */ arg_end = arg + strlen (arg); /* The number of characters doesn't matter. */ characters = 0; } if (has_width && width > characters && !(dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } if (has_precision || has_width) { /* We know the number of wide characters in advance. */ size_t remaining; # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; remaining--) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); result[length++] = wc; arg += count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_MBRTOWC mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { wchar_t wc; int count; # if HAVE_MBRTOWC count = mbrtowc (&wc, arg, arg_end - arg, &state); # else count = mbtowc (&wc, arg, arg_end - arg); # endif if (count <= 0) /* mbrtowc not consistent with mbrlen, or mbtowc not consistent with mblen. */ abort (); ENSURE_ALLOCATION (xsum (length, 1)); result[length++] = wc; arg += count; } } if (has_width && width > characters && (dp->flags & FLAG_LEFT)) { size_t n = width - characters; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # else /* %ls in vasnprintf. See the specification of fprintf. */ { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; const wchar_t *arg_end; size_t characters; # if !DCHAR_IS_TCHAR /* This code assumes that TCHAR_T is 'char'. */ verify (sizeof (TCHAR_T) == 1); TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; # endif size_t w; if (has_precision) { /* Use only as many wide characters as needed to produce at most PRECISION bytes, from the left. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; while (precision > 0) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } if (precision < count) break; arg_end++; characters += count; precision -= count; } } # if DCHAR_IS_TCHAR else if (has_width) # else else # endif { /* Use the entire string, and count the number of bytes. */ # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif arg_end = arg; characters = 0; for (;;) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg_end == 0) /* Found the terminating null wide character. */ break; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg_end, &state); # else count = wctomb (cbuf, *arg_end); # endif if (count < 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } arg_end++; characters += count; } } # if DCHAR_IS_TCHAR else { /* Use the entire string. */ arg_end = arg + local_wcslen (arg); /* The number of bytes doesn't matter. */ characters = 0; } # endif # if !DCHAR_IS_TCHAR /* Convert the string into a piece of temporary memory. */ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); if (tmpsrc == NULL) goto out_of_memory; { TCHAR_T *tmpptr = tmpsrc; size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (tmpptr, cbuf, count); tmpptr += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } /* Convert from TCHAR_T[] to DCHAR_T[]. */ tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, characters, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; free (tmpsrc); if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } free (tmpsrc); # endif if (has_width) { # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, characters); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = characters; # endif } else /* w doesn't matter. */ w = 0; if (has_width && width > w && !(dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } # if DCHAR_IS_TCHAR if (has_precision || has_width) { /* We know the number of bytes in advance. */ size_t remaining; # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif ENSURE_ALLOCATION (xsum (length, characters)); for (remaining = characters; remaining > 0; ) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) /* Inconsistency. */ abort (); memcpy (result + length, cbuf, count); length += count; arg++; remaining -= count; } if (!(arg == arg_end)) abort (); } else { # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t mbstate_t state; memset (&state, '\0', sizeof (mbstate_t)); # endif while (arg < arg_end) { char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ int count; if (*arg == 0) abort (); # if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t count = wcrtomb (cbuf, *arg, &state); # else count = wctomb (cbuf, *arg); # endif if (count <= 0) { /* Cannot convert. */ if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EILSEQ; return NULL; } ENSURE_ALLOCATION (xsum (length, count)); memcpy (result + length, cbuf, count); length += count; arg++; } } # else ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); length += tmpdst_len; # endif if (has_width && width > w && (dp->flags & FLAG_LEFT)) { size_t n = width - w; ENSURE_ALLOCATION (xsum (length, n)); DCHAR_SET (result + length, ' ', n); length += n; } } # endif } #endif #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'a' || dp->conversion == 'A') # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # endif ) # endif ) { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* Allocate a temporary buffer of sufficient size. */ if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) ((LDBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ else tmp_length = (unsigned int) ((DBL_DIG + 1) * 0.831 /* decimal -> hexadecimal */ ) + 1; /* turn floor into ceil */ if (tmp_length < precision) tmp_length = precision; /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; if (type == TYPE_LONGDOUBLE) { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; long double mantissa; if (arg > 0.0L) mantissa = printf_frexpl (arg, &exponent); else { exponent = 0; mantissa = 0.0L; } if (has_precision && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ long double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5L : tail > 0.5L) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0L; } if (tail != 0.0L) for (q = precision; q > 0; q--) tail *= 0.0625L; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0L || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0L) { mantissa *= 16.0L; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } END_LONG_DOUBLE_ROUNDING (); } # else abort (); # endif } else { # if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion == 'A') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion == 'A') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { int exponent; double mantissa; if (arg > 0.0) mantissa = printf_frexp (arg, &exponent); else { exponent = 0; mantissa = 0.0; } if (has_precision && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) { /* Round the mantissa. */ double tail = mantissa; size_t q; for (q = precision; ; q--) { int digit = (int) tail; tail -= digit; if (q == 0) { if (digit & 1 ? tail >= 0.5 : tail > 0.5) tail = 1 - tail; else tail = - tail; break; } tail *= 16.0; } if (tail != 0.0) for (q = precision; q > 0; q--) tail *= 0.0625; mantissa += tail; } *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; { int digit; digit = (int) mantissa; mantissa -= digit; *p++ = '0' + digit; if ((flags & FLAG_ALT) || mantissa > 0.0 || precision > 0) { *p++ = decimal_point_char (); /* This loop terminates because we assume that FLT_RADIX is a power of 2. */ while (mantissa > 0.0) { mantissa *= 16.0; digit = (int) mantissa; mantissa -= digit; *p++ = digit + (digit < 10 ? '0' : dp->conversion - 10); if (precision > 0) precision--; } while (precision > 0) { *p++ = '0'; precision--; } } } *p++ = dp->conversion - 'A' + 'P'; # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } } # else abort (); # endif } /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif #if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL else if ((dp->conversion == 'f' || dp->conversion == 'F' || dp->conversion == 'e' || dp->conversion == 'E' || dp->conversion == 'g' || dp->conversion == 'G' || dp->conversion == 'a' || dp->conversion == 'A') && (0 # if NEED_PRINTF_DOUBLE || a.arg[dp->arg_index].type == TYPE_DOUBLE # elif NEED_PRINTF_INFINITE_DOUBLE || (a.arg[dp->arg_index].type == TYPE_DOUBLE /* The systems (mingw) which produce wrong output for Inf, -Inf, and NaN also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) # endif # if NEED_PRINTF_LONG_DOUBLE || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE # elif NEED_PRINTF_INFINITE_LONG_DOUBLE || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE /* Some systems produce wrong output for Inf, -Inf, and NaN. Some systems in this category (IRIX 5.3) also do so for -0.0. Therefore we treat this case here as well. */ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) # endif )) { # if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) arg_type type = a.arg[dp->arg_index].type; # endif int flags = dp->flags; int has_width; size_t width; int has_precision; size_t precision; size_t tmp_length; DCHAR_T tmpbuf[700]; DCHAR_T *tmp; DCHAR_T *pad_ptr; DCHAR_T *p; has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } has_precision = 0; precision = 0; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } /* POSIX specifies the default precision to be 6 for %f, %F, %e, %E, but not for %g, %G. Implementations appear to use the same default precision also for %g, %G. But for %a, %A, the default precision is 0. */ if (!has_precision) if (!(dp->conversion == 'a' || dp->conversion == 'A')) precision = 6; /* Allocate a temporary buffer of sufficient size. */ # if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); # elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); # elif NEED_PRINTF_LONG_DOUBLE tmp_length = LDBL_DIG + 1; # elif NEED_PRINTF_DOUBLE tmp_length = DBL_DIG + 1; # else tmp_length = 0; # endif if (tmp_length < precision) tmp_length = precision; # if NEED_PRINTF_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (!(isnanl (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10l (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif # if NEED_PRINTF_DOUBLE # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE if (type == TYPE_DOUBLE) # endif if (dp->conversion == 'f' || dp->conversion == 'F') { double arg = a.arg[dp->arg_index].a.a_double; if (!(isnand (arg) || arg + arg == arg)) { /* arg is finite and nonzero. */ int exponent = floorlog10 (arg < 0 ? -arg : arg); if (exponent >= 0 && tmp_length < exponent + precision) tmp_length = exponent + precision; } } # endif /* Account for sign, decimal point etc. */ tmp_length = xsum (tmp_length, 12); if (tmp_length < width) tmp_length = width; tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (DCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } pad_ptr = NULL; p = tmp; # if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE if (type == TYPE_LONGDOUBLE) # endif { long double arg = a.arg[dp->arg_index].a.a_longdouble; if (isnanl (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; DECL_LONG_DOUBLE_ROUNDING BEGIN_LONG_DOUBLE_ROUNDING (); if (signbit (arg)) /* arg < 0.0L or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0L && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_LONG_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_long_double (arg, precision); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0L) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0L. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)precision - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0L) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0L. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10l (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) { END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_long_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); END_LONG_DOUBLE_ROUNDING (); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = { '%', '+', '.', '2', 'd', '\0' }; SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, "%+.2d", exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, "%+.2d", exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0L)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else if (dp->conversion == 'a' || dp->conversion == 'A') { *p++ = '0'; *p++ = dp->conversion - 'A' + 'X'; pad_ptr = p; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion - 'A' + 'P'; *p++ = '+'; *p++ = '0'; } else abort (); # endif } END_LONG_DOUBLE_ROUNDING (); } } # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE else # endif # endif # if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE { double arg = a.arg[dp->arg_index].a.a_double; if (isnand (arg)) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; } else { *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; } } else { int sign = 0; if (signbit (arg)) /* arg < 0.0 or negative zero */ { sign = -1; arg = -arg; } if (sign < 0) *p++ = '-'; else if (flags & FLAG_SHOWSIGN) *p++ = '+'; else if (flags & FLAG_SPACE) *p++ = ' '; if (arg > 0.0 && arg + arg == arg) { if (dp->conversion >= 'A' && dp->conversion <= 'Z') { *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; } else { *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; } } else { # if NEED_PRINTF_DOUBLE pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { char *digits; size_t ndigits; digits = scale10_round_decimal_double (arg, precision); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits > precision) do { --ndigits; *p++ = digits[ndigits]; } while (ndigits > precision); else *p++ = '0'; /* Here ndigits <= precision. */ if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > ndigits; precision--) *p++ = '0'; while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } else if (dp->conversion == 'e' || dp->conversion == 'E') { int exponent; if (arg == 0.0) { exponent = 0; *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else { /* arg > 0.0. */ int adjusted; char *digits; size_t ndigits; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)precision - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision + 1) break; if (ndigits < precision || ndigits > precision + 2) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits == precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision+1. */ if (is_borderline (digits, precision)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)precision - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision + 1) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision+1. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); while (ndigits > 0) { --ndigits; *p++ = digits[ndigits]; } } free (digits); } *p++ = dp->conversion; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } else if (dp->conversion == 'g' || dp->conversion == 'G') { if (precision == 0) precision = 1; /* precision >= 1. */ if (arg == 0.0) /* The exponent is 0, >= -4, < precision. Use fixed-point notation. */ { size_t ndigits = precision; /* Number of trailing zeroes that have to be dropped. */ size_t nzeroes = (flags & FLAG_ALT ? 0 : precision - 1); --ndigits; *p++ = '0'; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = '0'; } } } else { /* arg > 0.0. */ int exponent; int adjusted; char *digits; size_t ndigits; size_t nzeroes; exponent = floorlog10 (arg); adjusted = 0; for (;;) { digits = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent); if (digits == NULL) goto out_of_memory; ndigits = strlen (digits); if (ndigits == precision) break; if (ndigits < precision - 1 || ndigits > precision + 1) /* The exponent was not guessed precisely enough. */ abort (); if (adjusted) /* None of two values of exponent is the right one. Prevent an endless loop. */ abort (); free (digits); if (ndigits < precision) exponent -= 1; else exponent += 1; adjusted = 1; } /* Here ndigits = precision. */ if (is_borderline (digits, precision - 1)) { /* Maybe the exponent guess was too high and a smaller exponent can be reached by turning a 10...0 into 9...9x. */ char *digits2 = scale10_round_decimal_double (arg, (int)(precision - 1) - exponent + 1); if (digits2 == NULL) { free (digits); goto out_of_memory; } if (strlen (digits2) == precision) { free (digits); digits = digits2; exponent -= 1; } else free (digits2); } /* Here ndigits = precision. */ /* Determine the number of trailing zeroes that have to be dropped. */ nzeroes = 0; if ((flags & FLAG_ALT) == 0) while (nzeroes < ndigits && digits[nzeroes] == '0') nzeroes++; /* The exponent is now determined. */ if (exponent >= -4 && exponent < (long)precision) { /* Fixed-point notation: max(exponent,0)+1 digits, then the decimal point, then the remaining digits without trailing zeroes. */ if (exponent >= 0) { size_t count = exponent + 1; /* Note: count <= precision = ndigits. */ for (; count > 0; count--) *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { size_t count = -exponent - 1; *p++ = '0'; *p++ = decimal_point_char (); for (; count > 0; count--) *p++ = '0'; while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } } else { /* Exponential notation. */ *p++ = digits[--ndigits]; if ((flags & FLAG_ALT) || ndigits > nzeroes) { *p++ = decimal_point_char (); while (ndigits > nzeroes) { --ndigits; *p++ = digits[ndigits]; } } *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ # if WIDE_CHAR_VERSION { static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; # endif SNPRINTF (p, 6 + 1, decimal_format, exponent); } while (*p != '\0') p++; # else { static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; # endif if (sizeof (DCHAR_T) == 1) { sprintf ((char *) p, decimal_format, exponent); while (*p != '\0') p++; } else { char expbuf[6 + 1]; const char *ep; sprintf (expbuf, decimal_format, exponent); for (ep = expbuf; (*p = *ep) != '\0'; ep++) p++; } } # endif } free (digits); } } else abort (); # else /* arg is finite. */ if (!(arg == 0.0)) abort (); pad_ptr = p; if (dp->conversion == 'f' || dp->conversion == 'F') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } } else if (dp->conversion == 'e' || dp->conversion == 'E') { *p++ = '0'; if ((flags & FLAG_ALT) || precision > 0) { *p++ = decimal_point_char (); for (; precision > 0; precision--) *p++ = '0'; } *p++ = dp->conversion; /* 'e' or 'E' */ *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; *p++ = '0'; } else if (dp->conversion == 'g' || dp->conversion == 'G') { *p++ = '0'; if (flags & FLAG_ALT) { size_t ndigits = (precision > 0 ? precision - 1 : 0); *p++ = decimal_point_char (); for (; ndigits > 0; --ndigits) *p++ = '0'; } } else abort (); # endif } } } # endif /* The generated string now extends from tmp to p, with the zero padding insertion point being at pad_ptr. */ if (has_width && p - tmp < width) { size_t pad = width - (p - tmp); DCHAR_T *end = p + pad; if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > tmp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } p = end; } { size_t count = p - tmp; if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); /* Make room for the result. */ if (count >= allocated - length) { size_t n = xsum (length, count); ENSURE_ALLOCATION (n); } /* Append the result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); if (tmp != tmpbuf) free (tmp); length += count; } } #endif else { arg_type type = a.arg[dp->arg_index].type; int flags = dp->flags; #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int has_width; size_t width; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION int has_precision; size_t precision; #endif #if NEED_PRINTF_UNBOUNDED_PRECISION int prec_ourselves; #else # define prec_ourselves 0 #endif #if NEED_PRINTF_FLAG_LEFTADJUST # define pad_ourselves 1 #elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION int pad_ourselves; #else # define pad_ourselves 0 #endif TCHAR_T *fbp; unsigned int prefix_count; int prefixes[2] IF_LINT (= { 0 }); int orig_errno; #if !USE_SNPRINTF size_t tmp_length; TCHAR_T tmpbuf[700]; TCHAR_T *tmp; #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION has_width = 0; width = 0; if (dp->width_start != dp->width_end) { if (dp->width_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->width_arg_index].a.a_int; if (arg < 0) { /* "A negative field width is taken as a '-' flag followed by a positive field width." */ flags |= FLAG_LEFT; width = (unsigned int) (-arg); } else width = arg; } else { const FCHAR_T *digitp = dp->width_start; do width = xsum (xtimes (width, 10), *digitp++ - '0'); while (digitp != dp->width_end); } has_width = 1; } #endif #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION has_precision = 0; precision = 6; if (dp->precision_start != dp->precision_end) { if (dp->precision_arg_index != ARG_NONE) { int arg; if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); arg = a.arg[dp->precision_arg_index].a.a_int; /* "A negative precision is taken as if the precision were omitted." */ if (arg >= 0) { precision = arg; has_precision = 1; } } else { const FCHAR_T *digitp = dp->precision_start + 1; precision = 0; while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); has_precision = 1; } } #endif /* Decide whether to handle the precision ourselves. */ #if NEED_PRINTF_UNBOUNDED_PRECISION switch (dp->conversion) { case 'd': case 'i': case 'u': case 'o': case 'x': case 'X': case 'p': prec_ourselves = has_precision && (precision > 0); break; default: prec_ourselves = 0; break; } #endif /* Decide whether to perform the padding ourselves. */ #if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) switch (dp->conversion) { # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need to perform the padding after this conversion. Functions with unistdio extensions perform the padding based on character count rather than element count. */ case 'c': case 's': # endif # if NEED_PRINTF_FLAG_ZERO case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': case 'a': case 'A': # endif pad_ourselves = 1; break; default: pad_ourselves = prec_ourselves; break; } #endif #if !USE_SNPRINTF /* Allocate a temporary buffer of sufficient size for calling sprintf. */ tmp_length = MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, flags, width, has_precision, precision, pad_ourselves); if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) tmp = tmpbuf; else { size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); if (size_overflow_p (tmp_memsize)) /* Overflow, would lead to out of memory. */ goto out_of_memory; tmp = (TCHAR_T *) malloc (tmp_memsize); if (tmp == NULL) /* Out of memory. */ goto out_of_memory; } #endif /* Construct the format string for calling snprintf or sprintf. */ fbp = buf; *fbp++ = '%'; #if NEED_PRINTF_FLAG_GROUPING /* The underlying implementation doesn't support the ' flag. Produce no grouping characters in this case; this is acceptable because the grouping is locale dependent. */ #else if (flags & FLAG_GROUP) *fbp++ = '\''; #endif if (flags & FLAG_LEFT) *fbp++ = '-'; if (flags & FLAG_SHOWSIGN) *fbp++ = '+'; if (flags & FLAG_SPACE) *fbp++ = ' '; if (flags & FLAG_ALT) *fbp++ = '#'; #if __GLIBC__ >= 2 && !defined __UCLIBC__ if (flags & FLAG_LOCALIZED) *fbp++ = 'I'; #endif if (!pad_ourselves) { if (flags & FLAG_ZERO) *fbp++ = '0'; if (dp->width_start != dp->width_end) { size_t n = dp->width_end - dp->width_start; /* The width specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->width_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } if (!prec_ourselves) { if (dp->precision_start != dp->precision_end) { size_t n = dp->precision_end - dp->precision_start; /* The precision specification is known to consist only of standard ASCII characters. */ if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) { memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); fbp += n; } else { const FCHAR_T *mp = dp->precision_start; do *fbp++ = (unsigned char) *mp++; while (--n > 0); } } } switch (type) { #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; break; # else *fbp++ = 'l'; /*FALLTHROUGH*/ # endif #endif case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif #if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *fbp++ = 'l'; break; case TYPE_LONGDOUBLE: *fbp++ = 'L'; break; default: break; } #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') *fbp = 'f'; else #endif *fbp = dp->conversion; #if USE_SNPRINTF # if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; # else /* On glibc2 systems from glibc >= 2.3 - probably also older ones - we know that snprintf's return value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and gl_SNPRINTF_TRUNCATION_C99 pass. Therefore we can avoid using %n in this situation. On glibc2 systems from 2004-10-18 or newer, the use of %n in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ /* On native Win32 systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes '4', '5', '6' into buf, not '4', '5', '\0'.) - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. On native Win32 systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See and So we should avoid %n in this situation. */ fbp[1] = '\0'; # endif #else fbp[1] = '\0'; #endif /* Construct the arguments for calling snprintf or sprintf. */ prefix_count = 0; if (!pad_ourselves && dp->width_arg_index != ARG_NONE) { if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; } if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) { if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) abort (); prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; } #if USE_SNPRINTF /* The SNPRINTF result is appended after result[0..length]. The latter is an array of DCHAR_T; SNPRINTF appends an array of TCHAR_T to it. This is possible because sizeof (TCHAR_T) divides sizeof (DCHAR_T) and alignof (TCHAR_T) <= alignof (DCHAR_T). */ # define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) /* Ensure that maxlen below will be >= 2. Needed on BeOS, where an snprintf() with maxlen==1 acts like sprintf(). */ ENSURE_ALLOCATION (xsum (length, (2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR)); /* Prepare checking whether snprintf returns the count via %n. */ *(TCHAR_T *) (result + length) = '\0'; #endif orig_errno = errno; for (;;) { int count = -1; #if USE_SNPRINTF int retcount = 0; size_t maxlen = allocated - length; /* SNPRINTF can fail if its second argument is > INT_MAX. */ if (maxlen > INT_MAX / TCHARS_PER_DCHAR) maxlen = INT_MAX / TCHARS_PER_DCHAR; maxlen = maxlen * TCHARS_PER_DCHAR; # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ arg, &count); \ break; \ case 1: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], arg, &count); \ break; \ case 2: \ retcount = SNPRINTF ((TCHAR_T *) (result + length), \ maxlen, buf, \ prefixes[0], prefixes[1], arg, \ &count); \ break; \ default: \ abort (); \ } #else # define SNPRINTF_BUF(arg) \ switch (prefix_count) \ { \ case 0: \ count = sprintf (tmp, buf, arg); \ break; \ case 1: \ count = sprintf (tmp, buf, prefixes[0], arg); \ break; \ case 2: \ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ arg); \ break; \ default: \ abort (); \ } #endif errno = 0; switch (type) { case TYPE_SCHAR: { int arg = a.arg[dp->arg_index].a.a_schar; SNPRINTF_BUF (arg); } break; case TYPE_UCHAR: { unsigned int arg = a.arg[dp->arg_index].a.a_uchar; SNPRINTF_BUF (arg); } break; case TYPE_SHORT: { int arg = a.arg[dp->arg_index].a.a_short; SNPRINTF_BUF (arg); } break; case TYPE_USHORT: { unsigned int arg = a.arg[dp->arg_index].a.a_ushort; SNPRINTF_BUF (arg); } break; case TYPE_INT: { int arg = a.arg[dp->arg_index].a.a_int; SNPRINTF_BUF (arg); } break; case TYPE_UINT: { unsigned int arg = a.arg[dp->arg_index].a.a_uint; SNPRINTF_BUF (arg); } break; case TYPE_LONGINT: { long int arg = a.arg[dp->arg_index].a.a_longint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGINT: { unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; SNPRINTF_BUF (arg); } break; #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; SNPRINTF_BUF (arg); } break; case TYPE_ULONGLONGINT: { unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; SNPRINTF_BUF (arg); } break; #endif case TYPE_DOUBLE: { double arg = a.arg[dp->arg_index].a.a_double; SNPRINTF_BUF (arg); } break; case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; SNPRINTF_BUF (arg); } break; case TYPE_CHAR: { int arg = a.arg[dp->arg_index].a.a_char; SNPRINTF_BUF (arg); } break; #if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; SNPRINTF_BUF (arg); } break; #endif case TYPE_STRING: { const char *arg = a.arg[dp->arg_index].a.a_string; SNPRINTF_BUF (arg); } break; #if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; SNPRINTF_BUF (arg); } break; #endif case TYPE_POINTER: { void *arg = a.arg[dp->arg_index].a.a_pointer; SNPRINTF_BUF (arg); } break; default: abort (); } #if USE_SNPRINTF /* Portability: Not all implementations of snprintf() are ISO C 99 compliant. Determine the number of bytes that snprintf() has produced or would have produced. */ if (count >= 0) { /* Verify that snprintf() has NUL-terminated its result. */ if (count < maxlen && ((TCHAR_T *) (result + length)) [count] != '\0') abort (); /* Portability hack. */ if (retcount > count) count = retcount; } else { /* snprintf() doesn't understand the '%n' directive. */ if (fbp[1] != '\0') { /* Don't use the '%n' directive; instead, look at the snprintf() return value. */ fbp[1] = '\0'; continue; } else { /* Look at the snprintf() return value. */ if (retcount < 0) { # if !HAVE_SNPRINTF_RETVAL_C99 /* HP-UX 10.20 snprintf() is doubly deficient: It doesn't understand the '%n' directive, *and* it returns -1 (rather than the length that would have been required) when the buffer is too small. But a failure at this point can also come from other reasons than a too small buffer, such as an invalid wide string argument to the %ls directive, or possibly an invalid floating-point argument. */ size_t tmp_length = MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, flags, width, has_precision, precision, pad_ourselves); if (maxlen < tmp_length) { /* Make more room. But try to do through this reallocation only once. */ size_t bigger_need = xsum (length, xsum (tmp_length, TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); /* And always grow proportionally. (There may be several arguments, each needing a little more room than the previous one.) */ size_t bigger_need2 = xsum (xtimes (allocated, 2), 12); if (bigger_need < bigger_need2) bigger_need = bigger_need2; ENSURE_ALLOCATION (bigger_need); continue; } # endif } else count = retcount; } } #endif /* Attempt to handle failure. */ if (count < 0) { /* SNPRINTF or sprintf failed. Save and use the errno that it has set, if any. */ int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = (saved_errno != 0 ? saved_errno : (dp->conversion == 'c' || dp->conversion == 's' ? EILSEQ : EINVAL)); return NULL; } #if USE_SNPRINTF /* Handle overflow of the allocated buffer. If such an overflow occurs, a C99 compliant snprintf() returns a count >= maxlen. However, a non-compliant snprintf() function returns only count = maxlen - 1. To cover both cases, test whether count >= maxlen - 1. */ if ((unsigned int) count + 1 >= maxlen) { /* If maxlen already has attained its allowed maximum, allocating more memory will not increase maxlen. Instead of looping, bail out. */ if (maxlen == INT_MAX / TCHARS_PER_DCHAR) goto overflow; else { /* Need at least (count + 1) * sizeof (TCHAR_T) bytes. (The +1 is for the trailing NUL.) But ask for (count + 2) * sizeof (TCHAR_T) bytes, so that in the next round, we likely get maxlen > (unsigned int) count + 1 and so we don't get here again. And allocate proportionally, to avoid looping eternally if snprintf() reports a too small count. */ size_t n = xmax (xsum (length, ((unsigned int) count + 2 + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); continue; } } #endif #if NEED_PRINTF_UNBOUNDED_PRECISION if (prec_ourselves) { /* Handle the precision. */ TCHAR_T *prec_ptr = # if USE_SNPRINTF (TCHAR_T *) (result + length); # else tmp; # endif size_t prefix_count; size_t move; prefix_count = 0; /* Put the additional zeroes after the sign. */ if (count >= 1 && (*prec_ptr == '-' || *prec_ptr == '+' || *prec_ptr == ' ')) prefix_count = 1; /* Put the additional zeroes after the 0x prefix if (flags & FLAG_ALT) || (dp->conversion == 'p'). */ else if (count >= 2 && prec_ptr[0] == '0' && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) prefix_count = 2; move = count - prefix_count; if (precision > move) { /* Insert zeroes. */ size_t insert = precision - move; TCHAR_T *prec_end; # if USE_SNPRINTF size_t n = xsum (length, (count + insert + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR); length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; ENSURE_ALLOCATION (n); length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; prec_ptr = (TCHAR_T *) (result + length); # endif prec_end = prec_ptr + count; prec_ptr += prefix_count; while (prec_end > prec_ptr) { prec_end--; prec_end[insert] = prec_end[0]; } prec_end += insert; do *--prec_end = '0'; while (prec_end > prec_ptr); count += insert; } } #endif #if !USE_SNPRINTF if (count >= tmp_length) /* tmp_length was incorrectly calculated - fix the code above! */ abort (); #endif #if !DCHAR_IS_TCHAR /* Convert from TCHAR_T[] to DCHAR_T[]. */ if (dp->conversion == 'c' || dp->conversion == 's') { /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING TYPE_WIDE_STRING. The result string is not certainly ASCII. */ const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t tmpdst_len; /* This code assumes that TCHAR_T is 'char'. */ verify (sizeof (TCHAR_T) == 1); # if USE_SNPRINTF tmpsrc = (TCHAR_T *) (result + length); # else tmpsrc = tmp; # endif tmpdst = DCHAR_CONV_FROM_ENCODING (locale_charset (), iconveh_question_mark, tmpsrc, count, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) { int saved_errno = errno; if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = saved_errno; return NULL; } ENSURE_ALLOCATION (xsum (length, tmpdst_len)); DCHAR_CPY (result + length, tmpdst, tmpdst_len); free (tmpdst); count = tmpdst_len; } else { /* The result string is ASCII. Simple 1:1 conversion. */ # if USE_SNPRINTF /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a no-op conversion, in-place on the array starting at (result + length). */ if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) # endif { const TCHAR_T *tmpsrc; DCHAR_T *tmpdst; size_t n; # if USE_SNPRINTF if (result == resultbuf) { tmpsrc = (TCHAR_T *) (result + length); /* ENSURE_ALLOCATION will not move tmpsrc (because it's part of resultbuf). */ ENSURE_ALLOCATION (xsum (length, count)); } else { /* ENSURE_ALLOCATION will move the array (because it uses realloc(). */ ENSURE_ALLOCATION (xsum (length, count)); tmpsrc = (TCHAR_T *) (result + length); } # else tmpsrc = tmp; ENSURE_ALLOCATION (xsum (length, count)); # endif tmpdst = result + length; /* Copy backwards, because of overlapping. */ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) *--tmpdst = (unsigned char) *--tmpsrc; } } #endif #if DCHAR_IS_TCHAR && !USE_SNPRINTF /* Make room for the result. */ if (count > allocated - length) { /* Need at least count elements. But allocate proportionally. */ size_t n = xmax (xsum (length, count), xtimes (allocated, 2)); ENSURE_ALLOCATION (n); } #endif /* Here count <= allocated - length. */ /* Perform padding. */ #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION if (pad_ourselves && has_width) { size_t w; # if ENABLE_UNISTDIO /* Outside POSIX, it's preferrable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); # else /* The width is compared against the number of _bytes_ of the converted value, says POSIX. */ w = count; # endif if (w < width) { size_t pad = width - w; /* Make room for the result. */ if (xsum (count, pad) > allocated - length) { /* Need at least count + pad elements. But allocate proportionally. */ size_t n = xmax (xsum3 (length, count, pad), xtimes (allocated, 2)); # if USE_SNPRINTF length += count; ENSURE_ALLOCATION (n); length -= count; # else ENSURE_ALLOCATION (n); # endif } /* Here count + pad <= allocated - length. */ { # if !DCHAR_IS_TCHAR || USE_SNPRINTF DCHAR_T * const rp = result + length; # else DCHAR_T * const rp = tmp; # endif DCHAR_T *p = rp + count; DCHAR_T *end = p + pad; DCHAR_T *pad_ptr; # if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO if (dp->conversion == 'c' || dp->conversion == 's') /* No zero-padding for string directives. */ pad_ptr = NULL; else # endif { pad_ptr = (*rp == '-' ? rp + 1 : rp); /* No zero-padding of "inf" and "nan". */ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) pad_ptr = NULL; } /* The generated string now extends from rp to p, with the zero padding insertion point being at pad_ptr. */ count = count + pad; /* = end - rp */ if (flags & FLAG_LEFT) { /* Pad with spaces on the right. */ for (; pad > 0; pad--) *p++ = ' '; } else if ((flags & FLAG_ZERO) && pad_ptr != NULL) { /* Pad with zeroes. */ DCHAR_T *q = end; while (p > pad_ptr) *--q = *--p; for (; pad > 0; pad--) *p++ = '0'; } else { /* Pad with spaces on the left. */ DCHAR_T *q = end; while (p > rp) *--q = *--p; for (; pad > 0; pad--) *p++ = ' '; } } } } #endif /* Here still count <= allocated - length. */ #if !DCHAR_IS_TCHAR || USE_SNPRINTF /* The snprintf() result did fit. */ #else /* Append the sprintf() result. */ memcpy (result + length, tmp, count * sizeof (DCHAR_T)); #endif #if !USE_SNPRINTF if (tmp != tmpbuf) free (tmp); #endif #if NEED_PRINTF_DIRECTIVE_F if (dp->conversion == 'F') { /* Convert the %f result to upper case for %F. */ DCHAR_T *rp = result + length; size_t rc; for (rc = count; rc > 0; rc--, rp++) if (*rp >= 'a' && *rp <= 'z') *rp = *rp - 'a' + 'A'; } #endif length += count; break; } errno = orig_errno; #undef pad_ourselves #undef prec_ourselves } } } /* Add the final NUL. */ ENSURE_ALLOCATION (xsum (length, 1)); result[length] = '\0'; if (result != resultbuf && length + 1 < allocated) { /* Shrink the allocated memory if possible. */ DCHAR_T *memory; memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); if (memory != NULL) result = memory; } if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); *lengthp = length; /* Note that we can produce a big string of a length > INT_MAX. POSIX says that snprintf() fails with errno = EOVERFLOW in this case, but that's only because snprintf() returns an 'int'. This function does not have this limitation. */ return result; #if USE_SNPRINTF overflow: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); CLEANUP (); errno = EOVERFLOW; return NULL; #endif out_of_memory: if (!(result == resultbuf || result == NULL)) free (result); if (buf_malloced != NULL) free (buf_malloced); out_of_memory_1: CLEANUP (); errno = ENOMEM; return NULL; } } #undef MAX_ROOM_NEEDED #undef TCHARS_PER_DCHAR #undef SNPRINTF #undef USE_SNPRINTF #undef DCHAR_SET #undef DCHAR_CPY #undef PRINTF_PARSE #undef DIRECTIVES #undef DIRECTIVE #undef DCHAR_IS_TCHAR #undef TCHAR_T #undef DCHAR_T #undef FCHAR_T #undef VASNPRINTF dico-2.2/gnu/vasnprintf.h000066400000000000000000000060431172612674100154410ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* vsprintf with automatic memory allocation. Copyright (C) 2002-2004, 2007-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H /* Get va_list. */ #include /* Get size_t. */ #include /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif #ifdef __cplusplus extern "C" { #endif /* Write formatted output to a string dynamically allocated with malloc(). You can pass a preallocated buffer for the result in RESULTBUF and its size in *LENGTHP; otherwise you pass RESULTBUF = NULL. If successful, return the address of the string (this may be = RESULTBUF if no dynamic memory allocation was necessary) and set *LENGTHP to the number of resulting bytes, excluding the trailing NUL. Upon error, set errno and return NULL. When dynamic memory allocation occurs, the preallocated buffer is left alone (with possibly modified contents). This makes it possible to use a statically allocated or stack-allocated buffer, like this: char buf[100]; size_t len = sizeof (buf); char *output = vasnprintf (buf, &len, format, args); if (output == NULL) ... error handling ...; else { ... use the output string ...; if (output != buf) free (output); } */ #if REPLACE_VASNPRINTF # define asnprintf rpl_asnprintf # define vasnprintf rpl_vasnprintf #endif extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); #ifdef __cplusplus } #endif #endif /* _VASNPRINTF_H */ dico-2.2/gnu/vasprintf.c000066400000000000000000000027351172612674100152620ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Formatted output to strings. Copyright (C) 1999, 2002, 2006-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include /* Specification. */ #ifdef IN_LIBASPRINTF # include "vasprintf.h" #else # include #endif #include #include #include #include "vasnprintf.h" int vasprintf (char **resultp, const char *format, va_list args) { size_t length; char *result = vasnprintf (NULL, &length, format, args); if (result == NULL) return -1; if (length > INT_MAX) { free (result); errno = EOVERFLOW; return -1; } *resultp = result; /* Return the number of resulting bytes, excluding the trailing NUL. */ return length; } dico-2.2/gnu/verify.h000066400000000000000000000147701172612674100145610ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Compile-time assert-like macros. Copyright (C) 2005-2006, 2009-2011 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 3 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, see . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef VERIFY_H # define VERIFY_H 1 /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike assert (R), there is no run-time overhead. There are two macros, since no single macro can be used in all contexts in C. verify_true (R) is for scalar contexts, including integer constant expression contexts. verify (R) is for declaration contexts, e.g., the top level. Symbols ending in "__" are private to this header. The code below uses several ideas. * The first step is ((R) ? 1 : -1). Given an expression R, of integral or boolean or floating-point type, this yields an expression of integral type, whose value is later verified to be constant and nonnegative. * Next this expression W is wrapped in a type struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. If W is negative, this yields a compile-time error. No compiler can deal with a bit-field of negative size. One might think that an array size check would have the same effect, that is, that the type struct { unsigned int dummy[W]; } would work as well. However, inside a function, some compilers (such as C++ compilers and GNU C) allow local parameters and variables inside array size expressions. With these compilers, an array size check would not properly diagnose this misuse of the verify macro: void function (int n) { verify (n < 0); } * For the verify macro, the struct verify_type__ will need to somehow be embedded into a declaration. To be portable, this declaration must declare an object, a constant, a function, or a typedef name. If the declared entity uses the type directly, such as in struct dummy {...}; typedef struct {...} dummy; extern struct {...} *dummy; extern void dummy (struct {...} *); extern struct {...} *dummy (void); two uses of the verify macro would yield colliding declarations if the entity names are not disambiguated. A workaround is to attach the current line number to the entity name: #define _GL_CONCAT0(x, y) x##y #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) extern struct {...} * _GL_CONCAT (dummy, __LINE__); But this has the problem that two invocations of verify from within the same macro would collide, since the __LINE__ value would be the same for both invocations. (The GCC __COUNTER__ macro solves this problem, but is not portable.) A solution is to use the sizeof operator. It yields a number, getting rid of the identity of the type. Declarations like extern int dummy [sizeof (struct {...})]; extern void dummy (int [sizeof (struct {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; can be repeated. * Should the implementation use a named struct or an unnamed struct? Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; extern int dummy [sizeof (struct verify_type__ {...})]; extern void dummy (int [sizeof (struct {...})]); extern void dummy (int [sizeof (struct verify_type__ {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; In the second and sixth case, the struct type is exported to the outer scope; two such declarations therefore collide. GCC warns about the first, third, and fourth cases. So the only remaining possibility is the fifth case: extern int (*dummy (void)) [sizeof (struct {...})]; * GCC warns about duplicate declarations of the dummy function if -Wredundant_decls is used. GCC 4.3 and later have a builtin __COUNTER__ macro that can let us generate unique identifiers for each dummy function, to suppress this warning. * This implementation exploits the fact that GCC does not warn about the last declaration mentioned above. If a future version of GCC introduces a warning for this, the problem could be worked around by using code specialized to GCC, just as __COUNTER__ is already being used if available. #if 4 <= __GNUC__ # define verify(R) [another version to keep GCC happy] #endif * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ # define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) # define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ # if defined __COUNTER__ && __COUNTER__ != __COUNTER__ # define _GL_COUNTER __COUNTER__ # else # define _GL_COUNTER __LINE__ # endif /* Generate a symbol with the given prefix, making it unique if possible. */ # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression. Return 1. */ # ifdef __cplusplus template struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; # define verify_true(R) \ (!!sizeof (verify_type__<(R) ? 1 : -1>)) # else # define verify_true(R) \ (!!sizeof \ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) # endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ # define verify(R) \ extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)] #endif dico-2.2/gnu/w32sock.h000066400000000000000000000034611172612674100145430ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* w32sock.h --- internal auxilliary functions for Windows socket functions Copyright (C) 2008-2011 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 3 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, see . */ /* Written by Paolo Bonzini */ #include /* Get O_RDWR and O_BINARY. */ #include /* Get _get_osfhandle() and _open_osfhandle(). */ #include #define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) #define SOCKET_TO_FD(fh) (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY)) static inline void set_winsock_errno (void) { int err = WSAGetLastError (); /* Map some WSAE* errors to the runtime library's error codes. */ switch (err) { case WSA_INVALID_HANDLE: errno = EBADF; break; case WSA_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; case WSA_INVALID_PARAMETER: errno = EINVAL; break; case WSAEWOULDBLOCK: errno = EWOULDBLOCK; break; case WSAENAMETOOLONG: errno = ENAMETOOLONG; break; case WSAENOTEMPTY: errno = ENOTEMPTY; break; default: errno = (err > 10000 && err < 10025) ? err - 10000 : err; break; } } dico-2.2/gnu/wchar.in.h000066400000000000000000000702241172612674100147620ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that have issues. Copyright (C) 2007-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * ISO C 99 for platforms that have issues. * * * For now, this just ensures proper prerequisite inclusion order and * the declaration of wcwidth(). */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H /* Special invocation convention: - Inside glibc and uClibc header files. - On HP-UX 11.00 we have a sequence of nested includes -> -> , and the latter includes , once indirectly -> -> -> and once directly. In both situations 'wint_t' is not yet defined, therefore we cannot provide the function overrides; instead include only the system's . - On IRIX 6.5, similarly, we have an include -> , and the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ #else /* Normal invocation convention. */ #ifndef _GL_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H #if @HAVE_FEATURES_H@ # include /* for __GLIBC__ */ #endif /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include # include # include #endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCHAR_H@ # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _GL_WCHAR_H #define _GL_WCHAR_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Define wint_t and WEOF. (Also done in wctype.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #else # ifndef WEOF # define WEOF ((wint_t) -1) # endif #endif /* Override mbstate_t if it is too small. On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for implementing mbrtowc for encodings like UTF-8. */ #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ # if !GNULIB_defined_mbstate_t typedef int rpl_mbstate_t; # undef mbstate_t # define mbstate_t rpl_mbstate_t # define GNULIB_defined_mbstate_t 1 # endif #endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ # if @REPLACE_BTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef btowc # define btowc rpl_btowc # endif _GL_FUNCDECL_RPL (btowc, wint_t, (int c)); _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # else # if !@HAVE_BTOWC@ _GL_FUNCDECL_SYS (btowc, wint_t, (int c)); # endif _GL_CXXALIAS_SYS (btowc, wint_t, (int c)); # endif _GL_CXXALIASWARN (btowc); #elif defined GNULIB_POSIXCHECK # undef btowc # if HAVE_RAW_DECL_BTOWC _GL_WARN_ON_USE (btowc, "btowc is unportable - " "use gnulib module btowc for portability"); # endif #endif /* Convert a wide character to a single-byte character. */ #if @GNULIB_WCTOB@ # if @REPLACE_WCTOB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctob # define wctob rpl_wctob # endif _GL_FUNCDECL_RPL (wctob, int, (wint_t wc)); _GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); # else # if !defined wctob && !@HAVE_DECL_WCTOB@ /* wctob is provided by gnulib, or wctob exists but is not declared. */ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc)); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); # endif _GL_CXXALIASWARN (wctob); #elif defined GNULIB_POSIXCHECK # undef wctob # if HAVE_RAW_DECL_WCTOB _GL_WARN_ON_USE (wctob, "wctob is unportable - " "use gnulib module wctob for portability"); # endif #endif /* Test whether *PS is in the initial state. */ #if @GNULIB_MBSINIT@ # if @REPLACE_MBSINIT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsinit # define mbsinit rpl_mbsinit # endif _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); # else # if !@HAVE_MBSINIT@ _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsinit); #elif defined GNULIB_POSIXCHECK # undef mbsinit # if HAVE_RAW_DECL_MBSINIT _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " "use gnulib module mbsinit for portability"); # endif #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBRTOWC@ # if @REPLACE_MBRTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrtowc # define mbrtowc rpl_mbrtowc # endif _GL_FUNCDECL_RPL (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); _GL_CXXALIAS_RPL (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # else # if !@HAVE_MBRTOWC@ _GL_FUNCDECL_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrtowc, size_t, (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbrtowc); #elif defined GNULIB_POSIXCHECK # undef mbrtowc # if HAVE_RAW_DECL_MBRTOWC _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " "use gnulib module mbrtowc for portability"); # endif #endif /* Recognize a multibyte character. */ #if @GNULIB_MBRLEN@ # if @REPLACE_MBRLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrlen # define mbrlen rpl_mbrlen # endif _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # else # if !@HAVE_MBRLEN@ _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbrlen); #elif defined GNULIB_POSIXCHECK # undef mbrlen # if HAVE_RAW_DECL_MBRLEN _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " "use gnulib module mbrlen for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSRTOWCS@ # if @REPLACE_MBSRTOWCS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs # endif _GL_FUNCDECL_RPL (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # else # if !@HAVE_MBSRTOWCS@ _GL_FUNCDECL_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsrtowcs); #elif defined GNULIB_POSIXCHECK # undef mbsrtowcs # if HAVE_RAW_DECL_MBSRTOWCS _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " "use gnulib module mbsrtowcs for portability"); # endif #endif /* Convert a string to a wide string. */ #if @GNULIB_MBSNRTOWCS@ # if @REPLACE_MBSNRTOWCS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsnrtowcs # define mbsnrtowcs rpl_mbsnrtowcs # endif _GL_FUNCDECL_RPL (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else # if !@HAVE_MBSNRTOWCS@ _GL_FUNCDECL_SYS (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (mbsnrtowcs); #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " "use gnulib module mbsnrtowcs for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCRTOMB@ # if @REPLACE_WCRTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcrtomb # define wcrtomb rpl_wcrtomb # endif _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # else # if !@HAVE_WCRTOMB@ _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcrtomb); #elif defined GNULIB_POSIXCHECK # undef wcrtomb # if HAVE_RAW_DECL_WCRTOMB _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " "use gnulib module wcrtomb for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSRTOMBS@ # if @REPLACE_WCSRTOMBS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsrtombs # define wcsrtombs rpl_wcsrtombs # endif _GL_FUNCDECL_RPL (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # else # if !@HAVE_WCSRTOMBS@ _GL_FUNCDECL_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsrtombs, size_t, (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcsrtombs); #elif defined GNULIB_POSIXCHECK # undef wcsrtombs # if HAVE_RAW_DECL_WCSRTOMBS _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " "use gnulib module wcsrtombs for portability"); # endif #endif /* Convert a wide string to a string. */ #if @GNULIB_WCSNRTOMBS@ # if @REPLACE_WCSNRTOMBS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcsnrtombs # define wcsnrtombs rpl_wcsnrtombs # endif _GL_FUNCDECL_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # else # if !@HAVE_WCSNRTOMBS@ _GL_FUNCDECL_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (wcsnrtombs, size_t, (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)); # endif _GL_CXXALIASWARN (wcsnrtombs); #elif defined GNULIB_POSIXCHECK # undef wcsnrtombs # if HAVE_RAW_DECL_WCSNRTOMBS _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " "use gnulib module wcsnrtombs for portability"); # endif #endif /* Return the number of screen columns needed for WC. */ #if @GNULIB_WCWIDTH@ # if @REPLACE_WCWIDTH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcwidth # define wcwidth rpl_wcwidth # endif _GL_FUNCDECL_RPL (wcwidth, int, (wchar_t)); _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); # else # if !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t)); # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif _GL_CXXALIASWARN (wcwidth); #elif defined GNULIB_POSIXCHECK # undef wcwidth # if HAVE_RAW_DECL_WCWIDTH _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " "use gnulib module wcwidth for portability"); # endif #endif /* Search N wide characters of S for C. */ #if @GNULIB_WMEMCHR@ # if !@HAVE_WMEMCHR@ _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); # endif _GL_CXXALIAS_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN (wmemchr); #elif defined GNULIB_POSIXCHECK # undef wmemchr # if HAVE_RAW_DECL_WMEMCHR _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " "use gnulib module wmemchr for portability"); # endif #endif /* Compare N wide characters of S1 and S2. */ #if @GNULIB_WMEMCMP@ # if !@HAVE_WMEMCMP@ _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wmemcmp); #elif defined GNULIB_POSIXCHECK # undef wmemcmp # if HAVE_RAW_DECL_WMEMCMP _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " "use gnulib module wmemcmp for portability"); # endif #endif /* Copy N wide characters of SRC to DEST. */ #if @GNULIB_WMEMCPY@ # if !@HAVE_WMEMCPY@ _GL_FUNCDECL_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wmemcpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wmemcpy); #elif defined GNULIB_POSIXCHECK # undef wmemcpy # if HAVE_RAW_DECL_WMEMCPY _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " "use gnulib module wmemcpy for portability"); # endif #endif /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ #if @GNULIB_WMEMMOVE@ # if !@HAVE_WMEMMOVE@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wmemmove, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wmemmove); #elif defined GNULIB_POSIXCHECK # undef wmemmove # if HAVE_RAW_DECL_WMEMMOVE _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " "use gnulib module wmemmove for portability"); # endif #endif /* Set N wide characters of S to C. */ #if @GNULIB_WMEMSET@ # if !@HAVE_WMEMSET@ _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); # endif _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); _GL_CXXALIASWARN (wmemset); #elif defined GNULIB_POSIXCHECK # undef wmemset # if HAVE_RAW_DECL_WMEMSET _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " "use gnulib module wmemset for portability"); # endif #endif /* Return the number of wide characters in S. */ #if @GNULIB_WCSLEN@ # if !@HAVE_WCSLEN@ _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s)); # endif _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); _GL_CXXALIASWARN (wcslen); #elif defined GNULIB_POSIXCHECK # undef wcslen # if HAVE_RAW_DECL_WCSLEN _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " "use gnulib module wcslen for portability"); # endif #endif /* Return the number of wide characters in S, but at most MAXLEN. */ #if @GNULIB_WCSNLEN@ # if !@HAVE_WCSNLEN@ _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); # endif _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); _GL_CXXALIASWARN (wcsnlen); #elif defined GNULIB_POSIXCHECK # undef wcsnlen # if HAVE_RAW_DECL_WCSNLEN _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " "use gnulib module wcsnlen for portability"); # endif #endif /* Copy SRC to DEST. */ #if @GNULIB_WCSCPY@ # if !@HAVE_WCSCPY@ _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcscpy); #elif defined GNULIB_POSIXCHECK # undef wcscpy # if HAVE_RAW_DECL_WCSCPY _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " "use gnulib module wcscpy for portability"); # endif #endif /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if @GNULIB_WCPCPY@ # if !@HAVE_WCPCPY@ _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcpcpy); #elif defined GNULIB_POSIXCHECK # undef wcpcpy # if HAVE_RAW_DECL_WCPCPY _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " "use gnulib module wcpcpy for portability"); # endif #endif /* Copy no more than N wide characters of SRC to DEST. */ #if @GNULIB_WCSNCPY@ # if !@HAVE_WCSNCPY@ _GL_FUNCDECL_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcsncpy); #elif defined GNULIB_POSIXCHECK # undef wcsncpy # if HAVE_RAW_DECL_WCSNCPY _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " "use gnulib module wcsncpy for portability"); # endif #endif /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if @GNULIB_WCPNCPY@ # if !@HAVE_WCPNCPY@ _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcpncpy, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcpncpy); #elif defined GNULIB_POSIXCHECK # undef wcpncpy # if HAVE_RAW_DECL_WCPNCPY _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " "use gnulib module wcpncpy for portability"); # endif #endif /* Append SRC onto DEST. */ #if @GNULIB_WCSCAT@ # if !@HAVE_WCSCAT@ _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); # endif _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); _GL_CXXALIASWARN (wcscat); #elif defined GNULIB_POSIXCHECK # undef wcscat # if HAVE_RAW_DECL_WCSCAT _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " "use gnulib module wcscat for portability"); # endif #endif /* Append no more than N wide characters of SRC onto DEST. */ #if @GNULIB_WCSNCAT@ # if !@HAVE_WCSNCAT@ _GL_FUNCDECL_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncat, wchar_t *, (wchar_t *dest, const wchar_t *src, size_t n)); _GL_CXXALIASWARN (wcsncat); #elif defined GNULIB_POSIXCHECK # undef wcsncat # if HAVE_RAW_DECL_WCSNCAT _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " "use gnulib module wcsncat for portability"); # endif #endif /* Compare S1 and S2. */ #if @GNULIB_WCSCMP@ # if !@HAVE_WCSCMP@ _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscmp); #elif defined GNULIB_POSIXCHECK # undef wcscmp # if HAVE_RAW_DECL_WCSCMP _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " "use gnulib module wcscmp for portability"); # endif #endif /* Compare no more than N wide characters of S1 and S2. */ #if @GNULIB_WCSNCMP@ # if !@HAVE_WCSNCMP@ _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncmp); #elif defined GNULIB_POSIXCHECK # undef wcsncmp # if HAVE_RAW_DECL_WCSNCMP _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " "use gnulib module wcsncmp for portability"); # endif #endif /* Compare S1 and S2, ignoring case. */ #if @GNULIB_WCSCASECMP@ # if !@HAVE_WCSCASECMP@ _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscasecmp); #elif defined GNULIB_POSIXCHECK # undef wcscasecmp # if HAVE_RAW_DECL_WCSCASECMP _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " "use gnulib module wcscasecmp for portability"); # endif #endif /* Compare no more than N chars of S1 and S2, ignoring case. */ #if @GNULIB_WCSNCASECMP@ # if !@HAVE_WCSNCASECMP@ _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsncasecmp); #elif defined GNULIB_POSIXCHECK # undef wcsncasecmp # if HAVE_RAW_DECL_WCSNCASECMP _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " "use gnulib module wcsncasecmp for portability"); # endif #endif /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ #if @GNULIB_WCSCOLL@ # if !@HAVE_WCSCOLL@ _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); # endif _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); _GL_CXXALIASWARN (wcscoll); #elif defined GNULIB_POSIXCHECK # undef wcscoll # if HAVE_RAW_DECL_WCSCOLL _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " "use gnulib module wcscoll for portability"); # endif #endif /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying 'wcscoll' to the original strings. */ #if @GNULIB_WCSXFRM@ # if !@HAVE_WCSXFRM@ _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); # endif _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); _GL_CXXALIASWARN (wcsxfrm); #elif defined GNULIB_POSIXCHECK # undef wcsxfrm # if HAVE_RAW_DECL_WCSXFRM _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " "use gnulib module wcsxfrm for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_WCSDUP@ # if !@HAVE_WCSDUP@ _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); # endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); _GL_CXXALIASWARN (wcsdup); #elif defined GNULIB_POSIXCHECK # undef wcsdup # if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); # endif #endif /* Find the first occurrence of WC in WCS. */ #if @GNULIB_WCSCHR@ # if !@HAVE_WCSCHR@ _GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); # endif _GL_CXXALIAS_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN (wcschr); #elif defined GNULIB_POSIXCHECK # undef wcschr # if HAVE_RAW_DECL_WCSCHR _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " "use gnulib module wcschr for portability"); # endif #endif /* Find the last occurrence of WC in WCS. */ #if @GNULIB_WCSRCHR@ # if !@HAVE_WCSRCHR@ _GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); # endif _GL_CXXALIAS_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); _GL_CXXALIASWARN (wcsrchr); #elif defined GNULIB_POSIXCHECK # undef wcsrchr # if HAVE_RAW_DECL_WCSRCHR _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " "use gnulib module wcsrchr for portability"); # endif #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ #if @GNULIB_WCSCSPN@ # if !@HAVE_WCSCSPN@ _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); # endif _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); _GL_CXXALIASWARN (wcscspn); #elif defined GNULIB_POSIXCHECK # undef wcscspn # if HAVE_RAW_DECL_WCSCSPN _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " "use gnulib module wcscspn for portability"); # endif #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ #if @GNULIB_WCSSPN@ # if !@HAVE_WCSSPN@ _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); # endif _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN (wcsspn); #elif defined GNULIB_POSIXCHECK # undef wcsspn # if HAVE_RAW_DECL_WCSSPN _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " "use gnulib module wcsspn for portability"); # endif #endif /* Find the first occurrence in WCS of any character in ACCEPT. */ #if @GNULIB_WCSPBRK@ # if !@HAVE_WCSPBRK@ _GL_FUNCDECL_SYS (wcspbrk, wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); # endif _GL_CXXALIAS_SYS (wcspbrk, wchar_t *, (const wchar_t *wcs, const wchar_t *accept)); _GL_CXXALIASWARN (wcspbrk); #elif defined GNULIB_POSIXCHECK # undef wcspbrk # if HAVE_RAW_DECL_WCSPBRK _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " "use gnulib module wcspbrk for portability"); # endif #endif /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_WCSSTR@ # if !@HAVE_WCSSTR@ _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *haystack, const wchar_t *needle)); # endif _GL_CXXALIAS_SYS (wcsstr, wchar_t *, (const wchar_t *haystack, const wchar_t *needle)); _GL_CXXALIASWARN (wcsstr); #elif defined GNULIB_POSIXCHECK # undef wcsstr # if HAVE_RAW_DECL_WCSSTR _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " "use gnulib module wcsstr for portability"); # endif #endif /* Divide WCS into tokens separated by characters in DELIM. */ #if @GNULIB_WCSTOK@ # if !@HAVE_WCSTOK@ _GL_FUNCDECL_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); # endif _GL_CXXALIAS_SYS (wcstok, wchar_t *, (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); _GL_CXXALIASWARN (wcstok); #elif defined GNULIB_POSIXCHECK # undef wcstok # if HAVE_RAW_DECL_WCSTOK _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " "use gnulib module wcstok for portability"); # endif #endif /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ #if @GNULIB_WCSWIDTH@ # if @REPLACE_WCSWIDTH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcswidth # define wcswidth rpl_wcswidth # endif _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)); _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); # else # if !@HAVE_WCSWIDTH@ _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)); # endif _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); # endif _GL_CXXALIASWARN (wcswidth); #elif defined GNULIB_POSIXCHECK # undef wcswidth # if HAVE_RAW_DECL_WCSWIDTH _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " "use gnulib module wcswidth for portability"); # endif #endif #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ #endif dico-2.2/gnu/wcrtomb.c000066400000000000000000000030471172612674100147200ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Convert wide character to multibyte character. Copyright (C) 2008-2011 Free Software Foundation, Inc. Written by Bruno Haible , 2008. 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 3 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, see . */ #include /* Specification. */ #include #include #include size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) { /* This implementation of wcrtomb on top of wctomb() supports only stateless encodings. ps must be in the initial state. */ if (ps != NULL && !mbsinit (ps)) { errno = EINVAL; return (size_t)(-1); } if (s == NULL) /* We know the NUL wide character corresponds to the NUL character. */ return 1; else { int ret = wctomb (s, wc); if (ret >= 0) return ret; else { errno = EILSEQ; return (size_t)(-1); } } } dico-2.2/gnu/wctype.in.h000066400000000000000000000276411172612674100151760ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that lack it. Copyright (C) 2006-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible and Paul Eggert. */ /* * ISO C 99 for platforms that lack it. * * * iswctype, towctrans, towlower, towupper, wctrans, wctype, * wctrans_t, and wctype_t are not yet implemented. */ #ifndef _GL_WCTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if @HAVE_WINT_T@ /* Solaris 2.5 has a bug: must be included before . Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ # include # include # include # include #endif /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_WCTYPE_H@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif #ifndef _GL_WCTYPE_H #define _GL_WCTYPE_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Define wint_t and WEOF. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int # ifndef WEOF # define WEOF -1 # endif #else # ifndef WEOF # define WEOF ((wint_t) -1) # endif #endif #if !GNULIB_defined_wctype_functions /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ /* IRIX 5.3 has macros but no functions, its isw* macros refer to an undefined variable _ctmp_ and to macros like _P, and they refer to system functions like _iswctype that are not in the standard C library. Rather than try to get ancient buggy implementations like this to work, just disable them. */ # undef iswalnum # undef iswalpha # undef iswblank # undef iswcntrl # undef iswdigit # undef iswgraph # undef iswlower # undef iswprint # undef iswpunct # undef iswspace # undef iswupper # undef iswxdigit # undef towlower # undef towupper /* Linux libc5 has and the functions but they are broken. */ # if @REPLACE_ISWCNTRL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define iswalnum rpl_iswalnum # define iswalpha rpl_iswalpha # define iswblank rpl_iswblank # define iswcntrl rpl_iswcntrl # define iswdigit rpl_iswdigit # define iswgraph rpl_iswgraph # define iswlower rpl_iswlower # define iswprint rpl_iswprint # define iswpunct rpl_iswpunct # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit # define towlower rpl_towlower # define towupper rpl_towupper # endif # endif static inline int # if @REPLACE_ISWCNTRL@ rpl_iswalnum # else iswalnum # endif (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswalpha # else iswalpha # endif (wint_t wc) { return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswblank # else iswblank # endif (wint_t wc) { return wc == ' ' || wc == '\t'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswcntrl # else iswcntrl # endif (wint_t wc) { return (wc & ~0x1f) == 0 || wc == 0x7f; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswdigit # else iswdigit # endif (wint_t wc) { return wc >= '0' && wc <= '9'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswgraph # else iswgraph # endif (wint_t wc) { return wc >= '!' && wc <= '~'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswlower # else iswlower # endif (wint_t wc) { return wc >= 'a' && wc <= 'z'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswprint # else iswprint # endif (wint_t wc) { return wc >= ' ' && wc <= '~'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswpunct # else iswpunct # endif (wint_t wc) { return (wc >= '!' && wc <= '~' && !((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswspace # else iswspace # endif (wint_t wc) { return (wc == ' ' || wc == '\t' || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswupper # else iswupper # endif (wint_t wc) { return wc >= 'A' && wc <= 'Z'; } static inline int # if @REPLACE_ISWCNTRL@ rpl_iswxdigit # else iswxdigit # endif (wint_t wc) { return ((wc >= '0' && wc <= '9') || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); } static inline wint_t # if @REPLACE_ISWCNTRL@ rpl_towlower # else towlower # endif (wint_t wc) { return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); } static inline wint_t # if @REPLACE_ISWCNTRL@ rpl_towupper # else towupper # endif (wint_t wc) { return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); } # elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) /* Only the iswblank function is missing. */ # if @REPLACE_ISWBLANK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define iswblank rpl_iswblank # endif _GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); # else _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); # endif # endif # if defined __MINGW32__ /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. The functions towlower and towupper are implemented in the MSVCRT library to take a wchar_t argument and return a wchar_t result. mingw declares these functions to take a wint_t argument and return a wint_t result. This means that: 1. When the user passes an argument outside the range 0x0000..0xFFFF, the function will look only at the lower 16 bits. This is allowed according to POSIX. 2. The return value is returned in the lower 16 bits of the result register. The upper 16 bits are random: whatever happened to be in that part of the result register. We need to fix this by adding a zero-extend from wchar_t to wint_t after the call. */ static inline wint_t rpl_towlower (wint_t wc) { return (wint_t) (wchar_t) towlower (wc); } # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # endif static inline wint_t rpl_towupper (wint_t wc) { return (wint_t) (wchar_t) towupper (wc); } # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towupper rpl_towupper # endif # endif /* __MINGW32__ */ # define GNULIB_defined_wctype_functions 1 #endif #if @REPLACE_ISWCNTRL@ _GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); _GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); #else _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); #endif _GL_CXXALIASWARN (iswalnum); _GL_CXXALIASWARN (iswalpha); _GL_CXXALIASWARN (iswcntrl); _GL_CXXALIASWARN (iswdigit); _GL_CXXALIASWARN (iswgraph); _GL_CXXALIASWARN (iswlower); _GL_CXXALIASWARN (iswprint); _GL_CXXALIASWARN (iswpunct); _GL_CXXALIASWARN (iswspace); _GL_CXXALIASWARN (iswupper); _GL_CXXALIASWARN (iswxdigit); #if @GNULIB_ISWBLANK@ # if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); # else _GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); # endif _GL_CXXALIASWARN (iswblank); #endif #if !@HAVE_WCTYPE_T@ # if !GNULIB_defined_wctype_t typedef void * wctype_t; # define GNULIB_defined_wctype_t 1 # endif #endif /* Get a descriptor for a wide character property. */ #if @GNULIB_WCTYPE@ # if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); _GL_CXXALIASWARN (wctype); #elif defined GNULIB_POSIXCHECK # undef wctype # if HAVE_RAW_DECL_WCTYPE _GL_WARN_ON_USE (wctype, "wctype is unportable - " "use gnulib module wctype for portability"); # endif #endif /* Test whether a wide character has a given property. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if @GNULIB_ISWCTYPE@ # if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); # endif _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); _GL_CXXALIASWARN (iswctype); #elif defined GNULIB_POSIXCHECK # undef iswctype # if HAVE_RAW_DECL_ISWCTYPE _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " "use gnulib module iswctype for portability"); # endif #endif #if @REPLACE_ISWCNTRL@ || defined __MINGW32__ _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); #else _GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); #endif _GL_CXXALIASWARN (towlower); _GL_CXXALIASWARN (towupper); #if !@HAVE_WCTRANS_T@ # if !GNULIB_defined_wctrans_t typedef void * wctrans_t; # define GNULIB_defined_wctrans_t 1 # endif #endif /* Get a descriptor for a wide character case conversion. */ #if @GNULIB_WCTRANS@ # if !@HAVE_WCTRANS_T@ _GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); # endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); _GL_CXXALIASWARN (wctrans); #elif defined GNULIB_POSIXCHECK # undef wctrans # if HAVE_RAW_DECL_WCTRANS _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " "use gnulib module wctrans for portability"); # endif #endif /* Perform a given case conversion on a wide character. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctrans() function. */ #if @GNULIB_TOWCTRANS@ # if !@HAVE_WCTRANS_T@ _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); # endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); _GL_CXXALIASWARN (towctrans); #elif defined GNULIB_POSIXCHECK # undef towctrans # if HAVE_RAW_DECL_TOWCTRANS _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " "use gnulib module towctrans for portability"); # endif #endif #endif /* _GL_WCTYPE_H */ #endif /* _GL_WCTYPE_H */ dico-2.2/gnu/xalloc.h000066400000000000000000000214651172612674100145360ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* xalloc.h -- malloc with out-of-memory checking Copyright (C) 1990-2000, 2003-2004, 2006-2011 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 3 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, see . */ #ifndef XALLOC_H_ # define XALLOC_H_ # include # ifdef __cplusplus extern "C" { # endif # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) # define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else # define _GL_ATTRIBUTE_NORETURN /* empty */ # endif # if __GNUC__ >= 3 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else # define _GL_ATTRIBUTE_MALLOC # endif # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) # else # define _GL_ATTRIBUTE_ALLOC_SIZE(args) # endif /* This function is always triggered when memory is exhausted. It must be defined by the application, either explicitly or by using gnulib's xalloc-die module. This is the function to call when one wants the program to die because of a memory allocation failure. */ extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN; void *xmalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xzalloc (size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); void *xcalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xrealloc (void *p, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2)); void *x2realloc (void *p, size_t *pn); void *xmemdup (void const *p, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2)); char *xstrdup (char const *str) _GL_ATTRIBUTE_MALLOC; /* Return 1 if an array of N objects, each of size S, cannot exist due to size arithmetic overflow. S must be positive and N must be nonnegative. This is a macro, not an inline function, so that it works correctly even when SIZE_MAX < N. By gnulib convention, SIZE_MAX represents overflow in size calculations, so the conservative dividend to use here is SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. However, malloc (SIZE_MAX) fails on all known hosts where sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for exactly-SIZE_MAX allocations on such hosts; this avoids a test and branch when S is known to be 1. */ # define xalloc_oversized(n, s) \ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) /* In the following macros, T must be an elementary or structure/union or typedef'ed type, or a pointer to such a type. To apply one of the following macros to a function pointer or array type, you need to typedef it first and use the typedef name. */ /* Allocate an object of type T dynamically, with error checking. */ /* extern t *XMALLOC (typename t); */ # define XMALLOC(t) ((t *) xmalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking. */ /* extern t *XNMALLOC (size_t n, typename t); */ # define XNMALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) /* Allocate an object of type T dynamically, with error checking, and zero it. */ /* extern t *XZALLOC (typename t); */ # define XZALLOC(t) ((t *) xzalloc (sizeof (t))) /* Allocate memory for N elements of type T, with error checking, and zero it. */ /* extern t *XCALLOC (size_t n, typename t); */ # define XCALLOC(n, t) \ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) # if HAVE_INLINE # define static_inline static inline # else void *xnmalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); void *xnrealloc (void *p, size_t n, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); void *x2nrealloc (void *p, size_t *pn, size_t s); char *xcharalloc (size_t n) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); # endif # ifdef static_inline /* Allocate an array of N objects, each with S bytes of memory, dynamically, with error checking. S must be nonzero. */ static_inline void *xnmalloc (size_t n, size_t s) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); static_inline void * xnmalloc (size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xmalloc (n * s); } /* Change the size of an allocated block of memory P to an array of N objects each of S bytes, with error checking. S must be nonzero. */ static_inline void *xnrealloc (void *p, size_t n, size_t s) _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); static_inline void * xnrealloc (void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die (); return xrealloc (p, n * s); } /* If P is null, allocate a block of at least *PN such objects; otherwise, reallocate P so that it contains more than *PN objects each of S bytes. *PN must be nonzero unless P is null, and S must be nonzero. Set *PN to the new number of objects, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. Repeated reallocations are guaranteed to make progress, either by allocating an initial block with a nonzero size, or by allocating a larger block. In the following implementation, nonzero sizes are increased by a factor of approximately 1.5 so that repeated reallocations have O(N) overall cost rather than O(N**2) cost, but the specification for this function does not guarantee that rate. Here is an example of use: int *p = NULL; size_t used = 0; size_t allocated = 0; void append_int (int value) { if (used == allocated) p = x2nrealloc (p, &allocated, sizeof *p); p[used++] = value; } This causes x2nrealloc to allocate a block of some nonzero size the first time it is called. To have finer-grained control over the initial size, set *PN to a nonzero value before calling this function with P == NULL. For example: int *p = NULL; size_t used = 0; size_t allocated = 0; size_t allocated1 = 1000; void append_int (int value) { if (used == allocated) { p = x2nrealloc (p, &allocated1, sizeof *p); allocated = allocated1; } p[used++] = value; } */ static_inline void * x2nrealloc (void *p, size_t *pn, size_t s) { size_t n = *pn; if (! p) { if (! n) { /* The approximate size to use for initial small allocation requests, when the invoking code specifies an old size of zero. 64 bytes is the largest "small" request for the GNU C library malloc. */ enum { DEFAULT_MXFAST = 64 }; n = DEFAULT_MXFAST / s; n += !n; } } else { /* Set N = ceil (1.5 * N) so that progress is made if N == 1. Check for overflow, so that N * S stays in size_t range. The check is slightly conservative, but an exact check isn't worth the trouble. */ if ((size_t) -1 / 3 * 2 / s <= n) xalloc_die (); n += (n + 1) / 2; } *pn = n; return xrealloc (p, n * s); } /* Return a pointer to a new buffer of N bytes. This is like xmalloc, except it returns char *. */ static_inline char *xcharalloc (size_t n) _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); static_inline char * xcharalloc (size_t n) { return XNMALLOC (n, char); } # endif # ifdef __cplusplus } /* C++ does not allow conversions from void * to other pointer types without a cast. Use templates to work around the problem when possible. */ template inline T * xrealloc (T *p, size_t s) { return (T *) xrealloc ((void *) p, s); } template inline T * xnrealloc (T *p, size_t n, size_t s) { return (T *) xnrealloc ((void *) p, n, s); } template inline T * x2realloc (T *p, size_t *pn) { return (T *) x2realloc ((void *) p, pn); } template inline T * x2nrealloc (T *p, size_t *pn, size_t s) { return (T *) x2nrealloc ((void *) p, pn, s); } template inline T * xmemdup (T const *p, size_t s) { return (T *) xmemdup ((void const *) p, s); } # endif #endif /* !XALLOC_H_ */ dico-2.2/gnu/xgetdomainname.c000066400000000000000000000043641172612674100162460ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* xgetdomainname.c -- Return the NIS domain name, without size limitations. Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008-2011 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 3 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, see . */ /* Based on xgethostname.c, written by Jim Meyering. */ #include /* Specification. */ #include "xgetdomainname.h" /* Get getdomainname. */ #include /* Get errno. */ #include /* Get free. */ #include #include "xalloc.h" #ifndef INITIAL_DOMAINNAME_LENGTH # define INITIAL_DOMAINNAME_LENGTH 34 #endif /* Return the NIS domain name of the machine, in malloc'd storage. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. If malloc fails, exit. Upon any other failure, set errno and return NULL. */ char * xgetdomainname (void) { char *domainname; size_t size; size = INITIAL_DOMAINNAME_LENGTH; domainname = xmalloc (size); while (1) { int k = size - 1; int err; errno = 0; domainname[k] = '\0'; err = getdomainname (domainname, size); if (err >= 0 && domainname[k] == '\0') break; else if (err < 0 && errno != EINVAL) { int saved_errno = errno; free (domainname); errno = saved_errno; return NULL; } size *= 2; domainname = xrealloc (domainname, size); } return domainname; } dico-2.2/gnu/xgetdomainname.h000066400000000000000000000026251172612674100162510ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* xgetdomainname.h -- Return the NIS domain name, without size limitations. Copyright (C) 1992, 1996, 2000-2001, 2003, 2009-2011 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 3 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, see . */ #ifndef _XGETDOMAINNAME_H #define _XGETDOMAINNAME_H /* Return the NIS domain name of the machine, in malloc'd storage. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. If malloc fails, exit. Upon any other failure, set errno and return NULL. */ extern char *xgetdomainname (void); #endif /* _XGETDOMAINNAME_H */ dico-2.2/gnu/xgethostname.c000066400000000000000000000042651172612674100157540ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* xgethostname.c -- return current hostname with unlimited length Copyright (C) 1992, 1996, 2000-2001, 2003-2006, 2009-2011 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 3 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, see . */ /* written by Jim Meyering */ #include /* Specification. */ #include "xgethostname.h" #include #include #include #include "xalloc.h" #ifndef INITIAL_HOSTNAME_LENGTH # define INITIAL_HOSTNAME_LENGTH 34 #endif /* Return the current hostname in malloc'd storage. If malloc fails, exit. Upon any other failure, return NULL and set errno. */ char * xgethostname (void) { char *hostname = NULL; size_t size = INITIAL_HOSTNAME_LENGTH; while (1) { /* Use SIZE_1 here rather than SIZE to work around the bug in SunOS 5.5's gethostname whereby it NUL-terminates HOSTNAME even when the name is as long as the supplied buffer. */ size_t size_1; hostname = x2realloc (hostname, &size); size_1 = size - 1; hostname[size_1 - 1] = '\0'; errno = 0; if (gethostname (hostname, size_1) == 0) { if (! hostname[size_1 - 1]) break; } else if (errno != 0 && errno != ENAMETOOLONG && errno != EINVAL /* OSX/Darwin does this when the buffer is not large enough */ && errno != ENOMEM) { int saved_errno = errno; free (hostname); errno = saved_errno; return NULL; } } return hostname; } dico-2.2/gnu/xgethostname.h000066400000000000000000000001651172612674100157540ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ char *xgethostname (void); dico-2.2/gnu/xmalloc.c000066400000000000000000000063661172612674100147110ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* xmalloc.c -- malloc with out of memory checking Copyright (C) 1990-2000, 2002-2006, 2008-2011 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 3 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, see . */ #include #if ! HAVE_INLINE # define static_inline #endif #include "xalloc.h" #undef static_inline #include #include /* 1 if calloc is known to be compatible with GNU calloc. This matters if we are not also using the calloc module, which defines HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms. */ #if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__) enum { HAVE_GNU_CALLOC = 1 }; #else enum { HAVE_GNU_CALLOC = 0 }; #endif /* Allocate N bytes of memory dynamically, with error checking. */ void * xmalloc (size_t n) { void *p = malloc (n); if (!p && n != 0) xalloc_die (); return p; } /* Change the size of an allocated block of memory P to N bytes, with error checking. */ void * xrealloc (void *p, size_t n) { p = realloc (p, n); if (!p && n != 0) xalloc_die (); return p; } /* If P is null, allocate a block of at least *PN bytes; otherwise, reallocate P so that it contains more than *PN bytes. *PN must be nonzero unless P is null. Set *PN to the new block's size, and return the pointer to the new block. *PN is never set to zero, and the returned pointer is never null. */ void * x2realloc (void *p, size_t *pn) { return x2nrealloc (p, pn, 1); } /* Allocate S bytes of zeroed memory dynamically, with error checking. There's no need for xnzalloc (N, S), since it would be equivalent to xcalloc (N, S). */ void * xzalloc (size_t s) { return memset (xmalloc (s), 0, s); } /* Allocate zeroed memory for N elements of S bytes, with error checking. S must be nonzero. */ void * xcalloc (size_t n, size_t s) { void *p; /* Test for overflow, since some calloc implementations don't have proper overflow checks. But omit overflow and size-zero tests if HAVE_GNU_CALLOC, since GNU calloc catches overflow and never returns NULL if successful. */ if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) xalloc_die (); return p; } /* Clone an object P of size S, with error checking. There's no need for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any need for an arithmetic overflow check. */ void * xmemdup (void const *p, size_t s) { return memcpy (xmalloc (s), p, s); } /* Clone STRING. */ char * xstrdup (char const *string) { return xmemdup (string, strlen (string) + 1); } dico-2.2/gnu/xsize.h000066400000000000000000000070401172612674100144070ustar00rootroot00000000000000/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* xsize.h -- Checked size_t computations. Copyright (C) 2003, 2008-2011 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 3, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _XSIZE_H #define _XSIZE_H /* Get size_t. */ #include /* Get SIZE_MAX. */ #include #if HAVE_STDINT_H # include #endif /* The size of memory objects is often computed through expressions of type size_t. Example: void* p = malloc (header_size + n * element_size). These computations can lead to overflow. When this happens, malloc() returns a piece of memory that is way too small, and the program then crashes while attempting to fill the memory. To avoid this, the functions and macros in this file check for overflow. The convention is that SIZE_MAX represents overflow. malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc implementation that uses mmap --, it's recommended to use size_overflow_p() or size_in_bounds_p() before invoking malloc(). The example thus becomes: size_t size = xsum (header_size, xtimes (n, element_size)); void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); */ /* Convert an arbitrary value >= 0 to type size_t. */ #define xcast_size_t(N) \ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) /* Sum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum (size_t size1, size_t size2) { size_t sum = size1 + size2; return (sum >= size1 ? sum : SIZE_MAX); } /* Sum of three sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum3 (size_t size1, size_t size2, size_t size3) { return xsum (xsum (size1, size2), size3); } /* Sum of four sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) { return xsum (xsum (xsum (size1, size2), size3), size4); } /* Maximum of two sizes, with overflow check. */ static inline size_t #if __GNUC__ >= 3 __attribute__ ((__pure__)) #endif xmax (size_t size1, size_t size2) { /* No explicit check is needed here, because for any n: max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ return (size1 >= size2 ? size1 : size2); } /* Multiplication of a count with an element size, with overflow check. The count must be >= 0 and the element size must be > 0. This is a macro, not an inline function, so that it works correctly even when N is of a wider type and N > SIZE_MAX. */ #define xtimes(N, ELSIZE) \ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) /* Check for overflow. */ #define size_overflow_p(SIZE) \ ((SIZE) == SIZE_MAX) /* Check against overflow. */ #define size_in_bounds_p(SIZE) \ ((SIZE) != SIZE_MAX) #endif /* _XSIZE_H */ dico-2.2/grecs/000077500000000000000000000000001172612674100134055ustar00rootroot00000000000000dico-2.2/grecs/AUTHORS000066400000000000000000000000451172612674100144540ustar00rootroot00000000000000Sergey Poznyakoff dico-2.2/grecs/COPYING000066400000000000000000001045131172612674100144440ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . dico-2.2/grecs/Makefile.am000066400000000000000000000035231172612674100154440ustar00rootroot00000000000000# This file is part of Grecs # Copyright (C) 2007, 2009-2012 Sergey Poznyakoff # # Grecs 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 3, or (at your option) # any later version. # # Grecs 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 Grecs. If not, see . ACLOCAL_AMFLAGS = -I am SUBDIRS=. src @GRECS_TESTDIR@ @GRECS_DOCDIR@ EXTRA_DIST=build-aux/yyrename @GRECS_BUILD_AUX@ @GRECS_DISTDOC@ gitid.h noinst_HEADERS = gitid.h BUILT_SOURCES = gitid.h README .PHONY: gitid.h gitid.h: @if test -d .git; then \ url=`git config --get remote.origin.url | sed 's|.*://||;s|/gitroot/|/|'`; \ if test "$$url" = "git.gnu.org.ua/grecs.git"; then \ dirty=`git diff-index --name-only HEAD 2>/dev/null` || dirty=;\ test -n "$$dirty" && dirty="-dirty"; \ ID=`git log -1 --pretty='format:%H-%ct-%ae'`$$dirty;\ echo "#define GRECS_GIT_ID \"$$ID\"" > gitid.tmp; \ cmp gitid.tmp gitid.h >/dev/null 2>&1 || mv gitid.tmp gitid.h; \ rm -f gitid.tmp; \ fi; \ fi; README: test -f @GRECS_README@ && cp @GRECS_README@ README @GRECS_CHANGELOG@.PHONY: ChangeLog @GRECS_CHANGELOG@ChangeLog: @GRECS_CHANGELOG@ $(AM_V_GEN)if test -d .git; then \ @GRECS_CHANGELOG@ git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \ @GRECS_CHANGELOG@ awk -f $(top_srcdir)/build-aux/git2chg.awk > ChangeLog; \ @GRECS_CHANGELOG@ fi dico-2.2/grecs/Makefile.in000066400000000000000000001335211172612674100154570ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. @SET_MAKE@ # This file is part of Grecs # Copyright (C) 2007, 2009-2012 Sergey Poznyakoff # # Grecs 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 3, or (at your option) # any later version. # # Grecs 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 Grecs. If not, see . VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = grecs DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in AUTHORS COPYING NEWS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/imprimatur/imprimatur.m4 \ $(top_srcdir)/gint/gint.m4 $(top_srcdir)/gint/guile.m4 \ $(top_srcdir)/grecs/am/grecs.m4 $(top_srcdir)/am/gsasl.m4 \ $(top_srcdir)/am/lib.m4 $(top_srcdir)/am/testdir.m4 \ $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/btowc.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \ $(top_srcdir)/m4/des.m4 $(top_srcdir)/m4/errno_h.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fprintftime.m4 \ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/getdelim.m4 \ $(top_srcdir)/m4/getdomainname.m4 \ $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/langinfo_h.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/malloc.m4 \ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memchr.m4 \ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/nl_langinfo.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \ $(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/size_max.m4 \ $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \ $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strerror.m4 \ $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/string_h.m4 \ $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtol.m4 \ $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoul.m4 \ $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ $(top_srcdir)/m4/sys_socket_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \ $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ ARGZ_H = @ARGZ_H@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BUILD_LIBDICOSASL = @BUILD_LIBDICOSASL@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_DICT_SERVER = @DEFAULT_DICT_SERVER@ DEFAULT_PREPROCESSOR = @DEFAULT_PREPROCESSOR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DICO_MODDIR = @DICO_MODDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLOAT_H = @FLOAT_H@ GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GINT_INCLUDES = @GINT_INCLUDES@ GINT_LDADD = @GINT_LDADD@ GINT_MODULE_DIR = @GINT_MODULE_DIR@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GNULIB_ACCEPT = @GNULIB_ACCEPT@ GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CONNECT = @GNULIB_CONNECT@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETADDRINFO = @GNULIB_GETADDRINFO@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLINE = @GNULIB_GETLINE@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LISTEN = @GNULIB_LISTEN@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBRLEN = @GNULIB_MBRLEN@ GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_RECV = @GNULIB_RECV@ GNULIB_RECVFROM = @GNULIB_RECVFROM@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SEND = @GNULIB_SEND@ GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WCPCPY = @GNULIB_WCPCPY@ GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ GNULIB_WCSCAT = @GNULIB_WCSCAT@ GNULIB_WCSCHR = @GNULIB_WCSCHR@ GNULIB_WCSCMP = @GNULIB_WCSCMP@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ GNULIB_WCSSPN = @GNULIB_WCSSPN@ GNULIB_WCSSTR = @GNULIB_WCSSTR@ GNULIB_WCSTOK = @GNULIB_WCSTOK@ GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ GNULIB_WCTOB = @GNULIB_WCTOB@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WCTRANS = @GNULIB_WCTRANS@ GNULIB_WCTYPE = @GNULIB_WCTYPE@ GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GRECS_BUILD_AUX = @GRECS_BUILD_AUX@ GRECS_CHANGELOG = @GRECS_CHANGELOG@ GRECS_DISTCK_AT = @GRECS_DISTCK_AT@ GRECS_DISTDOC = @GRECS_DISTDOC@ GRECS_DOCDIR = @GRECS_DOCDIR@ GRECS_HOST_PROJECT_INCLUDES = @GRECS_HOST_PROJECT_INCLUDES@ GRECS_INCLUDES = @GRECS_INCLUDES@ GRECS_INCLUDE_DIR = @GRECS_INCLUDE_DIR@ GRECS_LDADD = @GRECS_LDADD@ GRECS_README = @GRECS_README@ GRECS_SRCDIR = @GRECS_SRCDIR@ GRECS_SUBDIR = @GRECS_SUBDIR@ GRECS_TESTDIR = @GRECS_TESTDIR@ GREP = @GREP@ GSASL_LIBS = @GSASL_LIBS@ GUILE_CONFIG = @GUILE_CONFIG@ GUILE_INCLUDES = @GUILE_INCLUDES@ GUILE_LIBS = @GUILE_LIBS@ GUILE_SITE = @GUILE_SITE@ GUILE_SNARF = @GUILE_SNARF@ GUILE_TOOLS = @GUILE_TOOLS@ GUILE_VERSION = @GUILE_VERSION@ GUILE_VERSION_NUMBER = @GUILE_VERSION_NUMBER@ HAVE_ACCEPT4 = @HAVE_ACCEPT4@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@ HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NETDB_H = @HAVE_NETDB_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ HAVE_VDPRINTF = @HAVE_VDPRINTF@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE_WCPCPY = @HAVE_WCPCPY@ HAVE_WCPNCPY = @HAVE_WCPNCPY@ HAVE_WCRTOMB = @HAVE_WCRTOMB@ HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ HAVE_WCSCAT = @HAVE_WCSCAT@ HAVE_WCSCHR = @HAVE_WCSCHR@ HAVE_WCSCMP = @HAVE_WCSCMP@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ HAVE_WCSNCMP = @HAVE_WCSNCMP@ HAVE_WCSNCPY = @HAVE_WCSNCPY@ HAVE_WCSNLEN = @HAVE_WCSNLEN@ HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ HAVE_WCSPBRK = @HAVE_WCSPBRK@ HAVE_WCSRCHR = @HAVE_WCSRCHR@ HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCSSPN = @HAVE_WCSSPN@ HAVE_WCSSTR = @HAVE_WCSSTR@ HAVE_WCSTOK = @HAVE_WCSTOK@ HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ IMPRIMATUR_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ IMPRIMATUR_MODULE_DIR = @IMPRIMATUR_MODULE_DIR@ INCLTDL = @INCLTDL@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBADD_DL = @LIBADD_DL@ LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ LIBADD_DLOPEN = @LIBADD_DLOPEN@ LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ LIBDICOSASL = @LIBDICOSASL@ LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIBZ = @LIBZ@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ LOCALE_JA = @LOCALE_JA@ LOCALE_ZH_CN = @LOCALE_ZH_CN@ LOG_FACILITY = @LOG_FACILITY@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTDLOPEN = @LTDLOPEN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_NETDB_H = @NEXT_NETDB_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_LIBS = @PAM_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ PPBIN = @PPBIN@ PP_SETUP_FILE = @PP_SETUP_FILE@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_INCLUDES = @PYTHON_INCLUDES@ PYTHON_LIBS = @PYTHON_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RENDITION = @RENDITION@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBRLEN = @REPLACE_MBRLEN@ REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ REPLACE_MBSINIT = @REPLACE_MBSINIT@ REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ WISH = @WISH@ WORDNET_IOPT = @WORDNET_IOPT@ WORDNET_LOPT = @WORDNET_LOPT@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ ltdl_LIBOBJS = @ltdl_LIBOBJS@ ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I am SUBDIRS = . src @GRECS_TESTDIR@ @GRECS_DOCDIR@ EXTRA_DIST = build-aux/yyrename @GRECS_BUILD_AUX@ @GRECS_DISTDOC@ gitid.h noinst_HEADERS = gitid.h BUILT_SOURCES = gitid.h README all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits grecs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits grecs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am .PHONY: gitid.h gitid.h: @if test -d .git; then \ url=`git config --get remote.origin.url | sed 's|.*://||;s|/gitroot/|/|'`; \ if test "$$url" = "git.gnu.org.ua/grecs.git"; then \ dirty=`git diff-index --name-only HEAD 2>/dev/null` || dirty=;\ test -n "$$dirty" && dirty="-dirty"; \ ID=`git log -1 --pretty='format:%H-%ct-%ae'`$$dirty;\ echo "#define GRECS_GIT_ID \"$$ID\"" > gitid.tmp; \ cmp gitid.tmp gitid.h >/dev/null 2>&1 || mv gitid.tmp gitid.h; \ rm -f gitid.tmp; \ fi; \ fi; README: test -f @GRECS_README@ && cp @GRECS_README@ README @GRECS_CHANGELOG@.PHONY: ChangeLog @GRECS_CHANGELOG@ChangeLog: @GRECS_CHANGELOG@ $(AM_V_GEN)if test -d .git; then \ @GRECS_CHANGELOG@ git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \ @GRECS_CHANGELOG@ awk -f $(top_srcdir)/build-aux/git2chg.awk > ChangeLog; \ @GRECS_CHANGELOG@ fi # 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: dico-2.2/grecs/NEWS000066400000000000000000000020251172612674100141030ustar00rootroot00000000000000Grecs NEWS -- history of user-visible changes. 2011-05-07 Copyright (C) 2011-2012 Sergey Poznyakoff See the end of file for copying conditions. Please send libgrecs bug reports to Version 1.0 (Git) ========================================================================= Copyright information: Copyright (C) 2011 Sergey Poznyakoff Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local variables: mode: outline paragraph-separate: "[ ]*$" eval: (add-hook 'write-file-hooks 'time-stamp) time-stamp-start: "changes. " time-stamp-format: "%:y-%02m-%02d" time-stamp-end: "\n" end: dico-2.2/grecs/README000066400000000000000000000047511172612674100142740ustar00rootroot00000000000000Grecs README Copyright (C) 2011-2012 Sergey Poznyakoff See the end of file for copying conditions. * Introduction This file contains brief information about using Grecs as a submodule. You will find a complete documentation for Grecs, in form of man pages, in the doc/ subdirectory. An online copy of the documentation in various formats is available at http://grecs.man.gnu.org.ua. If you are interested in libgrecs, a standalone library implementation of Grecs, see the file README.standalone in this directory, or visit http://grecs.man.gnu.org.ua. * Overview Grecs is a library for parsing structured configuration files from C programs. A structured configuration file has hierarchical structure, with block statements enclosing lower-level statements. Such configurations files are used by many programs, such as, e.g. Bind or Dico. Grecs provides primitives for parsing such files into an internal tree-like structure and for basic operations on such structures. These operations include value lookups by keyword paths, traversing trees recursively, joining several trees together, reductions, etc. * Usage 1. Install grecs as a submodule: git submodule add git://git.gnu.org.ua/grecs.git grecs 2. Add a call to GRECS_SETUP to your configure.ac. It can be as simple as: GRECS_SETUP If the subproject directory is not 'grecs', supply the actual directory name as the first argument to this macro, e.g.: GRECS_SETUP(lib/grecs) For a detailed description of the GRECS_SETUP macro, run `man doc/GRECS_SETUP.3'. 3. In your Makefile.am, add @GRECS_INCLUDES@ to the INCLUDES value, and @GRECS_LDADD@ to LDADD, e.g.: INCLUDES = @GRECS_INCLUDES@ LDADD = @GRECS_LDADD@ 4. Include "grecs.h" 5. Use the library to handle your configuration files. See the documentation for a detailed discussion. * Bug reporting. Send bug reports to . * Copyright information: Copyright (C) 2011 Sergey Poznyakoff Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local Variables: mode: outline paragraph-separate: "[ ]*$" version-control: never End: dico-2.2/grecs/am/000077500000000000000000000000001172612674100140025ustar00rootroot00000000000000dico-2.2/grecs/am/grecs.m4000066400000000000000000000176451172612674100153640ustar00rootroot00000000000000# This file is part of grecs - Gray's Extensible Configuration System -*- autoconf -*- # Copyright (C) 2007, 2009-2012 Sergey Poznyakoff # # Grex 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 3, or (at your option) # any later version. # # Grex 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 Grex. If not, see . # _GRECS_MANGLE_OPTION(NAME) # ------------------------- # Convert NAME to a valid m4 identifier, by replacing invalid characters # with underscores, and prepend the _GRECS_OPTION_ suffix to it. AC_DEFUN([_GRECS_MANGLE_OPTION], [[_GRECS_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _GRECS_SET_OPTION(NAME) # ---------------------- # Set option NAME. AC_DEFUN([_GRECS_SET_OPTION], [m4_define(_GRECS_MANGLE_OPTION([$1]), 1)]) # _GRECS_IF_OPTION_SET(NAME,IF-SET,IF-NOT-SET) # ------------------------------------------- # Check if option NAME is set. AC_DEFUN([_GRECS_IF_OPTION_SET], [m4_ifset(_GRECS_MANGLE_OPTION([$1]),[$2],[$3])]) # _GRECS_OPTION_SWITCH(NAME1,IF-SET1,[NAME2,IF-SET2,[...]],[IF-NOT-SET]) # ------------------------------------------------------------------------ # If NAME1 is set, run IF-SET1. Otherwise, if NAME2 is set, run IF-SET2. # Continue the process for all name-if-set pairs within [...]. If none # of the options is set, run IF-NOT-SET. AC_DEFUN([_GRECS_OPTION_SWITCH], [m4_if([$4],,[_GRECS_IF_OPTION_SET($@)],dnl [$3],,[_GRECS_IF_OPTION_SET($@)],dnl [_GRECS_IF_OPTION_SET([$1],[$2],[_GRECS_OPTION_SWITCH(m4_shift(m4_shift($@)))])])]) # _GRECS_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Grecs options. AC_DEFUN([_GRECS_SET_OPTIONS], [m4_foreach_w([_GRECS_Option], [$1], [_GRECS_SET_OPTION(_GRECS_Option)])]) # GRECS_SETUP([dir],[OPTIONS],[pp-setup-file]) # dir - Directory in the source tree where grecs has been cloned. # OPTIONS are: # no-preproc Disable the use of preprocessor. # std-pp-setup Install standard pp-setup file. # pp-setup-option Add the --with-pp-setup-file option to the # configuration file. The option allows user to # control whether the pp-setup file is installed. # tests Build tests. # getopt Add getopt.m4 to the distribution. # git2chg Add git2chg.awk to the distribution. # syntax-doc Add doc/grecs-syntax.texi to the distribution. # install Build installable library. # shared Build shared (convenience) library. # install-headers [with "shared"] Install Grecs headers to # GRECS_INCLUDE_DIR. # # The pp-setup-file argument supplies the pathname of the preprocessor # setup file in the source tree. It is ignored if std-pp-setup option is # given. # # If neither std-pp-setup option, nor pp-setup-file argument are supplied, # no preprocessor setup file is installed. AC_DEFUN([GRECS_SETUP],[ m4_pushdef([grecsdir],m4_if($1,[.],,$1,,[grecs/],$1/)) AC_PROG_YACC AM_PROG_LEX AC_HEADER_SYS_WAIT AC_SUBST([GRECS_SUBDIR],m4_if($1,,grecs,$1)) _GRECS_SET_OPTIONS([$2]) # ********************** # Preprocessor # ********************** _GRECS_IF_OPTION_SET([no-preproc], [use_ext_pp=no], [AC_ARG_WITH([preprocessor], AC_HELP_STRING([--without-preprocessor], [do not use external preprocessor]), [case "${withval}" in yes) use_ext_pp=yes ;; no) use_ext_pp=no ;; *) AC_MSG_ERROR(bad value ${withval} for --with-preprocessor) ;; esac],[use_ext_pp=yes])]) if test $use_ext_pp != no; then # Check for default preprocessor AC_ARG_VAR([DEFAULT_PREPROCESSOR], [Set default preprocessor name]) if test -z "$DEFAULT_PREPROCESSOR" ; then DEFAULT_PREPROCESSOR="m4 -s" fi save_PATH=$PATH PREPROC_OPTIONS=`echo $DEFAULT_PREPROCESSOR | sed -n 's/[[^ ]][[^ ]]* //p'` case "$DEFAULT_PREPROCESSOR" in /*) PATH=`expr $DEFAULT_PREPROCESSOR : '\(.*\)/.*'`:$PATH DEFAULT_PREPROCESSOR=`expr $DEFAULT_PREPROCESSOR : '.*/\(.*\)'`;; esac AC_PATH_PROG(PPBIN, $DEFAULT_PREPROCESSOR) DEFAULT_PREPROCESSOR=$PPBIN if test -n "$DEFAULT_PREPROCESSOR"; then DEFAULT_PREPROCESSOR="$DEFAULT_PREPROCESSOR $PREPROC_OPTIONS" _GRECS_IF_OPTION_SET([std-pp-setup], [PP_SETUP_FILE='pp-setup'], [m4_if([$3],,[PP_SETUP_FILE=],[PP_SETUP_FILE='$3'])]) AC_SUBST(PP_SETUP_FILE) if test -n "$PP_SETUP_FILE"; then _GRECS_IF_OPTION_SET([pp-setup-option], [AC_ARG_WITH([pp-setup-file], AC_HELP_STRING([--with-pp-setup-file], [install the default pp-setup file]), [case "${withval}" in yes) ;; no) PP_SETUP_FILE=;; *) AC_MSG_ERROR([bad value ${withval} for --with-pp-setup-file]) ;; esac])], [case $PPBIN in *m4) ;; # Install default pp-setup *) PP_SETUP_FILE=;; # Skip it esac]) fi fi PATH=$save_PATH DEFAULT_PREPROCESSOR="\\\"$DEFAULT_PREPROCESSOR\\\"" else DEFAULT_PREPROCESSOR=NULL fi _GRECS_IF_OPTION_SET([tests], [m4_pushdef([TESTDIR],grecsdir[tests]) AC_CONFIG_TESTDIR(TESTDIR) AC_CONFIG_FILES(TESTDIR/Makefile TESTDIR/atlocal) m4_popdef([TESTDIR]) AM_MISSING_PROG([AUTOM4TE], [autom4te]) GRECS_TESTDIR=tests ]) _GRECS_IF_OPTION_SET([getopt],[ AC_CHECK_HEADERS([getopt.h]) AC_CHECK_FUNCS([sysconf getdtablesize getopt_long]) GRECS_BUILD_AUX="build-aux/getopt.m4" ]) _GRECS_IF_OPTION_SET([git2chg],[GRECS_BUILD_AUX="$GRECS_BUILD_AUX build-aux/git2chg.awk"]) AM_CONDITIONAL([GRECS_COND_META1_PARSER], _GRECS_OPTION_SWITCH([parser-meta1],[true], [all-parsers],[true], [false])) AM_CONDITIONAL([GRECS_COND_BIND_PARSER], _GRECS_OPTION_SWITCH([parser-bind],[true], [all-parsers],[true], [false])) AM_CONDITIONAL([GRECS_COND_GIT_PARSER], _GRECS_OPTION_SWITCH([parser-git],[true], [all-parsers],[true], [false])) AM_CONDITIONAL([GRECS_COND_INSTALLHEADERS], _GRECS_IF_OPTION_SET([install-headers],[true],[false])) AC_SUBST([GRECS_SRCDIR],$1) AC_SUBST([GRECS_BUILD_AUX]) AC_SUBST([GRECS_INCLUDES]) AC_SUBST([GRECS_TESTDIR]) AC_SUBST([GRECS_LDADD]) AC_SUBST([GRECS_DOCDIR]) AC_SUBST([GRECS_CHANGELOG]) AC_SUBST([GRECS_DISTCK_AT]) AC_SUBST([GRECS_README]) AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[src]') AC_SUBST([GRECS_HOST_PROJECT_INCLUDES]) AC_SUBST([GRECS_DISTDOC]) AC_SUBST([GRECS_INCLUDE_DIR],['$(pkgincludedir)']) _GRECS_OPTION_SWITCH([install],[ LT_INIT GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] GRECS_DOCDIR='doc' GRECS_CHANGELOG= GRECS_DISTCK_AT=distck.at GRECS_README=README.standalone AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-inst.in] grecsdir[doc/Makefile]) ],[shared],[ LT_INIT GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la'] GRECS_CHANGELOG='#' GRECS_README=README.submodule _GRECS_IF_OPTION_SET([syntax-doc],[GRECS_DISTDOC=doc/grecs-syntax.texi]) AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-shared.in]) ],[ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a'] GRECS_CHANGELOG='#' GRECS_README=README.submodule _GRECS_IF_OPTION_SET([syntax-doc],[GRECS_DISTDOC=doc/grecs-syntax.texi]) AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-static.in]) ]) AC_CONFIG_FILES(grecsdir[Makefile]) m4_popdef([grecsdir]) ]) dico-2.2/grecs/build-aux/000077500000000000000000000000001172612674100152775ustar00rootroot00000000000000dico-2.2/grecs/build-aux/getopt.m4000066400000000000000000000516611172612674100170540ustar00rootroot00000000000000dnl This file is part of grecs dnl Copyright (C) 2007, 2009-2012 Sergey Poznyakoff dnl dnl Grecs is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3, or (at your option) dnl any later version. dnl dnl Grecs is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with Grecs. If not, see . divert(-1) changequote([<,>]) changecom(/*,*/) dnl _getopt_mangle_option(NAME) dnl --------------------------- dnl Convert NAME to a valid m4 identifier, by replacing invalid characters dnl with underscores, and prepend the _GETOPT_OPTION_ suffix to it. define([<_getopt_mangle_option>], [<[<_GETOPT_OPTION_>]patsubst($1, [<[^a-zA-Z0-9_]>], [<_>])>]) dnl _getopt_set_option(NAME[=VAL]) dnl ------------------------------ dnl Set option NAME. define([<_getopt_set_option>], [],=),-1,[], [],\([^=]+\)=\(.*\), [<_getopt_mangle_option(\1),[<\2>]>]))>])>]) dnl _getopt_get_option(NAME[,DEFAULT]) dnl ------------------------------ define([<_getopt_get_option>], [<_getopt_if_option_set($1,[],[<$2>])>]) dnl _getopt_if_option_set(NAME,IF-SET,IF-NOT-SET) dnl --------------------------------------------- dnl Check if option NAME is set. define([<_getopt_if_option_set>], []),[<$2>],[<$3>])>]) dnl _getopt_option_switch(NAME1,IF-SET1,[NAME2,IF-SET2,[...]],[IF-NOT-SET]) dnl ------------------------------------------------------------------------ dnl If NAME1 is set, run IF-SET1. Otherwise, if NAME2 is set, run IF-SET2. dnl Continue the process for all name-if-set pairs within [...]. If none dnl of the options is set, run IF-NOT-SET. define([<_getopt_option_switch>], [],,[<_getopt_if_option_set($@)>], [<$3>],,[<_getopt_if_option_set($@)>], [<_getopt_if_option_set([<$1>],[<$2>], [<_getopt_option_switch(shift(shift($@)))>])>])>]) dnl _getopt_if_option_val(NAME,val,IF-TRUE,IF-FALSE) dnl --------------------------------------------- dnl Check if option NAME is set. define([<_getopt_if_option_val>], []),[<$2>],[<$3>],[<$4>])>]) define([<__getopt_switch_option_val>], [],2,[<$2>],dnl [<$#>],3,[],[<$2>],[<$3>])>],dnl [],[<$2>],[<$3>],dnl [<__getopt_switch_option_val([<$1>],shift(shift(shift($@))))>])>])>]) dnl _getopt_switch_option_val(NAME,val1,IF-VAL1,val2,IF-VAL2...,ELSE) dnl ----------------------------------------------------------------- dnl Check if option NAME is set. define([<_getopt_switch_option_val>], [],[<_getopt_get_option($1)>])dnl __getopt_switch_option_val(val, shift($@))[<>]dnl popdef([])>]) dnl _getopt_set_options(OPTION[,OPTION...]) dnl --------------------------------------- dnl Set options given as arguments. define([<_getopt_set_options>], [],,, [<_getopt_set_option([<$1>]) _getopt_set_options(shift($@))>])>]) dnl format_authors(name[,name...]) dnl ------------------------------ define([],dnl [],,NULL,[<"$1", format_authors(shift($@))>])>]) dnl upcase(ARGS...) dnl Concatenate and convert ARGS to upper case. dnl define([], [], [], [])>]) dnl concat(ARGS...) dnl Concatenate arguments, inserting ", " between each of pair of them. dnl define([],[],1,[<$1>],[<$1, concat(shift($@))>])>]) dnl flushleft(ARGS...) dnl Concatenate ARGS and remove any leading whitespace dnl define([], [], [<^[ ]+>])>]) dnl chop(ARGS...) dnl Concatenate ARGS and remove any trailing whitespace dnl define([], [], [<[ ]+$>])>]) dnl escape(ARGS...) dnl Concatenate ARGS and escape any occurrences of double-quotes with dnl backslashes. dnl define([], [],[<[\"]>],[<\\\&>])>]) dnl prep(ARG) dnl Prepare ARG for including in C strings: replace newlines with any amount dnl of preceding and following whitespace by a single space character, remove dnl leading whitespace, and escape double-quotes. dnl define([], [],[<[ ]* +[ ]*>],[< >])))>]) dnl SHORT_OPTS dnl Accumulator for the 3rd argument of getopt_long dnl define([],[<>]) dnl GROUP(STRING) dnl Begin a named group of options dnl define([],[])") }, divert(-1)>]) define([<__GATHER_OPTIONS>],[< define([],ifelse([<$2>],,[]upcase(patsubst($1,-,_)),'$2')) ifelse([<$2>],,[< divert(1) KEY, divert(-1) >]) define([],ifdef([],SELECTOR) case KEY:) ifelse([<$1>],,,[< divert(2) { "$1", ARGTYPE, 0, KEY }, divert(-1)>]) dnl define([],SHORT_OPTS[<>]dnl ifelse([<$2>],,,$2[<>]ifelse(ARGTYPE,[],,ARGTYPE,[],:,ARGTYPE,[],::))) dnl ifelse([<$1>],,,dnl [],ifelse(LONG_TAG,,[<--$1>],[]))>]) ifelse([<$2>],,,dnl [],ifelse(SHORT_TAG,,[<-$2>],[]))>]) >]) dnl OPTION(long-opt, short-opt, [arg], [descr]) dnl Introduce a command line option. Arguments: dnl long-opt Long option. dnl short-opt Short option (a single char) dnl (At least one of long-opt or short-opt must be present) dnl dnl Optional arguments: dnl arg Option argument. dnl descr Option description dnl dnl If arg is absent, the option does not take any arguments. If arg is dnl enclosed in square brackets, the option takes an optional argument. dnl Otherwise, the argument is required. dnl dnl If descr is not given the option will not appear in the --help and dnl --usage outputs. dnl define([